summaryrefslogtreecommitdiffstats
path: root/recipes/nodejs
diff options
context:
space:
mode:
authorCliff Brake <cbrake@bec-systems.com>2010-09-13 14:15:35 -0400
committerCliff Brake <cbrake@bec-systems.com>2010-09-13 14:15:35 -0400
commit4ee358534793381d2e87b01781079a3354fd5c1c (patch)
tree729f8b0ce4bdbcd8a16f561fb68da0d66c3a3eb8 /recipes/nodejs
parentbeb17e26ee9b4bc0cf334c3b30560c6eb66b1299 (diff)
parenteda06ec3dde6169a46797f876a82499c4fff8f62 (diff)
downloadopenembedded-testing_2010-09-13.tar.gz
Merge branch 'org.openembedded.dev' into testing-nexttesting_2010-09-13
Diffstat (limited to 'recipes/nodejs')
-rw-r--r--recipes/nodejs/files/libev-cross-cc.patch18
-rw-r--r--recipes/nodejs/files/node-cross-cc.patch14
-rw-r--r--recipes/nodejs/files/node-dont-include-hosts-usr-include.patch22
-rw-r--r--recipes/nodejs/nodejs_0.2.0.bb32
4 files changed, 86 insertions, 0 deletions
diff --git a/recipes/nodejs/files/libev-cross-cc.patch b/recipes/nodejs/files/libev-cross-cc.patch
new file mode 100644
index 0000000000..446015b3cf
--- /dev/null
+++ b/recipes/nodejs/files/libev-cross-cc.patch
@@ -0,0 +1,18 @@
+diff --git node-v0.2.0/deps/libev/wscript.orig node-v0.2.0/deps/libev/wscript
+index 19e7bb2..f0a3d3b 100644
+--- node-v0.2.0/deps/libev/wscript.orig
++++ node-v0.2.0/deps/libev/wscript
+@@ -52,7 +52,12 @@ def configure(conf):
+ return 0;
+ }
+ """
+- conf.check_cc(fragment=code, define_name="HAVE_CLOCK_SYSCALL", execute=True,
++ # TODO determine this dynamically
++ CROSS = True
++ execute = True
++ if CROSS:
++ execute = False
++ conf.check_cc(fragment=code, define_name="HAVE_CLOCK_SYSCALL", execute=execute,
+ msg="Checking for SYS_clock_gettime")
+
+ have_librt = conf.check(lib='rt', uselib_store='RT')
diff --git a/recipes/nodejs/files/node-cross-cc.patch b/recipes/nodejs/files/node-cross-cc.patch
new file mode 100644
index 0000000000..48a6226a4b
--- /dev/null
+++ b/recipes/nodejs/files/node-cross-cc.patch
@@ -0,0 +1,14 @@
+diff --git node-v0.2.0/wscript.orig node-v0.2.0/wscript
+index df9ef53..a55d464 100644
+--- node-v0.2.0/wscript.orig
++++ node-v0.2.0/wscript
+@@ -326,6 +326,9 @@ def v8_cmd(bld, variant):
+ arch = ""
+ if bld.env['DEST_CPU'] == 'x86_64':
+ arch = "arch=x64"
++ # XXX Better support cross-compilation
++ else:
++ arch = "arch=" + bld.env['DEST_CPU']
+
+ if variant == "default":
+ mode = "release"
diff --git a/recipes/nodejs/files/node-dont-include-hosts-usr-include.patch b/recipes/nodejs/files/node-dont-include-hosts-usr-include.patch
new file mode 100644
index 0000000000..edbf7c4671
--- /dev/null
+++ b/recipes/nodejs/files/node-dont-include-hosts-usr-include.patch
@@ -0,0 +1,22 @@
+diff --git node-v0.2.0/wscript.orig node-v0.2.0/wscript
+index 3c5ebc5..905bd58 100644
+--- node-v0.2.0/wscript.orig
++++ node-v0.2.0/wscript
+@@ -162,11 +162,12 @@ def configure(conf):
+ if Options.options.efence:
+ conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE')
+
+- if not conf.check(lib="execinfo", includes=['/usr/include', '/usr/local/include'], libpath=['/usr/lib', '/usr/local/lib'], uselib_store="EXECINFO"):
+- # Note on Darwin/OS X: This will fail, but will still be used as the
+- # execinfo stuff are part of the standard library.
+- if sys.platform.startswith("freebsd"):
+- conf.fatal("Install the libexecinfo port from /usr/ports/devel/libexecinfo.")
++ # OpenEmbedded doesn't like us checking here
++ #if not conf.check(lib="execinfo", includes=['/usr/include', '/usr/local/include'], libpath=['/usr/lib', '/usr/local/lib'], uselib_store="EXECINFO"):
++ # # Note on Darwin/OS X: This will fail, but will still be used as the
++ # # execinfo stuff are part of the standard library.
++ # if sys.platform.startswith("freebsd"):
++ # conf.fatal("Install the libexecinfo port from /usr/ports/devel/libexecinfo.")
+
+ if not Options.options.without_ssl:
+ if conf.check_cfg(package='openssl',
diff --git a/recipes/nodejs/nodejs_0.2.0.bb b/recipes/nodejs/nodejs_0.2.0.bb
new file mode 100644
index 0000000000..7dfa04ef69
--- /dev/null
+++ b/recipes/nodejs/nodejs_0.2.0.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
+HOMEPAGE = "http://nodejs.org"
+LICENSE = "MIT"
+
+DEPENDS = "openssl"
+
+SRC_URI = " \
+ http://nodejs.org/dist/node-v${PV}.tar.gz \
+ file://node-cross-cc.patch \
+ file://libev-cross-cc.patch \
+ file://node-dont-include-hosts-usr-include.patch \
+"
+SRC_URI[md5sum] = "99a6dacc44b3f9c6ec376ccb446dd0b8"
+SRC_URI[sha256sum] = "3d3eff9287c9917af4044f3cef99ae5b17946710a71e83039de4fcb4b0a26631"
+
+S = "${WORKDIR}/node-v${PV}"
+
+# v8 errors out if you have set CCACHE
+CCACHE = ""
+
+do_configure () {
+ ./configure --prefix=${prefix} --without-snapshot
+}
+
+do_compile () {
+ make
+}
+
+do_install () {
+ DESTDIR=${D} oe_runmake install
+}
+