Hola,

Given jeremy@'s recent plv8 port, it seems that we need a shared v8.

Here is a WIP I have had floating around for a bit.  It adds devel/gyp
and devel/v8.

Also here is a diff to make node play.

Looking for clue sticks and testing.

Cheers,
Aaron

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/node/Makefile,v
retrieving revision 1.10
diff -N -u -p Makefile
--- Makefile    28 Sep 2012 01:04:14 -0000      1.10
+++ Makefile    9 Oct 2012 19:13:49 -0000
@@ -13,6 +13,8 @@ NODE_VERSION= v0.8.11
 DISTNAME=      node-${NODE_VERSION}
 PKGNAME=       ${DISTNAME:S/v//g}
 
+REVISION=0
+
 CATEGORIES=    lang devel
 
 HOMEPAGE=      http://nodejs.org/
@@ -37,7 +39,9 @@ LIB_DEPENDS=  devel/libexecinfo
 
 USE_GMAKE=     Yes
 
-BUILD_DEPENDS= sysutils/flock
+BUILD_DEPENDS= sysutils/flock \
+               devel/v8
+
 # node-gyp uses it at runtime
 RUN_DEPENDS=   devel/gmake \
                sysutils/flock
@@ -48,7 +52,8 @@ MODPY_ADJ_FILES= tools/node-waf \
 REGRESS_TARGET= test
 CONFIGURE_STYLE= simple
 CONFIGURE_ARGS= --openssl-use-sys \
-               --shared-zlib
+               --shared-zlib \
+               --shared-v8
 
 SUBST_VARS+=   CFLAGS
 SUBST_VARS+=   PREFIX
@@ -63,7 +68,8 @@ pre-configure:
        ln -sf ${LOCALBASE}/bin/python${MODPY_VERSION} ${WRKDIR}/bin/python
        ${SUBST_CMD} ${WRKDIST}/lib/module.js \
                ${WRKDIST}/deps/npm/node_modules/node-gyp/lib/configure.js \
-               ${WRKDIST}/deps/npm/node_modules/node-gyp/lib/install.js
+               ${WRKDIST}/deps/npm/node_modules/node-gyp/lib/install.js \
+               ${WRKDIST}/common.gypi
 
 post-install:
        ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
Index: patches/patch-common_gypi
===================================================================
RCS file: /cvs/ports/lang/node/patches/Attic/patch-common_gypi,v
diff -N -u -p patches/patch-common_gypi
--- /dev/null   9 Oct 2012 13:13:49 -0000
+++ patches/patch-common_gypi   9 Oct 2012 19:13:49 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+--- common.gypi.orig   Thu Sep 27 10:39:23 2012
++++ common.gypi        Tue Oct  9 13:01:32 2012
+@@ -161,9 +161,12 @@
+         ],
+       }],
+       [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
+-        'cflags': [ '-Wall', '-pthread', ],
++        'cflags': [ '-Wall', '-pthread', '-I${PREFIX}/include'],
+         'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
+         'ldflags': [ '-pthread', '-rdynamic' ],
++        'libraries': [
++          '-L${PREFIX}/lib'
++        ],
+         'conditions': [
+           [ 'target_arch=="ia32"', {
+             'cflags': [ '-m32' ],

Attachment: gyp.tar.gz
Description: application/tar-gz

Attachment: v8.tar.gz
Description: application/tar-gz

Reply via email to