Finally update node to the latest version, lots of changes:

- Use internal OpenSSL (no LibreSSL :( )
 - Remove node.port.mk as there are no longer any modules in ports.
 - Remove various patches that are now upstream.
 - Fix some tests by telling test.py the fully qualified path to node
 - Add gcc as a RUN dep for building native node modules.
 - Clean up Makefile a bit.

OK juanfra@
This commit is contained in:
abieber 2015-10-24 02:46:47 +00:00
parent 96ac67b1bc
commit c620ea808c
17 changed files with 1209 additions and 628 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.33 2015/02/03 15:48:20 abieber Exp $
# $OpenBSD: Makefile,v 1.34 2015/10/24 02:46:47 abieber Exp $
# XXX:
# - Needs __ARM_NR_cacheflush (or the like) to work on arm-based ports.
@ -8,7 +8,7 @@ ONLY_FOR_ARCHS= amd64 i386
COMMENT= V8 JavaScript for clients and servers
NODE_VERSION= v0.10.35
NODE_VERSION= v4.2.1
DISTNAME= node-${NODE_VERSION}
PKGNAME= ${DISTNAME:S/v//g}
@ -24,33 +24,43 @@ PERMIT_PACKAGE_CDROM= Yes
MASTER_SITES= ${HOMEPAGE}dist/${NODE_VERSION}/
MODULES= lang/python
MODULES= gcc4 \
lang/python
WANTLIB += c crypto execinfo kvm m pthread ssl stdc++ util z
MODGCC4_LANGS = c c++
MODGCC4_ARCHS = *
WANTLIB += c execinfo kvm m pthread util z
LIB_DEPENDS= devel/libexecinfo
NODE_ARCH= i386
.if ${MACHINE_ARCH} == "amd64"
NODE_ARCH= x86_64
.endif
USE_GMAKE= Yes
BUILD_DEPENDS= devel/gyp \
sysutils/flock
BUILD_DEPENDS= sysutils/flock
# node-gyp uses it at runtime
RUN_DEPENDS= devel/gmake \
devel/gyp \
lang/gcc/${MODGCC4_VERSION} \
sysutils/flock
TEST_TARGET= test
CONFIGURE_STYLE= simple
CONFIGURE_ARGS= --openssl-use-sys \
TEST_TARGET= test
CONFIGURE_STYLE= simple
CONFIGURE_ARGS= --prefix=${PREFIX} \
--shared-zlib
SUBST_VARS+= CFLAGS
SUBST_VARS+= PREFIX
SUBST_VARS+= LOCALBASE
SUBST_VARS+= DISTFILES
SUBST_VARS+= LOCALBASE
SUBST_VARS+= NODE_ARCH
SUBST_VARS+= PREFIX
SUBST_VARS+= WRKDIST
MAKE_ENV+= V=1 CXX=c++ CCFLAGS+="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
MAKE_ENV+= V=1 CXX="${CXX}" CXXFLAGS="${CXXFLAGS}"
NO_CCACHE= Yes
@ -60,7 +70,8 @@ pre-configure:
${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}/common.gypi
${WRKDIST}/common.gypi \
${WRKDIST}/tools/test.py
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/node

View File

@ -1,2 +1,2 @@
SHA256 (node-v0.10.35.tar.gz) = AENla7FyTLCdvclgov1u4307rbL5x1VistESNdqkCgM=
SIZE (node-v0.10.35.tar.gz) = 14417025
SHA256 (node-v4.2.1.tar.gz) = iGG59MO02zgPzaGacQwEMMPWLQPuF2xk22Pu+VpnJmM=
SIZE (node-v4.2.1.tar.gz) = 22505860

View File

@ -1,94 +0,0 @@
# $OpenBSD: node.port.mk,v 1.4 2013/11/05 16:21:26 abieber Exp $
# node module
CATEGORIES += lang/node
BUILD_DEPENDS += lang/node>=0.6.17p2
RUN_DEPENDS += lang/node>=0.6.17p2
.if ${CONFIGURE_STYLE:L:Mnpm}
. if ${CONFIGURE_STYLE:L:Mext}
# Node C++ extensions are specific to an arch and are loaded as
# shared libraries, so set SHARED_ONLY and make sure PKG_ARCH=* is
# not set.
. if defined(PKG_ARCH) && ${PKG_ARCH} == *
ERRORS += "Fatal: Should not have PKG_ARCH=* when compiling extensions"
. endif
SHARED_ONLY = Yes
# All node extensions appear to link against these libraries
WANTLIB += m stdc++ crypto pthread ssl z
. else
# Node libraries that don't contain C++ extensions should run on
# any arch.
PKG_ARCH ?= *
. endif
# The npm package repository separates packages in different directories,
# so to eliminate duplication, you need to set the NPM_NAME and NPM_VERSION
# variables so it can use the correct DISTNAME and MASTER_SITES.
# The NPM_NAME is required anyway during the install tasks, so it may as
# well be used here.
DISTNAME ?= ${NPM_NAME}-${NPM_VERSION}
MASTER_SITES ?= ${MASTER_SITE_NPM}${NPM_NAME}/-/
EXTRACT_SUFX ?= .tgz
PKGNAME ?= node-${DISTNAME:S/^node-//}
MODNODE_BIN_NPM = ${LOCALBASE}/bin/npm
NPM_INSTALL_FILE = ${WRKDIR}/${DISTNAME}.tgz
NPM_TAR_DIR = package
WRKDIST = ${WRKDIR}/${NPM_TAR_DIR}
.if ${CONFIGURE_STYLE:L:Mexpresso}
TEST_DEPENDS += devel/node-expresso
MODNODE_TEST_TARGET = \
cd ${WRKDIST} && ${LOCALBASE}/bin/expresso;
.if !defined(do-test)
do-test:
${MODNODE_TEST_TARGET}
.endif
.else
TEST_TARGET ?= test
.endif
# List of npm package names to depend on. Only necessary
# if the current port depends on other node ports.
MODNODE_DEPENDS ?=
# Link all dependencies first so that npm will install without complaining.
# Then rebuild the distfile, since it may contain local patches.
# Then use npm install to install the package to a local node_modules dir.
MODNODE_BUILD_TARGET = \
cd ${WRKDIST} && find . -type f -name '*.orig' -print0 | \
xargs -r0 rm; \
for dep in ${MODNODE_DEPENDS}; do \
cd ${WRKDIR} && ${MODNODE_BIN_NPM} link $$dep; \
done; \
cd ${WRKDIR} && tar -zcf ${NPM_INSTALL_FILE} ${NPM_TAR_DIR}; \
cd ${WRKDIR} && HOME=${WRKDIR} ${MODNODE_BIN_NPM} install \
${NPM_INSTALL_FILE}
# Move just this package from the local node_modules dir to the global
# node_modules dir. If there are any binaries in the package, create
# symlinks in the default PATH that point to them.
MODNODE_INSTALL_TARGET = \
mkdir ${PREFIX}/lib/node_modules; \
mv ${WRKDIR}/node_modules/${NPM_NAME} ${PREFIX}/lib/node_modules; \
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/node_modules; \
if [ -d ${PREFIX}/lib/node_modules/${NPM_NAME}/bin ]; then \
cd ${PREFIX}/lib/node_modules/${NPM_NAME}/bin && \
for bin in *; do \
ln -s ${TRUEPREFIX}/lib/node_modules/${NPM_NAME}/bin/$$bin \
${PREFIX}/bin/$${bin%.js}; \
done; \
fi;
. if !target(do-build)
do-build:
${MODNODE_BUILD_TARGET}
. endif
. if !target(do-install)
do-install:
${MODNODE_INSTALL_TARGET}
. endif
.endif

View File

@ -1,17 +1,14 @@
$OpenBSD: patch-common_gypi,v 1.5 2014/07/10 19:53:30 landry Exp $
--- common.gypi.orig Fri May 2 02:47:47 2014
+++ common.gypi Thu Jul 10 16:15:20 2014
@@ -170,9 +170,12 @@
$OpenBSD: patch-common_gypi,v 1.6 2015/10/24 02:46:47 abieber Exp $
--- common.gypi.orig Wed Jan 14 10:19:02 2015
+++ common.gypi Wed Jan 14 10:21:39 2015
@@ -274,6 +274,10 @@
'ldflags': [
'-Wl,--export-dynamic',
],
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
- 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-pthread', ],
+ 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-pthread', '-I${LOCALBASE}/include'],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'ldflags': [ '-pthread', '-rdynamic' ],
+ 'libraries': [
+ '-L${LOCALBASE}/lib'
+ ],
'target_conditions': [
['_type=="static_library"', {
'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19
+ }],
+ ['OS=="openbsd"', {
+ 'cflags': [ '-I${LOCALBASE}/include' ],
+ 'libraries': [ '-L${LOCALBASE}/lib' ],
}]
],
}

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-deps_npm_bin_node-gyp-bin_node-gyp,v 1.1 2012/06/28 08:30:28 jasper Exp $
--- deps/npm/bin/node-gyp-bin/node-gyp.orig Mon 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" "$@"
+else
+ if [ -e $DIR2 ]; then
+ node "$DIR2" "$@"
+ else
+ echo "Can't find node-gyp.js!"
+ fi
+fi

View File

@ -1,14 +1,14 @@
$OpenBSD: patch-deps_npm_node_modules_node-gyp_lib_configure_js,v 1.3 2014/07/10 19:53:30 landry Exp $
$OpenBSD: patch-deps_npm_node_modules_node-gyp_lib_configure_js,v 1.4 2015/10/24 02:46:47 abieber Exp $
Make sure node-gyp is able to find a python executable.
--- deps/npm/node_modules/node-gyp/lib/configure.js.orig Fri May 2 02:47:47 2014
+++ deps/npm/node_modules/node-gyp/lib/configure.js Thu Jul 10 16:15:20 2014
@@ -22,7 +22,7 @@ exports.usage = 'Generates ' + (win ? 'MSVC project fi
--- deps/npm/node_modules/node-gyp/lib/configure.js.orig Wed Aug 12 09:46:10 2015
+++ deps/npm/node_modules/node-gyp/lib/configure.js Wed Aug 12 09:46:37 2015
@@ -23,7 +23,7 @@ exports.usage = 'Generates ' + (win ? 'MSVC project fi
function configure (gyp, argv, callback) {
- var python = gyp.opts.python || process.env.PYTHON || 'python'
- var python = gyp.opts.python || process.env.PYTHON || 'python2'
+ var python = gyp.opts.python || process.env.PYTHON || 'python${MODPY_VERSION}'
, buildDir = path.resolve('build')
, configNames = [ 'config.gypi', 'common.gypi' ]

View File

@ -1,107 +1,16 @@
$OpenBSD: patch-deps_npm_node_modules_node-gyp_lib_install_js,v 1.6 2014/09/24 18:17:27 abieber Exp $
$OpenBSD: patch-deps_npm_node_modules_node-gyp_lib_install_js,v 1.7 2015/10/24 02:46:47 abieber Exp $
Allow building of sub-packages (ie. node-sqlite3) with USE_SYSTRACE
set, also prevents downloading of the node distfile again.
--- deps/npm/node_modules/node-gyp/lib/install.js.orig Tue Sep 16 16:47:52 2014
+++ deps/npm/node_modules/node-gyp/lib/install.js Thu Sep 18 09:53:33 2014
@@ -225,38 +225,19 @@ function install (gyp, argv, callback) {
return
}
- var req = download(tarballUrl)
- if (!req) return
-
- // something went wrong downloading the tarball?
- req.on('error', function (err) {
- badDownload = true
- cb(err)
- })
-
- req.on('close', function () {
- if (extractCount === 0) {
- cb(new Error('Connection closed while downloading tarball file'))
+ // OpenBSD fix
+ var filePath = '${PREFIX}/lib/node/${DISTFILES}';
+ fs.stat(filePath, function(err, stat) {
+ if (err) {
+ throw err;
+ } else {
+ fs.createReadStream(filePath)
+ .pipe(gunzip)
+ .pipe(extracter)
}
})
+ // OpenBSD fix
- req.on('response', function (res) {
- if (res.statusCode !== 200) {
- badDownload = true
- cb(new Error(res.statusCode + ' status code downloading tarball'))
- return
- }
- // content checksum
- getContentSha(res, function (_, checksum) {
- var filename = path.basename(tarballUrl).trim()
- contentShasums[filename] = checksum
- log.verbose('content checksum', filename, checksum)
- })
-
- // start unzipping and untaring
- req.pipe(gunzip).pipe(extracter)
- })
-
// invoked after the tarball has finished being extracted
function afterTarball () {
if (badDownload) return
@@ -306,39 +287,17 @@ function install (gyp, argv, callback) {
}
function downloadShasums(done) {
- var shasumsFile = (checksumAlgo === 'sha256') ? 'SHASUMS256.txt' : 'SHASUMS.txt'
- log.verbose('check download content checksum, need to download `' + shasumsFile + '`...')
- var shasumsPath = path.resolve(devDir, shasumsFile)
- , shasumsUrl = distUrl + '/v' + version + '/' + shasumsFile
-
- log.verbose('checksum url', shasumsUrl)
- var req = download(shasumsUrl)
- if (!req) return
- req.on('error', done)
- req.on('response', function (res) {
- if (res.statusCode !== 200) {
- done(new Error(res.statusCode + ' status code downloading checksum'))
- return
- }
-
- var chunks = []
- res.on('data', function (chunk) {
- chunks.push(chunk)
- })
- res.on('end', function () {
- var lines = Buffer.concat(chunks).toString().trim().split('\n')
- lines.forEach(function (line) {
- var items = line.trim().split(/\s+/)
- if (items.length !== 2) return
-
- // 0035d18e2dcf9aad669b1c7c07319e17abfe3762 ./node-v0.11.4.tar.gz
- var name = items[1].replace(/^\.\//, '')
- expectShasums[name] = items[0]
- })
-
- log.verbose('checksum data', JSON.stringify(expectShasums))
- done()
- })
+ var shasum = crypto.createHash('sha1')
+ var filePath = '${PREFIX}/lib/node/${DISTFILES}'
+ var s = fs.ReadStream(filePath);
+ s.on('data', function(d) {
+ shasum.update(d);
+ })
+ s.on('end', function() {
+ var d = shasum.digest('hex');
+ expectShasums['${DISTFILES}'] = d
+ log.verbose('`SHASUMS.txt` data', JSON.stringify(expectShasums))
+ done()
})
--- deps/npm/node_modules/node-gyp/lib/install.js.orig Wed Sep 16 07:23:58 2015
+++ deps/npm/node_modules/node-gyp/lib/install.js Wed Sep 16 07:24:17 2015
@@ -178,7 +178,7 @@ function install (gyp, argv, callback) {
}
// now download the node tarball
- var tarPath = gyp.opts.tarball
+ var tarPath = gyp.opts['tarball'] || '${PREFIX}/lib/node/${DISTFILES}' // Fix for OpenBSD
var badDownload = false
, extractCount = 0
, gunzip = zlib.createGunzip()

View File

@ -1,47 +0,0 @@
$OpenBSD: patch-deps_uv_src_unix_openbsd_c,v 1.1 2014/07/10 19:54:57 landry Exp $
--- deps/uv/src/unix/openbsd.c.orig Fri May 2 02:47:47 2014
+++ deps/uv/src/unix/openbsd.c Thu Jul 10 21:11:18 2014
@@ -174,29 +174,26 @@ uv_err_t uv_get_process_title(char* buffer, size_t siz
uv_err_t uv_resident_set_memory(size_t* rss) {
- kvm_t *kd = NULL;
+
struct kinfo_proc *kinfo = NULL;
- pid_t pid;
- int nprocs, max_size = sizeof(struct kinfo_proc);
size_t page_size = getpagesize();
+ size_t size = sizeof(struct kinfo_proc);
- pid = getpid();
+ int mib[6];
- kd = kvm_open(NULL, _PATH_MEM, NULL, O_RDONLY, "kvm_open");
- if (kd == NULL) goto error;
-
- kinfo = kvm_getprocs(kd, KERN_PROC_PID, pid, max_size, &nprocs);
- if (kinfo == NULL) goto error;
-
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_PID;
+ mib[3] = getpid();
+ mib[4] = sizeof(struct kinfo_proc);
+ mib[5] = 1;
+ kinfo = malloc(size);
+ if (sysctl(mib, 6, kinfo, &size, NULL, 0) < 0) {
+ return uv__new_sys_error(errno);
+ }
*rss = kinfo->p_vm_rssize * page_size;
-
- kvm_close(kd);
-
+ free(kinfo);
return uv_ok_;
-
-error:
- if (kd) kvm_close(kd);
- return uv__new_sys_error(errno);
}

View File

@ -1,17 +1,18 @@
$OpenBSD: patch-deps_v8_Makefile,v 1.1 2013/10/22 15:29:14 abieber Exp $
--- deps/v8/Makefile.orig Mon Sep 30 14:52:48 2013
+++ deps/v8/Makefile Tue Oct 8 09:25:06 2013
@@ -254,14 +254,14 @@ clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)
OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ARCHES))
$(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
$OpenBSD: patch-deps_v8_Makefile,v 1.2 2015/10/24 02:46:47 abieber Exp $
--- deps/v8/Makefile.orig Wed Jan 14 10:23:35 2015
+++ deps/v8/Makefile Wed Jan 14 10:24:13 2015
@@ -426,7 +426,7 @@ $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
$(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@))))
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
GYP_GENERATORS=make \
- build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
+ gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=$(subst .,,$(suffix $@)) \
-S.$(subst .,,$(suffix $@)) $(GYPFLAGS)
-Dv8_target_arch=$(V8_TARGET_ARCH) \
$(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \
@@ -437,7 +437,7 @@ $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \
GYP_GENERATORS=make \
- build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
+ gyp --generator-output="$(OUTDIR)" build/all.gyp \

View File

@ -1,22 +0,0 @@
$OpenBSD: patch-deps_v8_build_common_gypi,v 1.1 2013/10/22 15:29:14 abieber Exp $
--- deps/v8/build/common.gypi.orig Mon Sep 30 14:52:48 2013
+++ deps/v8/build/common.gypi Tue Oct 8 09:25:17 2013
@@ -92,7 +92,7 @@
'v8_use_snapshot%': 'true',
'host_os%': '<(OS)',
'v8_use_liveobjectlist%': 'false',
- 'werror%': '-Werror',
+ 'werror%': '',
# With post mortem support enabled, metadata is embedded into libv8 that
# describes various parameters of the VM for use by debuggers. See
@@ -324,6 +324,9 @@
}],
['OS=="freebsd" or OS=="openbsd"', {
'cflags': [ '-I/usr/local/include' ],
+ 'libraries': [
+ '-L/usr/local/lib -lexecinfo',
+ ]
}],
['OS=="netbsd"', {
'cflags': [ '-I/usr/pkg/include' ],

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-deps_v8_src_heap_cc,v 1.4 2013/10/22 15:29:14 abieber Exp $
--- deps/v8/src/heap.cc.orig Mon Sep 30 14:52:48 2013
+++ deps/v8/src/heap.cc Tue Oct 8 09:25:37 2013
@@ -5888,6 +5888,29 @@ bool Heap::ConfigureHeap(int max_semispace_size,
initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_);
external_allocation_limit_ = 16 * max_semispace_size_;
+ intptr_t max_virtual = OS::MaxVirtualMemory();
+
+ if (max_virtual > 0) {
+ intptr_t half = max_virtual >> 1;
+ intptr_t quarter = max_virtual >> 2;
+ // If we have limits on the amount of virtual memory we can use then we may
+ // be forced to lower the allocation limits. We reserve one quarter of the
+ // memory for young space and off-heap data. The rest is distributed as
+ // described below.
+ if (code_range_size_ > 0) {
+ // Reserve a quarter of the memory for the code range. The old space
+ // heap gets the remaining half. There is some unavoidable double
+ // counting going on here since the heap size is measured in committed
+ // virtual memory and the code range is only reserved virtual memory.
+ code_range_size_ = Min(code_range_size_, quarter);
+ max_old_generation_size_ = Min(max_old_generation_size_, half);
+ } else {
+ // Reserve three quarters of the memory for the old space heap including
+ // the executable code.
+ max_old_generation_size_ = Min(max_old_generation_size_, half + quarter);
+ }
+ }
+
// The old generation is paged and needs at least one page for each space.
int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1;
max_old_generation_size_ = Max(static_cast<intptr_t>(paged_space_count *

View File

@ -1,14 +1,12 @@
$OpenBSD: patch-deps_v8_tools_gyp_v8_gyp,v 1.1 2013/10/22 15:29:14 abieber Exp $
--- deps/v8/tools/gyp/v8.gyp.orig Mon Sep 30 14:52:48 2013
+++ deps/v8/tools/gyp/v8.gyp Tue Oct 8 09:25:50 2013
@@ -74,8 +74,8 @@
'OTHER_LDFLAGS': ['-dynamiclib', '-all_load']
},
}],
- ['soname_version!=""', {
- 'product_extension': 'so.<(soname_version)',
+ ['soname_version!="-1"', {
+ 'product_extension': 'so.${LIBv8_VERSION}',
}],
],
},
$OpenBSD: patch-deps_v8_tools_gyp_v8_gyp,v 1.2 2015/10/24 02:46:47 abieber Exp $
--- deps/v8/tools/gyp/v8.gyp.orig Wed Jan 14 10:31:51 2015
+++ deps/v8/tools/gyp/v8.gyp Wed Jan 14 10:33:01 2015
@@ -110,7 +110,7 @@
},
}],
['soname_version!=""', {
- 'product_extension': 'so.<(soname_version)',
+ 'product_extension': 'so.${LIBv8_VERSION}',
}],
],
},

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-lib_module_js,v 1.3 2014/07/10 19:53:30 landry Exp $
--- lib/module.js.orig Fri May 2 02:47:47 2014
+++ lib/module.js Thu Jul 10 16:15:20 2014
@@ -510,6 +510,8 @@ Module._initPaths = function() {
var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
+ paths.unshift(path.resolve('${TRUEPREFIX}', 'lib', 'node_modules'));
+
if (homeDir) {
paths.unshift(path.resolve(homeDir, '.node_libraries'));
paths.unshift(path.resolve(homeDir, '.node_modules'));

View File

@ -1,18 +1,8 @@
$OpenBSD: patch-node_gyp,v 1.2 2014/07/10 19:53:30 landry Exp $
--- node.gyp.orig Fri May 2 02:47:47 2014
+++ node.gyp Thu Jul 10 15:58:13 2014
@@ -144,6 +144,9 @@
],
'conditions': [
+ [ 'OS=="openbsd"', {
+ 'ldflags': [ '-rdynamic' ],
+ }],
[ 'node_use_openssl=="true"', {
'defines': [ 'HAVE_OPENSSL=1' ],
'sources': [ 'src/node_crypto.cc' ],
@@ -271,7 +274,7 @@
'PLATFORM="darwin"',
$OpenBSD: patch-node_gyp,v 1.3 2015/10/24 02:46:47 abieber Exp $
--- node.gyp.orig Wed Jan 14 10:27:01 2015
+++ node.gyp Wed Jan 14 10:29:27 2015
@@ -344,7 +344,7 @@
'NODE_PLATFORM="darwin"',
],
}],
- [ 'OS=="freebsd"', {
@ -20,3 +10,13 @@ $OpenBSD: patch-node_gyp,v 1.2 2014/07/10 19:53:30 landry Exp $
'libraries': [
'-lutil',
'-lkvm',
@@ -363,6 +363,9 @@
# rather than gyp's preferred "solaris"
'NODE_PLATFORM="sunos"',
],
+ }],
+ [ 'OS=="openbsd"', {
+ 'ldflags': [ '-rdynamic' ],
}],
[ 'OS=="freebsd" or OS=="linux"', {
'ldflags': [ '-Wl,-z,noexecstack' ],

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-tools_gyp_node_py,v 1.1 2013/12/04 20:20:52 abieber Exp $
--- tools/gyp_node.py.orig Tue Nov 12 13:22:12 2013
+++ tools/gyp_node.py Thu Nov 21 08:11:05 2013
@@ -7,7 +7,7 @@ import sys
script_dir = os.path.dirname(__file__)
node_root = os.path.normpath(os.path.join(script_dir, os.pardir))
-sys.path.insert(0, os.path.join(node_root, 'tools', 'gyp', 'pylib'))
+# Use gyp from ports for OpenBSD
import gyp
# Directory within which we want all generated files (including Makefiles)

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-tools_test_py,v 1.1 2015/10/24 02:46:47 abieber Exp $
--- tools/test.py.orig Thu Oct 22 13:48:11 2015
+++ tools/test.py Thu Oct 22 14:55:03 2015
@@ -773,9 +773,9 @@ class Context(object):
def GetVm(self, arch, mode):
if arch == 'none':
- name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node'
+ name = '${WRKDIST}/out/Debug/node' if mode == 'debug' else '${WRKDIST}/out/Release/node'
else:
- name = 'out/%s.%s/node' % (arch, mode)
+ name = '${WRKDIST}/out/%s.%s/node' % (arch, mode)
# Currently GYP does not support output_dir for MSVS.
# http://code.google.com/p/gyp/issues/detail?id=40

File diff suppressed because it is too large Load Diff