Fix node-gyp for native builds by using gmake (and add a run dep).

From Aaron Bieber, I also added a comment to the RUN_DEPENDS line.
This commit is contained in:
sthen 2012-05-08 15:38:01 +00:00
parent cae7ddee3a
commit 7b5d1808c7
2 changed files with 24 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.34 2012/05/07 20:11:47 jasper Exp $
# $OpenBSD: Makefile,v 1.35 2012/05/08 15:38:01 sthen Exp $
# XXX:
# - Needs __ARM_NR_cacheflush (or the like) to work on arm-based ports.
@ -11,7 +11,7 @@ COMMENT= V8 JavaScript for clients and servers
NODE_VERSION= v0.6.17
DISTNAME= node-${NODE_VERSION}
PKGNAME= ${DISTNAME:S/v//g}
REVISION= 0
REVISION= 1
CATEGORIES= www devel
@ -37,6 +37,8 @@ LIB_DEPENDS= devel/libexecinfo
USE_GMAKE= Yes
RUN_DEPENDS= devel/gmake # node-gyp uses it at runtime
MODPY_ADJ_FILES=wscript \
tools/node-waf \
tools/waf-light

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-deps_npm_node_modules_node-gyp_lib_build_js,v 1.1 2012/05/08 15:38:01 sthen Exp $
--- deps/npm/node_modules/node-gyp/lib/build.js.orig Mon May 7 19:33:03 2012
+++ deps/npm/node_modules/node-gyp/lib/build.js Mon May 7 19:33:59 2012
@@ -11,13 +11,15 @@ var fs = require('graceful-fs')
, which = require('which')
, mkdirp = require('./util/mkdirp')
, win = process.platform == 'win32'
+ , openbsd = process.platform == 'openbsd'
exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the module'
function build (gyp, argv, callback) {
gyp.verbose('build args', argv)
- var command = win ? 'msbuild' : 'make'
+ var builder = openbsd ? 'gmake' : 'make'
+ var command = win ? 'msbuild' : builder
, buildDir = path.resolve('build')
, configPath = path.resolve(buildDir, 'config.gypi')
, buildType