Bump node to latest. Tested on amd64 and i386.

- fix Makefile layout
- back to using internal openssl :(

Rough OK from awolk@, OK fcambus@
This commit is contained in:
abieber 2017-01-23 16:47:04 +00:00
parent c549aff397
commit d128aa5058
7 changed files with 920 additions and 636 deletions

View File

@ -1,77 +1,71 @@
# $OpenBSD: Makefile,v 1.53 2016/12/31 20:46:18 jca Exp $
# $OpenBSD: Makefile,v 1.54 2017/01/23 16:47:04 abieber Exp $
# XXX:
# - Needs __ARM_NR_cacheflush (or the like) to work on arm-based ports.
# - Needs bundled libcares as arpa/nameser.h does not include ns_t_a.
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS = amd64 i386
USE_WXNEEDED = Yes
USE_WXNEEDED = Yes
COMMENT= V8 JavaScript for clients and servers
COMMENT = V8 JavaScript for clients and servers
NODE_VERSION= v4.4.7
REVISION= 2
NODE_VERSION = v6.9.4
PLEDGE_VER= 1.1.0
DISTFILES= node-pledge-{}${PLEDGE_VER}.tar.gz:0 ${DISTNAME}.tar.gz
PLEDGE_VER = 1.1.0
DISTFILES = node-pledge-{}${PLEDGE_VER}.tar.gz:0 ${DISTNAME}.tar.gz
DISTNAME= node-${NODE_VERSION}
PKGNAME= ${DISTNAME:S/v//g}
DISTNAME = node-${NODE_VERSION}
PKGNAME = ${DISTNAME:S/v//g}
MASTER_SITES0= https://github.com/qbit/node-pledge/archive/
MASTER_SITES0 = https://github.com/qbit/node-pledge/archive/
CATEGORIES= lang devel
CATEGORIES = lang devel
HOMEPAGE= http://nodejs.org/
HOMEPAGE = http://nodejs.org/
MAINTAINER= Aaron Bieber <abieber@openbsd.org>
MAINTAINER = Aaron Bieber <abieber@openbsd.org>
# MIT
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_CDROM = Yes
MASTER_SITES= ${HOMEPAGE}dist/${NODE_VERSION}/
MASTER_SITES = ${HOMEPAGE}dist/${NODE_VERSION}/
MODULES= gcc4 \
lang/python
MODULES = gcc4 \
lang/python
MODGCC4_LANGS = c c++
MODGCC4_ARCHS = *
MODGCC4_LANGS = c c++
MODGCC4_ARCHS = *
WANTLIB += c execinfo lib/eopenssl/crypto lib/eopenssl/ssl kvm m pthread
WANTLIB += util z
WANTLIB += c execinfo kvm m pthread util z
LIB_DEPENDS= devel/libexecinfo \
security/openssl
LIB_DEPENDS = devel/libexecinfo
USE_GMAKE= Yes
USE_GMAKE = Yes
BUILD_DEPENDS= sysutils/flock
BUILD_DEPENDS = sysutils/flock
RUN_DEPENDS= devel/gmake \
lang/gcc/${MODGCC4_VERSION},-c++ \
sysutils/flock
RUN_DEPENDS = devel/gmake \
lang/gcc/${MODGCC4_VERSION},-c++ \
sysutils/flock
TEST_TARGET= test
CONFIGURE_STYLE= simple
TEST_TARGET = test
CONFIGURE_STYLE = simple
# libpath and includes aren't picked up, but I added them here as a note.
# The patch for node.gyp is where they are actually being set.
CONFIGURE_ARGS= --prefix=${PREFIX} \
--shared-openssl \
--shared-openssl-includes=${LOCALBASE}/include/eopenssl \
--shared-openssl-libpath=${LOCALBASE}/lib/eopenssl \
--shared-zlib
CONFIGURE_ARGS = --prefix=${PREFIX} \
--shared-zlib
SUBST_VARS+= DISTNAME
SUBST_VARS+= DISTFILES
SUBST_VARS+= EXTRACT_SUFX
SUBST_VARS+= LOCALBASE
SUBST_VARS+= PREFIX
SUBST_VARS+= WRKDIST
SUBST_VARS += DISTNAME
SUBST_VARS += DISTFILES
SUBST_VARS += EXTRACT_SUFX
SUBST_VARS += LOCALBASE
SUBST_VARS += PREFIX
SUBST_VARS += WRKDIST
MAKE_ENV+= V=1 CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
MAKE_ENV += V=1 CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
do-extract:
mkdir ${WRKSRC}; \

View File

@ -1,4 +1,4 @@
SHA256 (node-pledge-1.1.0.tar.gz) = BuKnrXSkqpTb5Tfap1AHk+l7ucTJLEWbMFNbgQkNBsw=
SHA256 (node-v4.4.7.tar.gz) = y+HG5CGWndVjnQ+6ptPB9WwEY7h+/nW+hZRjjaTY/E8=
SHA256 (node-v6.9.4.tar.gz) = 8CV8g+teiw57CdtyZNwek+HwJMbfzLCYNjtPsMGSz38=
SIZE (node-pledge-1.1.0.tar.gz) = 2560
SIZE (node-v4.4.7.tar.gz) = 22615690
SIZE (node-v6.9.4.tar.gz) = 26379683

View File

@ -1,37 +1,37 @@
$OpenBSD: patch-deps_npm_lib_build_js,v 1.2 2014/01/20 19:42:00 abieber Exp $
--- deps/npm/lib/build.js.orig Wed Dec 18 16:49:45 2013
+++ deps/npm/lib/build.js Mon Dec 23 09:25:46 2013
@@ -175,17 +175,23 @@ function linkBins (pkg, folder, parent, gtop, cb) {
// bins should always be executable.
// XXX skip chmod on windows?
var src = path.resolve(folder, pkg.bin[b])
- fs.chmod(src, npm.modes.exec, function (er) {
- if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) {
- return cb()
+ fs.lstat(folder, function (er,stat) {
+ if (!stat.isSymbolicLink) {
+ fs.chmod(src, npm.modes.exec, function (er) {
+ if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) {
+ return cb()
+ }
+ if (er || !gtop) return cb(er)
+ var dest = path.resolve(binRoot, b)
+ , out = npm.config.get("parseable")
+ ? dest + "::" + src + ":BINFILE"
+ : dest + " -> " + src
+ console.log(out)
+ cb()
+ })
+ } else {
+ cb()
}
- if (er || !gtop) return cb(er)
- var dest = path.resolve(binRoot, b)
- , out = npm.config.get("parseable")
- ? dest + "::" + src + ":BINFILE"
- : dest + " -> " + src
- console.log(out)
- cb()
})
})
}, cb)
$OpenBSD: patch-deps_npm_lib_build_js,v 1.3 2017/01/23 16:47:04 abieber Exp $
--- deps/npm/lib/build.js.orig Thu Nov 3 08:07:29 2016
+++ deps/npm/lib/build.js Thu Nov 3 08:11:47 2016
@@ -203,17 +203,23 @@ function linkBins (pkg, folder, parent, gtop, cb) {
// bins should always be executable.
// XXX skip chmod on windows?
var src = path.resolve(folder, pkg.bin[b])
- fs.chmod(src, npm.modes.exec, function (er) {
- if (er && er.code === 'ENOENT' && npm.config.get('ignore-scripts')) {
- return cb()
+ fs.lstat(folder, function (er,stat) {
+ if (!stat.isSymbolicLink) {
+ fs.chmod(src, npm.modes.exec, function (er) {
+ if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) {
+ return cb()
+ }
+ if (er || !gtop) return cb(er)
+ var dest = path.resolve(binRoot, b)
+ , out = npm.config.get("parseable")
+ ? dest + "::" + src + ":BINFILE"
+ : dest + " -> " + src
+ console.log(out)
+ cb()
+ })
+ } else {
+ cb()
}
- if (er || !gtop) return cb(er)
- var dest = path.resolve(binRoot, b)
- var out = npm.config.get('parseable')
- ? dest + '::' + src + ':BINFILE'
- : dest + ' -> ' + src
- output(out)
- cb()
})
}
)

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-deps_npm_lib_npm_js,v 1.3 2014/07/10 19:53:30 landry Exp $
--- deps/npm/lib/npm.js.orig Fri May 2 02:47:47 2014
+++ deps/npm/lib/npm.js Thu Jul 10 15:58:13 2014
@@ -368,7 +368,7 @@ function load (npm, cli, cb) {
}
}
$OpenBSD: patch-deps_npm_lib_npm_js,v 1.4 2017/01/23 16:47:04 abieber Exp $
--- deps/npm/lib/npm.js.orig Mon Dec 12 11:29:06 2016
+++ deps/npm/lib/npm.js Mon Dec 12 11:29:39 2016
@@ -288,7 +288,7 @@
// go ahead and spin up the registry client.
npm.registry = new CachingRegClient(npm.config)
- var umask = npm.config.get("umask")
+ var umask = 0022
npm.modes = { exec: 0777 & (~umask)
, file: 0666 & (~umask)
, umask: umask }
- var umask = npm.config.get('umask')
+ var umask = npm.config.get('umask') || 0022
npm.modes = {
exec: parseInt('0777', 8) & (~umask),
file: parseInt('0666', 8) & (~umask),

View File

@ -1,27 +1,7 @@
$OpenBSD: patch-node_gyp,v 1.4 2016/01/29 20:12:04 abieber Exp $
--- node.gyp.orig Thu Jan 21 11:35:03 2016
+++ node.gyp Fri Jan 29 07:09:26 2016
@@ -11,6 +11,8 @@
'node_shared_libuv%': 'false',
'node_use_openssl%': 'true',
'node_shared_openssl%': 'false',
+ 'node_shared_openssl_includes%': '${LOCALBASE}/include/eopenssl',
+ 'node_shared_openssl_libpath%': '${LOCALBASE}/lib/eopenssl',
'node_v8_options%': '',
'node_target_type%': 'executable',
'node_core_target_name%': 'node',
@@ -236,6 +238,10 @@
['openssl_fips != ""', {
'defines': [ 'NODE_FIPS_MODE' ],
}],
+ [ 'node_shared_openssl=="true"', {
+ 'ldflags': [ '-L<(node_shared_openssl_libpath) -Wl,-rpath,${LOCALBASE}/lib/eopenssl' ],
+ 'include_dirs': [ '<(node_shared_openssl_includes)' ],
+ }],
[ 'node_shared_openssl=="false"', {
'dependencies': [
'./deps/openssl/openssl.gyp:openssl',
@@ -392,7 +398,7 @@
$OpenBSD: patch-node_gyp,v 1.5 2017/01/23 16:47:04 abieber Exp $
--- node.gyp.orig Wed Oct 19 16:02:10 2016
+++ node.gyp Thu Nov 3 08:23:16 2016
@@ -522,7 +522,7 @@
'NODE_PLATFORM="darwin"',
],
}],
@ -30,7 +10,7 @@ $OpenBSD: patch-node_gyp,v 1.4 2016/01/29 20:12:04 abieber Exp $
'libraries': [
'-lutil',
'-lkvm',
@@ -416,6 +422,9 @@
@@ -546,6 +546,9 @@
# rather than gyp's preferred "solaris"
'NODE_PLATFORM="sunos"',
],
@ -38,5 +18,5 @@ $OpenBSD: patch-node_gyp,v 1.4 2016/01/29 20:12:04 abieber Exp $
+ [ 'OS=="openbsd"', {
+ 'ldflags': [ '-rdynamic' ],
}],
[ 'OS=="freebsd" or OS=="linux"', {
[ '(OS=="freebsd" or OS=="linux") and node_shared=="false"', {
'ldflags': [ '-Wl,-z,noexecstack',

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-tools_icu_icu-generic_gyp,v 1.1 2017/01/23 16:47:04 abieber Exp $
--- tools/icu/icu-generic.gyp.orig Fri Jan 13 11:11:27 2017
+++ tools/icu/icu-generic.gyp Fri Jan 13 11:12:05 2017
@@ -560,6 +560,7 @@
'toolsets': [ 'host' ],
'type': 'executable',
'dependencies': [ 'icutools' ],
+ 'ldflags': [ '-Wl,-z,wxneeded' ],
'sources': [
'<@(icu_src_icupkg)',
'no-op.cc',

File diff suppressed because it is too large Load Diff