diff options
| author | Khem Raj <raj.khem@gmail.com> | 2015-03-08 10:59:31 +0000 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-03-10 14:19:36 +0100 |
| commit | 2aed4494954737ffabbbf89e022ebc2900414a6e (patch) | |
| tree | 0506f3d4a557ebbc3873ea22e6a68f83b9439d73 | |
| parent | 97043618a265a464363218c8274ba0789012e941 (diff) | |
| download | meta-openembedded-2aed4494954737ffabbbf89e022ebc2900414a6e.tar.gz | |
nodejs: Upgrade to 0.12.0
Tested on mips1
Change-Id: I54211c2c323dbec1d38eb526ae183775ba3241f1
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | meta-oe/recipes-devtools/nodejs/nodejs_0.12.0.bb | 83 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/nodejs/nodejs_0.8.18.bb | 44 |
2 files changed, 83 insertions, 44 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_0.12.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_0.12.0.bb new file mode 100644 index 0000000000..b514837a1d --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs_0.12.0.bb | |||
| @@ -0,0 +1,83 @@ | |||
| 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=14115ff11211df04b031ec7d40b6d31b" | ||
| 5 | |||
| 6 | DEPENDS = "openssl" | ||
| 7 | |||
| 8 | SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz" | ||
| 9 | SRC_URI[md5sum] = "62c8d9c74c8f68193f60e4cba020eb48" | ||
| 10 | SRC_URI[sha256sum] = "9700e23af4e9b3643af48cef5f2ad20a1331ff531a12154eef2bfb0bb1682e32" | ||
| 11 | |||
| 12 | S = "${WORKDIR}/node-v${PV}" | ||
| 13 | |||
| 14 | # v8 errors out if you have set CCACHE | ||
| 15 | CCACHE = "" | ||
| 16 | |||
| 17 | def map_nodejs_arch(a, d): | ||
| 18 | import re | ||
| 19 | |||
| 20 | if re.match('p(pc|owerpc)(|64)', a): return 'ppc' | ||
| 21 | elif re.match('i.86$', a): return 'ia32' | ||
| 22 | elif re.match('x86_64$', a): return 'x64' | ||
| 23 | elif re.match('arm64$', a): return 'arm' | ||
| 24 | return a | ||
| 25 | |||
| 26 | ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)}" | ||
| 27 | GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' " | ||
| 28 | ARCHFLAGS ?= "" | ||
| 29 | |||
| 30 | # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi | ||
| 31 | do_configure () { | ||
| 32 | export LD="${CXX}" | ||
| 33 | GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES | ||
| 34 | # $TARGET_ARCH settings don't match --dest-cpu settings | ||
| 35 | ./configure --prefix=${prefix} --without-snapshot --shared-openssl \ | ||
| 36 | --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH', True), d)}" \ | ||
| 37 | --dest-os=linux \ | ||
| 38 | ${ARCHFLAGS} | ||
| 39 | } | ||
| 40 | |||
| 41 | do_compile () { | ||
| 42 | export LD="${CXX}" | ||
| 43 | make BUILDTYPE=Release | ||
| 44 | } | ||
| 45 | |||
| 46 | do_install () { | ||
| 47 | oe_runmake install DESTDIR=${D} | ||
| 48 | } | ||
| 49 | |||
| 50 | do_install_append_class-native() { | ||
| 51 | # use node from PATH instead of absolute path to sysroot | ||
| 52 | # node-v0.10.25/tools/install.py is using: | ||
| 53 | # shebang = os.path.join(node_prefix, 'bin/node') | ||
| 54 | # update_shebang(link_path, shebang) | ||
| 55 | # and node_prefix can be very long path to bindir in native sysroot and | ||
| 56 | # when it exceeds 128 character shebang limit it's stripped to incorrect path | ||
| 57 | # and npm fails to execute like in this case with 133 characters show in log.do_install: | ||
| 58 | # 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 | ||
| 59 | # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js | ||
| 60 | # use sed on npm-cli.js because otherwise symlink is replaced with normal file and | ||
| 61 | # npm-cli.js continues to use old shebang | ||
| 62 | sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${libdir}/node_modules/npm/bin/npm-cli.js | ||
| 63 | } | ||
| 64 | |||
| 65 | do_install_append_class-target() { | ||
| 66 | sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${libdir}/node_modules/npm/bin/npm-cli.js | ||
| 67 | } | ||
| 68 | |||
| 69 | RDEPENDS_${PN} = "curl" | ||
| 70 | RDEPENDS_${PN}_class-native = "" | ||
| 71 | |||
| 72 | PACKAGES =+ "${PN}-npm" | ||
| 73 | FILES_${PN}-npm = "${libdir}/node_modules ${bindir}/npm" | ||
| 74 | RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils" | ||
| 75 | |||
| 76 | PACKAGES =+ "${PN}-dtrace" | ||
| 77 | FILES_${PN}-dtrace = "${libdir}/dtrace" | ||
| 78 | |||
| 79 | PACKAGES =+ "${PN}-systemtap" | ||
| 80 | FILES_${PN}-systemtap = "${datadir}/systemtap" | ||
| 81 | |||
| 82 | |||
| 83 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_0.8.18.bb b/meta-oe/recipes-devtools/nodejs/nodejs_0.8.18.bb deleted file mode 100644 index 839bfa425f..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs_0.8.18.bb +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | SUMMARY = "nodeJS Evented I/O for V8 JavaScript" | ||
| 2 | HOMEPAGE = "http://nodejs.org" | ||
| 3 | LICENSE = "MIT & BSD" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=95a589a3257ab7dfe37d8a8379e3c72d" | ||
| 5 | |||
| 6 | DEPENDS = "openssl" | ||
| 7 | |||
| 8 | inherit pythonnative | ||
| 9 | |||
| 10 | SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz \ | ||
| 11 | file://0001-gcc-has-a-builtin-define-to-denote-hard-abi-when-in-.patch \ | ||
| 12 | " | ||
| 13 | SRC_URI[md5sum] = "25ed6aa5710ac46b867ff3f17a4da1d6" | ||
| 14 | SRC_URI[sha256sum] = "1d63dd42f9bd22f087585ddf80a881c6acbe1664891b1dda3b71306fe9ae00f9" | ||
| 15 | |||
| 16 | S = "${WORKDIR}/node-v${PV}" | ||
| 17 | |||
| 18 | # v8 errors out if you have set CCACHE | ||
| 19 | CCACHE = "" | ||
| 20 | |||
| 21 | ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)}" | ||
| 22 | ARCHFLAGS ?= "" | ||
| 23 | |||
| 24 | # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi | ||
| 25 | do_configure () { | ||
| 26 | export LD="${CXX}" | ||
| 27 | |||
| 28 | ./configure --prefix=${prefix} --without-snapshot ${ARCHFLAGS} | ||
| 29 | } | ||
| 30 | |||
| 31 | do_compile () { | ||
| 32 | export LD="${CXX}" | ||
| 33 | make BUILDTYPE=Release | ||
| 34 | } | ||
| 35 | |||
| 36 | do_install () { | ||
| 37 | oe_runmake install DESTDIR=${D} | ||
| 38 | } | ||
| 39 | |||
| 40 | RDEPENDS_${PN} = "curl python-shell python-datetime python-subprocess python-crypt python-textutils python-netclient " | ||
| 41 | RDEPENDS_${PN}_class-native = "" | ||
| 42 | |||
| 43 | FILES_${PN} += "${libdir}/node/wafadmin ${libdir}/node_modules ${libdir}/dtrace ${libdir}/*" | ||
| 44 | BBCLASSEXTEND = "native" | ||
