Re: [Update] lang/node 0.6.19 - 0.8.0

2012-06-26 Thread Aaron Bieber
On Mon, Jun 25, 2012 at 11:48:08AM -0600, Aaron Bieber wrote:
 On Mon, Jun 25, 2012 at 11:29:42AM -0600, Aaron Bieber wrote:
  Attached is a major update for node. It includes patches jeremy@ had
  sent in earlier for a chmod issue, an issue with node-gyp (this fix is
  applied in the build's version of node-gyp and in the sub-module of
  npm.) and also makes npm's dependencies global. 
  
  Port Changes:
  * Now builds with native openssl.
  * Now builds with native zlib.
  
  Node.JS Changelog:
  * V8: upgrade to v3.11.10.10
  * npm: Upgrade to 1.1.32
  * Deprecate iowatcher (Ben Noordhuis)
  * windows: update icon (Bert Belder)
  * http: Hush 'MUST NOT have a body' warnings to debug() (isaacs)
  * Move blog.nodejs.org content into repository (isaacs)
  * Fix #3503: stdin: resume() on pipe(dest) (isaacs)
  * crypto: fix error reporting in SetKey() (Fedor Indutny)
  * Add --no-deprecation and --trace-deprecation command-line flags (isaacs)
  * fs: fix fs.watchFile() (Ben Noordhuis)
  * fs: Fix fs.readfile() on pipes (isaacs)
  * Rename GYP variable node_use_system_openssl to be consistent (Ryan Dahl)
  
  Cheers,
  Aaron
  
 
 This fixes the manpage issue I overlooked.
 

One more quick update. :D  

This adds a bit more smarts to, and exposes node-gyp for hand-building of node 
modules ( non-port version of node-sqlite3 for example ). 

Index: Makefile
===
RCS file: /cvs/ports/lang/node/Makefile,v
retrieving revision 1.2
diff -N -u -p Makefile
--- Makefile6 Jun 2012 20:33:50 -   1.2
+++ Makefile26 Jun 2012 20:58:28 -
@@ -8,7 +8,8 @@ ONLY_FOR_ARCHS= amd64 i386
 
 COMMENT=   V8 JavaScript for clients and servers
 
-NODE_VERSION=  v0.6.19
+NODE_VERSION=  v0.8.0
+
 DISTNAME=  node-${NODE_VERSION}
 PKGNAME=   ${DISTNAME:S/v//g}
 
@@ -46,6 +47,8 @@ MODPY_ADJ_FILES=wscript \
 
 REGRESS_TARGET= test
 CONFIGURE_STYLE= simple
+CONFIGURE_ARGS= --openssl-use-sys \
+   --shared-zlib
 
 SUBST_VARS+=   CFLAGS
 SUBST_VARS+=   PREFIX
@@ -67,6 +70,12 @@ post-install:
${PREFIX}/lib/node/wafadmin
${INSTALL_DATA} ${FULLDISTDIR}/${DISTFILES} \
${PREFIX}/lib/node/${DISTFILES}
+   ln -s ${TRUEPREFIX}/lib/node_modules/npm/bin/node-gyp-bin/node-gyp \
+   ${PREFIX}/bin/node-gyp;
+   cd ${PREFIX}/lib/node_modules/npm/node_modules  for x in *; do \
+   mv $$x ../..; \
+   ln -s ../../$$x $$x; \
+   done
 
 
 .include bsd.port.mk
Index: distinfo
===
RCS file: /cvs/ports/lang/node/distinfo,v
retrieving revision 1.2
diff -N -u -p distinfo
--- distinfo6 Jun 2012 20:33:50 -   1.2
+++ distinfo26 Jun 2012 20:58:28 -
@@ -1,5 +1,5 @@
-MD5 (node-v0.6.19.tar.gz) = 9WaalxdCK4Eca60cyWGx5Q==
-RMD160 (node-v0.6.19.tar.gz) = pX8H0r8igvH4IAzW6X+wrisLBQI=
-SHA1 (node-v0.6.19.tar.gz) = 9sXPut/0eIrDqV+CY6DC9OB0RLY=
-SHA256 (node-v0.6.19.tar.gz) = TjMpJHewHfz1C8Yo1YD9WvPl/4B0kOxGRyuEEA+1L7s=
-SIZE (node-v0.6.19.tar.gz) = 10222697
+MD5 (node-v0.8.0.tar.gz) = fv3gCtMpLUxWrWB6tnbZNQ==
+RMD160 (node-v0.8.0.tar.gz) = rPBruqX+bnB+YMcZ8np6T58EEXI=
+SHA1 (node-v0.8.0.tar.gz) = UXH7Rvv+5axxKcSxcgej81ofV+g=
+SHA256 (node-v0.8.0.tar.gz) = 7K/KAYtRCaKFN2M9BDPVE/aLG65xkaGCHo6qhMzxKO4=
+SIZE (node-v0.8.0.tar.gz) = 11829547
Index: patches/patch-common_gypi
===
RCS file: patches/patch-common_gypi
diff -N -u -p patches/patch-common_gypi
--- /dev/null   26 Jun 2012 14:58:28 -
+++ patches/patch-common_gypi   26 Jun 2012 20:58:28 -
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- common.gypi.orig   Mon Jun 25 10:13:56 2012
 common.gypiMon Jun 25 10:14:18 2012
+@@ -149,7 +149,7 @@
+ 'cflags': [ '-m64' ],
+ 'ldflags': [ '-m64' ],
+   }],
+-  [ 'OS==linux', {
++  [ 'OS==linux or OS==openbsd', {
+ 'ldflags': [ '-rdynamic' ],
+   }],
+   [ 'OS==solaris', {
Index: patches/patch-deps_npm_bin_node-gyp-bin_node-gyp
===
RCS file: patches/patch-deps_npm_bin_node-gyp-bin_node-gyp
diff -N -u -p patches/patch-deps_npm_bin_node-gyp-bin_node-gyp
--- /dev/null   26 Jun 2012 14:58:28 -
+++ patches/patch-deps_npm_bin_node-gyp-bin_node-gyp26 Jun 2012 20:58:28 
-
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- deps/npm/bin/node-gyp-bin/node-gyp.origMon Jun 25 16:15:51 2012
 deps/npm/bin/node-gyp-bin/node-gyp Mon Jun 25 16:16:25 2012
+@@ -1,2 +1,16 @@
+ #!/usr/bin/env sh
+-node `dirname $0`/../../node_modules/node-gyp/bin/node-gyp.js $@
++
++# dirname $0 will have a different result when called internaly by node.
++
++DIR1=$( dirname $0 )/../../node_modules/node-gyp/bin/node-gyp.js
++DIR2=$( dirname $0 )/../lib/node_modules/node-gyp/bin/node-gyp.js
++
++if [ -e $DIR1 ]; then
++  node $DIR1 

Re: [Update] lang/node 0.6.19 - 0.8.0

2012-06-26 Thread Jeremy Evans
On 06/25 11:48, Aaron Bieber wrote:
 On Mon, Jun 25, 2012 at 11:29:42AM -0600, Aaron Bieber wrote:
  Attached is a major update for node. It includes patches jeremy@ had
  sent in earlier for a chmod issue, an issue with node-gyp (this fix is
  applied in the build's version of node-gyp and in the sub-module of
  npm.) and also makes npm's dependencies global. 
  
  Port Changes:
  * Now builds with native openssl.
  * Now builds with native zlib.
  
  Node.JS Changelog:
  * V8: upgrade to v3.11.10.10
  * npm: Upgrade to 1.1.32
  * Deprecate iowatcher (Ben Noordhuis)
  * windows: update icon (Bert Belder)
  * http: Hush 'MUST NOT have a body' warnings to debug() (isaacs)
  * Move blog.nodejs.org content into repository (isaacs)
  * Fix #3503: stdin: resume() on pipe(dest) (isaacs)
  * crypto: fix error reporting in SetKey() (Fedor Indutny)
  * Add --no-deprecation and --trace-deprecation command-line flags (isaacs)
  * fs: fix fs.watchFile() (Ben Noordhuis)
  * fs: Fix fs.readfile() on pipes (isaacs)
  * Rename GYP variable node_use_system_openssl to be consistent (Ryan Dahl)
  
  Cheers,
  Aaron
  
 
 This fixes the manpage issue I overlooked.

This patch looks OK to me.  Here's an update for the node ports I
maintain to work with node 0.8.0 (databases/node-pg, devel/node-fibers,
and security/node-bcrypt).  Tested on i386, compiles on amd64.

I see you sent another patch, and I think it's a good idea to expose
node-gyp for easier testing, but I haven't tested that patch.

Thanks,
Jeremy

Index: databases/node-pg/Makefile
===
RCS file: /cvs/ports/databases/node-pg/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- databases/node-pg/Makefile  23 May 2012 15:13:20 -  1.6
+++ databases/node-pg/Makefile  26 Jun 2012 20:26:54 -
@@ -2,12 +2,10 @@
 
 COMMENT =  postgresql client for nodejs
 
-NPM_VERSION =  0.6.10
+NPM_VERSION =  0.7.1
 NPM_NAME = pg
 CATEGORIES =   databases
 
-REVISION = 2
-
 MAINTAINER =   Jeremy Evans jer...@openbsd.org
 
 HOMEPAGE = https://github.com/brianc/node-postgres
@@ -28,6 +26,9 @@ BUILD_DEPENDS =   ${RUN_DEPENDS}
 LIB_DEPENDS =  databases/postgresql
 RUN_DEPENDS =  devel/node-generic-pool
 MODNODE_DEPENDS = generic-pool
+
+pre-configure:
+   ${SUBST_CMD} ${WRKSRC}/binding.gyp
 
 # Must have a database setup running on localhost with
 # user=postgres and password=1234
Index: databases/node-pg/distinfo
===
RCS file: /cvs/ports/databases/node-pg/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- databases/node-pg/distinfo  3 Apr 2012 18:49:11 -   1.1.1.1
+++ databases/node-pg/distinfo  26 Jun 2012 18:53:24 -
@@ -1,5 +1,5 @@
-MD5 (pg-0.6.10.tgz) = pa8l44un0/iJB2L6yC13ZA==
-RMD160 (pg-0.6.10.tgz) = pLXRvJFmaxivkkT99KK3LDhAcO0=
-SHA1 (pg-0.6.10.tgz) = CvdigcPpuS8fcfy1atUTeMthXKg=
-SHA256 (pg-0.6.10.tgz) = rDo0R2afDvQwu3MHxHivP/g8qlHfBwE7NIF9n61qHM4=
-SIZE (pg-0.6.10.tgz) = 51200
+MD5 (pg-0.7.1.tgz) = q1pH/uFVy5xHmzuOF0GlJg==
+RMD160 (pg-0.7.1.tgz) = NLac+igoRxGgLOgV7S9RP7c2o3s=
+SHA1 (pg-0.7.1.tgz) = 0aOa6pWT0TeIGdMDUkJosS8Ivcg=
+SHA256 (pg-0.7.1.tgz) = ZdlGVsl4g/8ks2dGT0f2gdDyimPMJOF5n2WPiRfjDWE=
+SIZE (pg-0.7.1.tgz) = 61440
Index: databases/node-pg/patches/patch-binding_gyp
===
RCS file: databases/node-pg/patches/patch-binding_gyp
diff -N databases/node-pg/patches/patch-binding_gyp
--- /dev/null   1 Jan 1970 00:00:00 -
+++ databases/node-pg/patches/patch-binding_gyp 26 Jun 2012 20:47:38 -
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- binding.gyp.orig   Mon Jun 18 20:44:42 2012
 binding.gypTue Jun 26 13:47:33 2012
+@@ -5,8 +5,8 @@
+   'sources': [
+ 'src/binding.cc'
+   ],
+-  'include_dirs': ['/usr/include/postgresql'],
+-  'libraries' : ['-lpq']
++  'include_dirs': ['${LOCALBASE}/include/postgresql'],
++  'libraries' : ['-L${LOCALBASE}/lib -lpq']
+ }
+   ]
+ }
Index: databases/node-pg/pkg/PLIST
===
RCS file: /cvs/ports/databases/node-pg/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- databases/node-pg/pkg/PLIST 3 Apr 2012 18:49:11 -   1.1.1.1
+++ databases/node-pg/pkg/PLIST 26 Jun 2012 20:49:48 -
@@ -1,6 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2012/04/03 18:49:11 jeremy Exp $
 lib/node_modules/pg/
-lib/node_modules/pg/.lock-wscript
 lib/node_modules/pg/.npmignore
 lib/node_modules/pg/Makefile
 lib/node_modules/pg/README.md
@@ -8,17 +7,30 @@ lib/node_modules/pg/benchmark/
 lib/node_modules/pg/benchmark/js-versus-native-bench.js
 lib/node_modules/pg/benchmark/large-datatset-bench.js
 lib/node_modules/pg/benchmark/simple-query-bench.js
+lib/node_modules/pg/binding.gyp
 lib/node_modules/pg/build/
-lib/node_modules/pg/build/.wafpickle-7
+lib/node_modules/pg/build/Makefile
 

[Update] lang/node 0.6.19 - 0.8.0

2012-06-25 Thread Aaron Bieber
Attached is a major update for node. It includes patches jeremy@ had
sent in earlier for a chmod issue, an issue with node-gyp (this fix is
applied in the build's version of node-gyp and in the sub-module of
npm.) and also makes npm's dependencies global. 

Port Changes:
* Now builds with native openssl.
* Now builds with native zlib.

Node.JS Changelog:
* V8: upgrade to v3.11.10.10
* npm: Upgrade to 1.1.32
* Deprecate iowatcher (Ben Noordhuis)
* windows: update icon (Bert Belder)
* http: Hush 'MUST NOT have a body' warnings to debug() (isaacs)
* Move blog.nodejs.org content into repository (isaacs)
* Fix #3503: stdin: resume() on pipe(dest) (isaacs)
* crypto: fix error reporting in SetKey() (Fedor Indutny)
* Add --no-deprecation and --trace-deprecation command-line flags (isaacs)
* fs: fix fs.watchFile() (Ben Noordhuis)
* fs: Fix fs.readfile() on pipes (isaacs)
* Rename GYP variable node_use_system_openssl to be consistent (Ryan Dahl)

Cheers,
Aaron

Index: Makefile
===
RCS file: /cvs/ports/lang/node/Makefile,v
retrieving revision 1.2
diff -N -u -p Makefile
--- Makefile6 Jun 2012 20:33:50 -   1.2
+++ Makefile25 Jun 2012 17:14:40 -
@@ -8,7 +8,8 @@ ONLY_FOR_ARCHS= amd64 i386
 
 COMMENT=   V8 JavaScript for clients and servers
 
-NODE_VERSION=  v0.6.19
+NODE_VERSION=  v0.8.0
+
 DISTNAME=  node-${NODE_VERSION}
 PKGNAME=   ${DISTNAME:S/v//g}
 
@@ -46,6 +47,8 @@ MODPY_ADJ_FILES=wscript \
 
 REGRESS_TARGET= test
 CONFIGURE_STYLE= simple
+CONFIGURE_ARGS= --openssl-use-sys \
+   --shared-zlib
 
 SUBST_VARS+=   CFLAGS
 SUBST_VARS+=   PREFIX
@@ -67,6 +70,10 @@ post-install:
${PREFIX}/lib/node/wafadmin
${INSTALL_DATA} ${FULLDISTDIR}/${DISTFILES} \
${PREFIX}/lib/node/${DISTFILES}
+   cd ${PREFIX}/lib/node_modules/npm/node_modules  for x in *; do \
+   mv $$x ../..; \
+   ln -s ../../$$x $$x; \
+   done
 
 
 .include bsd.port.mk
Index: distinfo
===
RCS file: /cvs/ports/lang/node/distinfo,v
retrieving revision 1.2
diff -N -u -p distinfo
--- distinfo6 Jun 2012 20:33:50 -   1.2
+++ distinfo25 Jun 2012 17:14:40 -
@@ -1,5 +1,5 @@
-MD5 (node-v0.6.19.tar.gz) = 9WaalxdCK4Eca60cyWGx5Q==
-RMD160 (node-v0.6.19.tar.gz) = pX8H0r8igvH4IAzW6X+wrisLBQI=
-SHA1 (node-v0.6.19.tar.gz) = 9sXPut/0eIrDqV+CY6DC9OB0RLY=
-SHA256 (node-v0.6.19.tar.gz) = TjMpJHewHfz1C8Yo1YD9WvPl/4B0kOxGRyuEEA+1L7s=
-SIZE (node-v0.6.19.tar.gz) = 10222697
+MD5 (node-v0.8.0.tar.gz) = fv3gCtMpLUxWrWB6tnbZNQ==
+RMD160 (node-v0.8.0.tar.gz) = rPBruqX+bnB+YMcZ8np6T58EEXI=
+SHA1 (node-v0.8.0.tar.gz) = UXH7Rvv+5axxKcSxcgej81ofV+g=
+SHA256 (node-v0.8.0.tar.gz) = 7K/KAYtRCaKFN2M9BDPVE/aLG65xkaGCHo6qhMzxKO4=
+SIZE (node-v0.8.0.tar.gz) = 11829547
Index: patches/patch-common_gypi
===
RCS file: patches/patch-common_gypi
diff -N -u -p patches/patch-common_gypi
--- /dev/null   25 Jun 2012 11:14:40 -
+++ patches/patch-common_gypi   25 Jun 2012 17:14:40 -
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- common.gypi.orig   Mon Jun 25 10:13:56 2012
 common.gypiMon Jun 25 10:14:18 2012
+@@ -149,7 +149,7 @@
+ 'cflags': [ '-m64' ],
+ 'ldflags': [ '-m64' ],
+   }],
+-  [ 'OS==linux', {
++  [ 'OS==linux or OS==openbsd', {
+ 'ldflags': [ '-rdynamic' ],
+   }],
+   [ 'OS==solaris', {
Index: patches/patch-deps_npm_lib_utils_cmd-shim_js
===
RCS file: patches/patch-deps_npm_lib_utils_cmd-shim_js
diff -N -u -p patches/patch-deps_npm_lib_utils_cmd-shim_js
--- /dev/null   25 Jun 2012 11:14:40 -
+++ patches/patch-deps_npm_lib_utils_cmd-shim_js25 Jun 2012 17:14:40 
-
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- deps/npm/lib/utils/cmd-shim.js.origMon Jun 25 10:35:23 2012
 deps/npm/lib/utils/cmd-shim.js Mon Jun 25 10:36:48 2012
+@@ -148,7 +148,16 @@ function writeShim_ (from, to, prog, args, cb) {
+ log.warn(shShim, Could not write +to)
+ return cb(er)
+   }
+-  fs.chmod(to, 0755, cb)
++  fs.stat(to, function (er, stats) {
++if (er) {
++  log.warn(Could not get stats for +to, shShim)
++  return cb(er)
++}
++if (stats.mode == 0755) {
++  return cb(er)
++}
++fs.chmod(to, 0755, cb)
++  })
+ })
+   })
+ }
Index: 
patches/patch-deps_npm_node_modules_node-gyp_legacy_tools_gyp_pylib_gyp_common_py
===
RCS file: 
patches/patch-deps_npm_node_modules_node-gyp_legacy_tools_gyp_pylib_gyp_common_py
diff -N -u -p 
patches/patch-deps_npm_node_modules_node-gyp_legacy_tools_gyp_pylib_gyp_common_py
--- /dev/null   25 Jun 2012 11:14:40 -
+++ 

Re: [Update] lang/node 0.6.19 - 0.8.0

2012-06-25 Thread Aaron Bieber
On Mon, Jun 25, 2012 at 11:29:42AM -0600, Aaron Bieber wrote:
 Attached is a major update for node. It includes patches jeremy@ had
 sent in earlier for a chmod issue, an issue with node-gyp (this fix is
 applied in the build's version of node-gyp and in the sub-module of
 npm.) and also makes npm's dependencies global. 
 
 Port Changes:
 * Now builds with native openssl.
 * Now builds with native zlib.
 
 Node.JS Changelog:
 * V8: upgrade to v3.11.10.10
 * npm: Upgrade to 1.1.32
 * Deprecate iowatcher (Ben Noordhuis)
 * windows: update icon (Bert Belder)
 * http: Hush 'MUST NOT have a body' warnings to debug() (isaacs)
 * Move blog.nodejs.org content into repository (isaacs)
 * Fix #3503: stdin: resume() on pipe(dest) (isaacs)
 * crypto: fix error reporting in SetKey() (Fedor Indutny)
 * Add --no-deprecation and --trace-deprecation command-line flags (isaacs)
 * fs: fix fs.watchFile() (Ben Noordhuis)
 * fs: Fix fs.readfile() on pipes (isaacs)
 * Rename GYP variable node_use_system_openssl to be consistent (Ryan Dahl)
 
 Cheers,
 Aaron
 

This fixes the manpage issue I overlooked.

Index: Makefile
===
RCS file: /cvs/ports/lang/node/Makefile,v
retrieving revision 1.2
diff -N -u -p Makefile
--- Makefile6 Jun 2012 20:33:50 -   1.2
+++ Makefile25 Jun 2012 17:45:24 -
@@ -8,7 +8,8 @@ ONLY_FOR_ARCHS= amd64 i386
 
 COMMENT=   V8 JavaScript for clients and servers
 
-NODE_VERSION=  v0.6.19
+NODE_VERSION=  v0.8.0
+
 DISTNAME=  node-${NODE_VERSION}
 PKGNAME=   ${DISTNAME:S/v//g}
 
@@ -46,6 +47,8 @@ MODPY_ADJ_FILES=wscript \
 
 REGRESS_TARGET= test
 CONFIGURE_STYLE= simple
+CONFIGURE_ARGS= --openssl-use-sys \
+   --shared-zlib
 
 SUBST_VARS+=   CFLAGS
 SUBST_VARS+=   PREFIX
@@ -67,6 +70,10 @@ post-install:
${PREFIX}/lib/node/wafadmin
${INSTALL_DATA} ${FULLDISTDIR}/${DISTFILES} \
${PREFIX}/lib/node/${DISTFILES}
+   cd ${PREFIX}/lib/node_modules/npm/node_modules  for x in *; do \
+   mv $$x ../..; \
+   ln -s ../../$$x $$x; \
+   done
 
 
 .include bsd.port.mk
Index: distinfo
===
RCS file: /cvs/ports/lang/node/distinfo,v
retrieving revision 1.2
diff -N -u -p distinfo
--- distinfo6 Jun 2012 20:33:50 -   1.2
+++ distinfo25 Jun 2012 17:45:24 -
@@ -1,5 +1,5 @@
-MD5 (node-v0.6.19.tar.gz) = 9WaalxdCK4Eca60cyWGx5Q==
-RMD160 (node-v0.6.19.tar.gz) = pX8H0r8igvH4IAzW6X+wrisLBQI=
-SHA1 (node-v0.6.19.tar.gz) = 9sXPut/0eIrDqV+CY6DC9OB0RLY=
-SHA256 (node-v0.6.19.tar.gz) = TjMpJHewHfz1C8Yo1YD9WvPl/4B0kOxGRyuEEA+1L7s=
-SIZE (node-v0.6.19.tar.gz) = 10222697
+MD5 (node-v0.8.0.tar.gz) = fv3gCtMpLUxWrWB6tnbZNQ==
+RMD160 (node-v0.8.0.tar.gz) = rPBruqX+bnB+YMcZ8np6T58EEXI=
+SHA1 (node-v0.8.0.tar.gz) = UXH7Rvv+5axxKcSxcgej81ofV+g=
+SHA256 (node-v0.8.0.tar.gz) = 7K/KAYtRCaKFN2M9BDPVE/aLG65xkaGCHo6qhMzxKO4=
+SIZE (node-v0.8.0.tar.gz) = 11829547
Index: patches/patch-common_gypi
===
RCS file: patches/patch-common_gypi
diff -N -u -p patches/patch-common_gypi
--- /dev/null   25 Jun 2012 11:45:24 -
+++ patches/patch-common_gypi   25 Jun 2012 17:45:24 -
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- common.gypi.orig   Mon Jun 25 10:13:56 2012
 common.gypiMon Jun 25 10:14:18 2012
+@@ -149,7 +149,7 @@
+ 'cflags': [ '-m64' ],
+ 'ldflags': [ '-m64' ],
+   }],
+-  [ 'OS==linux', {
++  [ 'OS==linux or OS==openbsd', {
+ 'ldflags': [ '-rdynamic' ],
+   }],
+   [ 'OS==solaris', {
Index: patches/patch-deps_npm_lib_utils_cmd-shim_js
===
RCS file: patches/patch-deps_npm_lib_utils_cmd-shim_js
diff -N -u -p patches/patch-deps_npm_lib_utils_cmd-shim_js
--- /dev/null   25 Jun 2012 11:45:24 -
+++ patches/patch-deps_npm_lib_utils_cmd-shim_js25 Jun 2012 17:45:24 
-
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- deps/npm/lib/utils/cmd-shim.js.origMon Jun 25 10:35:23 2012
 deps/npm/lib/utils/cmd-shim.js Mon Jun 25 10:36:48 2012
+@@ -148,7 +148,16 @@ function writeShim_ (from, to, prog, args, cb) {
+ log.warn(shShim, Could not write +to)
+ return cb(er)
+   }
+-  fs.chmod(to, 0755, cb)
++  fs.stat(to, function (er, stats) {
++if (er) {
++  log.warn(Could not get stats for +to, shShim)
++  return cb(er)
++}
++if (stats.mode == 0755) {
++  return cb(er)
++}
++fs.chmod(to, 0755, cb)
++  })
+ })
+   })
+ }
Index: 
patches/patch-deps_npm_node_modules_node-gyp_legacy_tools_gyp_pylib_gyp_common_py
===
RCS file: 
patches/patch-deps_npm_node_modules_node-gyp_legacy_tools_gyp_pylib_gyp_common_py
diff -N -u -p