summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/nodejs
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-03-08 10:59:31 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2015-03-10 14:19:36 +0100
commit2aed4494954737ffabbbf89e022ebc2900414a6e (patch)
tree0506f3d4a557ebbc3873ea22e6a68f83b9439d73 /meta-oe/recipes-devtools/nodejs
parent97043618a265a464363218c8274ba0789012e941 (diff)
downloadmeta-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>
Diffstat (limited to 'meta-oe/recipes-devtools/nodejs')
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs_0.12.0.bb83
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs_0.8.18.bb44
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 000000000..b514837a1
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_0.12.0.bb
@@ -0,0 +1,83 @@
1DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
2HOMEPAGE = "http://nodejs.org"
3LICENSE = "MIT & BSD & Artistic-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=14115ff11211df04b031ec7d40b6d31b"
5
6DEPENDS = "openssl"
7
8SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.gz"
9SRC_URI[md5sum] = "62c8d9c74c8f68193f60e4cba020eb48"
10SRC_URI[sha256sum] = "9700e23af4e9b3643af48cef5f2ad20a1331ff531a12154eef2bfb0bb1682e32"
11
12S = "${WORKDIR}/node-v${PV}"
13
14# v8 errors out if you have set CCACHE
15CCACHE = ""
16
17def 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
26ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)}"
27GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "
28ARCHFLAGS ?= ""
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
31do_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
41do_compile () {
42 export LD="${CXX}"
43 make BUILDTYPE=Release
44}
45
46do_install () {
47 oe_runmake install DESTDIR=${D}
48}
49
50do_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
65do_install_append_class-target() {
66 sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${libdir}/node_modules/npm/bin/npm-cli.js
67}
68
69RDEPENDS_${PN} = "curl"
70RDEPENDS_${PN}_class-native = ""
71
72PACKAGES =+ "${PN}-npm"
73FILES_${PN}-npm = "${libdir}/node_modules ${bindir}/npm"
74RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils"
75
76PACKAGES =+ "${PN}-dtrace"
77FILES_${PN}-dtrace = "${libdir}/dtrace"
78
79PACKAGES =+ "${PN}-systemtap"
80FILES_${PN}-systemtap = "${datadir}/systemtap"
81
82
83BBCLASSEXTEND = "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 839bfa425..000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs_0.8.18.bb
+++ /dev/null
@@ -1,44 +0,0 @@
1SUMMARY = "nodeJS Evented I/O for V8 JavaScript"
2HOMEPAGE = "http://nodejs.org"
3LICENSE = "MIT & BSD"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=95a589a3257ab7dfe37d8a8379e3c72d"
5
6DEPENDS = "openssl"
7
8inherit pythonnative
9
10SRC_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"
13SRC_URI[md5sum] = "25ed6aa5710ac46b867ff3f17a4da1d6"
14SRC_URI[sha256sum] = "1d63dd42f9bd22f087585ddf80a881c6acbe1664891b1dda3b71306fe9ae00f9"
15
16S = "${WORKDIR}/node-v${PV}"
17
18# v8 errors out if you have set CCACHE
19CCACHE = ""
20
21ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)}"
22ARCHFLAGS ?= ""
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
25do_configure () {
26 export LD="${CXX}"
27
28 ./configure --prefix=${prefix} --without-snapshot ${ARCHFLAGS}
29}
30
31do_compile () {
32 export LD="${CXX}"
33 make BUILDTYPE=Release
34}
35
36do_install () {
37 oe_runmake install DESTDIR=${D}
38}
39
40RDEPENDS_${PN} = "curl python-shell python-datetime python-subprocess python-crypt python-textutils python-netclient "
41RDEPENDS_${PN}_class-native = ""
42
43FILES_${PN} += "${libdir}/node/wafadmin ${libdir}/node_modules ${libdir}/dtrace ${libdir}/*"
44BBCLASSEXTEND = "native"