diff options
| author | Andrej Valek <andrej.valek@siemens.com> | 2019-02-17 12:03:21 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-02-17 12:40:56 -0800 |
| commit | 1c8e4a679ae382f953b2e5c7a4966a4646314f3e (patch) | |
| tree | 7da4c584aa7444f0a35eede0e0700b3ed794ea3e /meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb | |
| parent | b1ccca4bacda568062804c7c90aeb15e704c2eb9 (diff) | |
| download | meta-openembedded-1c8e4a679ae382f953b2e5c7a4966a4646314f3e.tar.gz | |
nodejs 8.15.0 -> 10.15.1
Update nodejs to active 10.x LTS release 10.15.1.
- link atomic library
- make it compatible with gcc < 4.9
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb')
| -rw-r--r-- | meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb b/meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb new file mode 100644 index 0000000000..17c9bb0c4e --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs_10.15.1.bb | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" | ||
| 2 | HOMEPAGE = "http://nodejs.org" | ||
| 3 | LICENSE = "MIT & BSD & Artistic-2.0" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9ceeba79eb2ea1067b7b3ed16fff8bab" | ||
| 5 | |||
| 6 | DEPENDS = "openssl zlib icu" | ||
| 7 | DEPENDS_append_class-target = " nodejs-native" | ||
| 8 | |||
| 9 | inherit pkgconfig | ||
| 10 | |||
| 11 | COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" | ||
| 12 | COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" | ||
| 13 | COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" | ||
| 14 | |||
| 15 | SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ | ||
| 16 | file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ | ||
| 17 | file://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \ | ||
| 18 | file://0004-Make-compatibility-with-gcc-4.8.patch \ | ||
| 19 | file://0005-Link-atomic-library.patch \ | ||
| 20 | " | ||
| 21 | SRC_URI_append_class-target = " \ | ||
| 22 | file://0002-Using-native-torque.patch \ | ||
| 23 | " | ||
| 24 | |||
| 25 | SRC_URI[md5sum] = "1cad7963255de53509bfa560221bdc88" | ||
| 26 | SRC_URI[sha256sum] = "1a55f7b9fb80442182d9e1eba4fca4dac3c781cdcb25d6be37b24d253f61c858" | ||
| 27 | |||
| 28 | S = "${WORKDIR}/node-v${PV}" | ||
| 29 | |||
| 30 | # v8 errors out if you have set CCACHE | ||
| 31 | CCACHE = "" | ||
| 32 | |||
| 33 | def map_nodejs_arch(a, d): | ||
| 34 | import re | ||
| 35 | |||
| 36 | if re.match('i.86$', a): return 'ia32' | ||
| 37 | elif re.match('x86_64$', a): return 'x64' | ||
| 38 | elif re.match('aarch64$', a): return 'arm64' | ||
| 39 | elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64' | ||
| 40 | elif re.match('powerpc$', a): return 'ppc' | ||
| 41 | return a | ||
| 42 | |||
| 43 | ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ | ||
| 44 | ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ | ||
| 45 | bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ | ||
| 46 | bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ | ||
| 47 | '--with-arm-fpu=vfp', d), d), d)}" | ||
| 48 | GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' " | ||
| 49 | ARCHFLAGS ?= "" | ||
| 50 | |||
| 51 | # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi | ||
| 52 | do_configure () { | ||
| 53 | rm -rf ${S}/deps/openssl | ||
| 54 | export LD="${CXX}" | ||
| 55 | GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES | ||
| 56 | # $TARGET_ARCH settings don't match --dest-cpu settings | ||
| 57 | ./configure --prefix=${prefix} --with-intl=system-icu --without-snapshot --shared-openssl --shared-zlib \ | ||
| 58 | --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ | ||
| 59 | --dest-os=linux \ | ||
| 60 | ${ARCHFLAGS} | ||
| 61 | } | ||
| 62 | |||
| 63 | do_compile () { | ||
| 64 | export LD="${CXX}" | ||
| 65 | oe_runmake BUILDTYPE=Release | ||
| 66 | } | ||
| 67 | |||
| 68 | do_install () { | ||
| 69 | oe_runmake install DESTDIR=${D} | ||
| 70 | } | ||
| 71 | |||
| 72 | do_install_append_class-native() { | ||
| 73 | # use node from PATH instead of absolute path to sysroot | ||
| 74 | # node-v0.10.25/tools/install.py is using: | ||
| 75 | # shebang = os.path.join(node_prefix, 'bin/node') | ||
| 76 | # update_shebang(link_path, shebang) | ||
| 77 | # and node_prefix can be very long path to bindir in native sysroot and | ||
| 78 | # when it exceeds 128 character shebang limit it's stripped to incorrect path | ||
| 79 | # and npm fails to execute like in this case with 133 characters show in log.do_install: | ||
| 80 | # updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node | ||
| 81 | # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js | ||
| 82 | # use sed on npm-cli.js because otherwise symlink is replaced with normal file and | ||
| 83 | # npm-cli.js continues to use old shebang | ||
| 84 | sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js | ||
| 85 | |||
| 86 | # Install the native torque to provide it within sysroot for the target compilation | ||
| 87 | install -d ${D}${bindir} | ||
| 88 | install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque | ||
| 89 | } | ||
| 90 | |||
| 91 | do_install_append_class-target() { | ||
| 92 | sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js | ||
| 93 | } | ||
| 94 | |||
| 95 | PACKAGES =+ "${PN}-npm" | ||
| 96 | FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx" | ||
| 97 | RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils \ | ||
| 98 | python-compiler python-misc python-multiprocessing" | ||
| 99 | |||
| 100 | PACKAGES =+ "${PN}-systemtap" | ||
| 101 | FILES_${PN}-systemtap = "${datadir}/systemtap" | ||
| 102 | |||
| 103 | |||
| 104 | BBCLASSEXTEND = "native" | ||
