From bfac707e009539962022cb26cd4e6af357c7f272 Mon Sep 17 00:00:00 2001 From: jmfNodejsUser <35915077+jmfNodejsUser@users.noreply.github.com> Date: Mon, 29 Jan 2018 14:14:23 +0100 Subject: [PATCH 1/4] Create nodejs_8.9.4.bb Integrates LTS 8.9.4 in meta-openembedded of YOCTO --- recipes-devtools/nodejs/nodejs_8.9.4.bb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 recipes-devtools/nodejs/nodejs_8.9.4.bb diff --git a/recipes-devtools/nodejs/nodejs_8.9.4.bb b/recipes-devtools/nodejs/nodejs_8.9.4.bb new file mode 100644 index 00000000..f7580e79 --- /dev/null +++ b/recipes-devtools/nodejs/nodejs_8.9.4.bb @@ -0,0 +1,9 @@ +require nodejs_8.inc +require nodejs_lts.inc + +INC_PR = "r1" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=270f7477a1705f7cd3e29d3d4512915d" + +SRC_URI[src.md5sum] = "4ddc1daff327d7e6f63da57fdfc24f55" +SRC_URI[src.sha256sum] = "729b44b32b2f82ecd5befac4f7518de0c4e3add34e8fe878f745740a66cbbc01" From 2c250aee3d7d1eafaf406b7c71862ea2ff81cb1b Mon Sep 17 00:00:00 2001 From: jmfNodejsUser <35915077+jmfNodejsUser@users.noreply.github.com> Date: Mon, 29 Jan 2018 14:45:15 +0100 Subject: [PATCH 2/4] Create nodejs_8.inc For the Nodejs LTS 8.9.4 --- recipes-devtools/nodejs/nodejs_8.inc | 93 ++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 recipes-devtools/nodejs/nodejs_8.inc diff --git a/recipes-devtools/nodejs/nodejs_8.inc b/recipes-devtools/nodejs/nodejs_8.inc new file mode 100644 index 00000000..73ecfb14 --- /dev/null +++ b/recipes-devtools/nodejs/nodejs_8.inc @@ -0,0 +1,93 @@ +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 = "(!.*armv6).*" +COMPATIBLE_MACHINE_armv5 = "(!.*armv8).*" +COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" + +INC_PR = "r1" +PR = "${INC_PR}.8" + +PROVIDES = "node" +RPROVIDES_${PN} = "node" + +SRC_URI = "https://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz;name=src\ + file://no-registry_8.x.patch" + +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 \ + ${PACKAGECONFIG_CONFARGS} +} + +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" From ae8bf13e9610419c10be049d5a0ee2c0b3689edc Mon Sep 17 00:00:00 2001 From: jmfNodejsUser <35915077+jmfNodejsUser@users.noreply.github.com> Date: Mon, 29 Jan 2018 14:47:22 +0100 Subject: [PATCH 3/4] Create no-registry_8.x.patch NPM has changed to version 5.6.0. The file caching_client.js is not available in npm 5.6.0 --- recipes-devtools/nodejs/files/no-registry_8.x.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 recipes-devtools/nodejs/files/no-registry_8.x.patch diff --git a/recipes-devtools/nodejs/files/no-registry_8.x.patch b/recipes-devtools/nodejs/files/no-registry_8.x.patch new file mode 100644 index 00000000..d5b5e433 --- /dev/null +++ b/recipes-devtools/nodejs/files/no-registry_8.x.patch @@ -0,0 +1,11 @@ +diff -Naur node-v6.10.0/deps/npm/lib/utils/map-to-registry.js node-v6.10.0b/deps/npm/lib/utils/map-to-registry.js +--- node-v6.10.0/deps/npm/lib/utils/map-to-registry.js 2017-02-21 18:40:14.000000000 -0600 ++++ node-v6.10.0b/deps/npm/lib/utils/map-to-registry.js 2017-04-18 14:38:29.640908067 -0500 +@@ -45,6 +45,7 @@ + + log.silly('mapToRegistry', 'registry', registry) ++ if (!registry) return cb(null, "http://noregistry/" + name, {}) + + var auth = config.getCredentialsByURI(registry) + + // normalize registry URL so resolution doesn't drop a piece of registry URL From 12b3e47615b6e39c95c6014e240e0064f48480f9 Mon Sep 17 00:00:00 2001 From: jmfNodejsUser <35915077+jmfNodejsUser@users.noreply.github.com> Date: Thu, 1 Feb 2018 12:24:54 +0100 Subject: [PATCH 4/4] Update nodejs_8.inc --- recipes-devtools/nodejs/nodejs_8.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-devtools/nodejs/nodejs_8.inc b/recipes-devtools/nodejs/nodejs_8.inc index 73ecfb14..b488b497 100644 --- a/recipes-devtools/nodejs/nodejs_8.inc +++ b/recipes-devtools/nodejs/nodejs_8.inc @@ -4,8 +4,8 @@ HOMEPAGE = "http://nodejs.org" LICENSE = "MIT" COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" -COMPATIBLE_MACHINE_armv5 = "(!.*armv6).*" -COMPATIBLE_MACHINE_armv5 = "(!.*armv8).*" +COMPATIBLE_MACHINE_armv6 = "(!.*armv6).*" +COMPATIBLE_MACHINE_armv8 = "(!.*armv8).*" COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" INC_PR = "r1"