diff --git a/README.md b/README.md index e2c693e4..ae8cb59d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ OpenEmbedded layer for latest [Node.js](https://nodejs.org/ "Node.js") releases. ## Node.js releases - * ![Current 6](https://img.shields.io/badge/Node.js%20Current-6.9.1-green.svg) + * ![Current 7](https://img.shields.io/badge/Node.js%20Current-7.0.0-green.svg) + * ![LTS 6](https://img.shields.io/badge/Node.js%20LTS-6.9.1-blue.svg) * ![LTS 4](https://img.shields.io/badge/Node.js%20LTS-4.6.1-blue.svg) * ![Maintenance 0.12](https://img.shields.io/badge/Node.js%20Maintenance-0.12.17-lightgray.svg) * ![Maintenance 0.10](https://img.shields.io/badge/Node.js%20Maintenance-0.10.48-lightgray.svg) diff --git a/recipes-devtools/nodejs/nodejs_7.0.0.bb b/recipes-devtools/nodejs/nodejs_7.0.0.bb new file mode 100644 index 00000000..4da741ca --- /dev/null +++ b/recipes-devtools/nodejs/nodejs_7.0.0.bb @@ -0,0 +1,10 @@ +require nodejs_7.inc + +INC_PR = "r1" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=19eb7a3bddc44523bf96176c3da4b422" + +SRC_URI[src.md5sum] = "7b3a026fd9bffeb694e9db7220bb1099" +SRC_URI[src.sha256sum] = "95ae4a37b8cf57816f96588ebe9ce5dbbb2c5452d177edd75fcfe6caf3b12b9b" + +DEFAULT_PREFERENCE = "-1" diff --git a/recipes-devtools/nodejs/nodejs_7.inc b/recipes-devtools/nodejs/nodejs_7.inc new file mode 100644 index 00000000..a2a9c1fe --- /dev/null +++ b/recipes-devtools/nodejs/nodejs_7.inc @@ -0,0 +1,91 @@ +DESCRIPTION = "Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine" +HOMEPAGE = "http://nodejs.org" + +LICENSE = "MIT" + +COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" +# COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" +COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" + +INC_PR = "r1" +PR = "${INC_PR}.0" + +PROVIDES = "node" +RPROVIDES_${PN} = "node" + +SRC_URI = "https://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz;name=src" + +S = "${WORKDIR}/node-v${PV}" + +# v8 errors out if you have set CCACHE +CCACHE = "" + +inherit nodejs-arch + +ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ + ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ + bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ + '--with-arm-fpu=vfp', d), d), d)}" +ARCHFLAGS ?= "" + +GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' " + +PACKAGECONFIG ??= "zlib openssl" + +PACKAGECONFIG[zlib] = "--shared-zlib,,zlib," +PACKAGECONFIG[openssl] = "--shared-openssl,,openssl," +PACKAGECONFIG[v8-inspector] = ",--without-inspector,," + +DISABLE_STATIC = "" + +do_configure () { + export LD="${CXX}" + GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES + ./configure --prefix="${prefix}" \ + --dest-cpu="${@nodejs_map_dest_cpu(d.getVar('TARGET_ARCH', True), d)}" \ + --dest-os=linux ${ARCHFLAGS} \ + --without-snapshot \ + --with-intl=none \ + ${EXTRA_OECONF} +} + +do_compile () { + export LD="${CXX}" + oe_runmake BUILDTYPE=Release +} + +do_install () { + oe_runmake install DESTDIR="${D}" +} + +do_install_append_class-native() { + # make sure we use node from PATH instead of absolute path to sysroot + sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js +} + +do_install_append_class-nativesdk() { + # make sure we use node from PATH instead of absolute path to sysroot + sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js + sed "1s^.*^#\!/usr/bin/env python^g" -i ${D}${exec_prefix}/lib/node_modules/npm/node_modules/node-gyp/gyp/samples/samples +} + +do_install_append_class-target() { + # make sure we use node from PATH instead of absolute path to sysroot + sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js +} + +PACKAGES =+ "${PN}-npm" +FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm" +RDEPENDS_${PN}-npm = "bash python-compiler python-shell python-datetime python-subprocess python-multiprocessing python-crypt python-textutils python-netclient python-misc" + +PACKAGES =+ "${PN}-dtrace" +FILES_${PN}-dtrace = "${exec_prefix}/lib/dtrace" + +PACKAGES =+ "${PN}-systemtap" +FILES_${PN}-systemtap = "${datadir}/systemtap" + +INSANE_SKIP_${PN} += "file-rdeps" +INSANE_SKIP_${PN}-dbg += "host-user-contaminated" + +BBCLASSEXTEND = "native nativesdk"