diff options
| author | Andrej Valek <andrej.valek@siemens.com> | 2019-09-03 10:06:09 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-09-03 07:11:04 -0700 |
| commit | a1a0e8d91e15fb00abcdbd7efe90382b209193fc (patch) | |
| tree | 692f5c0b76dba351825b4828e9f11fcfb7c3ce7c /meta-oe/recipes-devtools/nodejs/nodejs_10.16.3.bb | |
| parent | 8f91643496a433e99b356fc4ac4c540ed85b1080 (diff) | |
| download | meta-openembedded-a1a0e8d91e15fb00abcdbd7efe90382b209193fc.tar.gz | |
nodejs: 10.16.2 -> 10.16.3
- update nodejs to active 10.x LTS release 10.16.3
- include fix multiple HTTP/2 vulnerabilities
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.16.3.bb')
| -rw-r--r-- | meta-oe/recipes-devtools/nodejs/nodejs_10.16.3.bb | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_10.16.3.bb b/meta-oe/recipes-devtools/nodejs/nodejs_10.16.3.bb new file mode 100644 index 0000000000..30724d41a1 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs_10.16.3.bb | |||
| @@ -0,0 +1,110 @@ | |||
| 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=be980eb7ccafe287cb438076a65e888c" | ||
| 5 | |||
| 6 | DEPENDS = "openssl" | ||
| 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 | file://0006-Use-target-ldflags.patch \ | ||
| 21 | " | ||
| 22 | SRC_URI_append_class-target = " \ | ||
| 23 | file://0002-Using-native-torque.patch \ | ||
| 24 | " | ||
| 25 | |||
| 26 | SRC_URI[md5sum] = "b41275a018e670947c1950b12f050a2f" | ||
| 27 | SRC_URI[sha256sum] = "7bf1123d7415964775b8f81fe6ec6dd5c3c08abb42bb71dfe4409dbeeba26bbd" | ||
| 28 | |||
| 29 | S = "${WORKDIR}/node-v${PV}" | ||
| 30 | |||
| 31 | # v8 errors out if you have set CCACHE | ||
| 32 | CCACHE = "" | ||
| 33 | |||
| 34 | def map_nodejs_arch(a, d): | ||
| 35 | import re | ||
| 36 | |||
| 37 | if re.match('i.86$', a): return 'ia32' | ||
| 38 | elif re.match('x86_64$', a): return 'x64' | ||
| 39 | elif re.match('aarch64$', a): return 'arm64' | ||
| 40 | elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64' | ||
| 41 | elif re.match('powerpc$', a): return 'ppc' | ||
| 42 | return a | ||
| 43 | |||
| 44 | ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \ | ||
| 45 | ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \ | ||
| 46 | bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \ | ||
| 47 | bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \ | ||
| 48 | '--with-arm-fpu=vfp', d), d), d)}" | ||
| 49 | GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' " | ||
| 50 | ARCHFLAGS ?= "" | ||
| 51 | |||
| 52 | PACKAGECONFIG ??= "zlib icu" | ||
| 53 | PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" | ||
| 54 | PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" | ||
| 55 | |||
| 56 | # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi | ||
| 57 | do_configure () { | ||
| 58 | rm -rf ${S}/deps/openssl | ||
| 59 | export LD="${CXX}" | ||
| 60 | GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES | ||
| 61 | # $TARGET_ARCH settings don't match --dest-cpu settings | ||
| 62 | ./configure --prefix=${prefix} --without-snapshot --shared-openssl \ | ||
| 63 | --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ | ||
| 64 | --dest-os=linux \ | ||
| 65 | ${ARCHFLAGS} \ | ||
| 66 | ${PACKAGECONFIG_CONFARGS} | ||
| 67 | } | ||
| 68 | |||
| 69 | do_compile () { | ||
| 70 | export LD="${CXX}" | ||
| 71 | oe_runmake BUILDTYPE=Release | ||
| 72 | } | ||
| 73 | |||
| 74 | do_install () { | ||
| 75 | oe_runmake install DESTDIR=${D} | ||
| 76 | } | ||
| 77 | |||
| 78 | do_install_append_class-native() { | ||
| 79 | # use node from PATH instead of absolute path to sysroot | ||
| 80 | # node-v0.10.25/tools/install.py is using: | ||
| 81 | # shebang = os.path.join(node_prefix, 'bin/node') | ||
| 82 | # update_shebang(link_path, shebang) | ||
| 83 | # and node_prefix can be very long path to bindir in native sysroot and | ||
| 84 | # when it exceeds 128 character shebang limit it's stripped to incorrect path | ||
| 85 | # and npm fails to execute like in this case with 133 characters show in log.do_install: | ||
| 86 | # 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 | ||
| 87 | # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js | ||
| 88 | # use sed on npm-cli.js because otherwise symlink is replaced with normal file and | ||
| 89 | # npm-cli.js continues to use old shebang | ||
| 90 | sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js | ||
| 91 | |||
| 92 | # Install the native torque to provide it within sysroot for the target compilation | ||
| 93 | install -d ${D}${bindir} | ||
| 94 | install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque | ||
| 95 | } | ||
| 96 | |||
| 97 | do_install_append_class-target() { | ||
| 98 | sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js | ||
| 99 | } | ||
| 100 | |||
| 101 | PACKAGES =+ "${PN}-npm" | ||
| 102 | FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx" | ||
| 103 | RDEPENDS_${PN}-npm = "bash python-core python-shell python-datetime python-subprocess python-textutils \ | ||
| 104 | python-compiler python-misc python-multiprocessing" | ||
| 105 | |||
| 106 | PACKAGES =+ "${PN}-systemtap" | ||
| 107 | FILES_${PN}-systemtap = "${datadir}/systemtap" | ||
| 108 | |||
| 109 | |||
| 110 | BBCLASSEXTEND = "native" | ||
