aboutsummaryrefslogtreecommitdiff
path: root/www/node4
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2016-06-14 15:53:53 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2016-06-14 15:53:53 +0000
commit087e807c6c0e1d9eec11a74dda323f95a7baf742 (patch)
tree4223b5efb8e40c015c46b24ec953fd2cbff35166 /www/node4
parent6cd6da01c60f2a0073818cac88b1f6f1cba46dfb (diff)
downloadports-087e807c6c0e1d9eec11a74dda323f95a7baf742.tar.gz
ports-087e807c6c0e1d9eec11a74dda323f95a7baf742.zip
Prefer external libraries to the ones bundled with node.
Do not statically link bundled libraries into node.js. It requires openssl 1.0.2, so pull that in from ports when the base version is not new enough. While all versions use c-ares, only www/node has a configure knob to enable building against an unbundled version. All other dependencies are specified in www/node/common.mk and used by all 3 ports. node cannot build against LibreSSL, so if it's the chosen SSL provider, the BUNDLED_SSL option must be enabled. The www/node010 and www/node012 ports have not been done since both are deprecated and have very old bundled dependencies that are not available in ports. PR: 209793 Submitted by: Bradley T. Hughes (maintainer)
Notes
Notes: svn path=/head/; revision=416894
Diffstat (limited to 'www/node4')
-rw-r--r--www/node4/Makefile37
-rw-r--r--www/node4/pkg-plist199
2 files changed, 125 insertions, 111 deletions
diff --git a/www/node4/Makefile b/www/node4/Makefile
index a95d4e1c0b33..222b45ee67f5 100644
--- a/www/node4/Makefile
+++ b/www/node4/Makefile
@@ -4,6 +4,7 @@
PORTNAME= node
PORTVERSION= 4.4.5
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://nodejs.org/dist/v${PORTVERSION}/
PKGNAMESUFFIX= 4
@@ -14,22 +15,50 @@ COMMENT= V8 JavaScript for client and server (4.x LTS)
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-OPTIONS_DEFINE= DOCS
+OPTIONS_DEFINE= BUNDLED_SSL DOCS
+OPTIONS_SUB= yes
-USES= compiler execinfo gmake python:2
+BUNDLED_SSL_DESC= Use node.js's bundled OpenSSL implementation
+BUNDLED_SSL_USE_OFF= OPENSSL=yes
+
+USES= compiler execinfo gmake python:2 localbase
HAS_CONFIGURE= yes
USE_LDCONFIG= yes
CONFLICTS_INSTALL= node-[0-9]* node-devel-0.[0-9]* node010-[0-9]* node012-[0-9]* iojs-[0-9]* node5-[0-9]*
ONLY_FOR_ARCHS= i386 amd64
-CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} --without-npm --shared-zlib
+CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \
+ --without-npm \
+ --shared-libuv \
+ --shared-zlib
PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,}
REINPLACE_ARGS= -i ''
-MAKE_ENV+= CC.host=${CC} CXX.host=${CXX} LINK.host=${CXX} LINK.target=${CXX}
+MAKE_ENV+= CC.host=${CC} CXX.host=${CXX} LINK.host=${CXX} LINK.target=${CXX} LDFLAGS.host="${LDFLAGS}" LDFLAGS.target="${LDFLAGS}"
+
+LIB_DEPENDS+= libuv.so:devel/libuv
+
+.include <bsd.port.options.mk>
+
+.if empty(PORT_OPTIONS:MBUNDLED_SSL)
+
+.if ${OSVERSION} < 1100085
+# node.js requires openssl 1.0.2, use the port since base isn't new enough
+WITH_OPENSSL_PORT=yes
+.endif
+
+CONFIGURE_ARGS+= --shared-openssl
+
+.endif
.include <bsd.port.pre.mk>
+.if empty(PORT_OPTIONS:MBUNDLED_SSL)
+.if defined(OPENSSL_PORT) && (${OPENSSL_PORT} == "security/libressl" || ${OPENSSL_PORT} == "security/libressl-devel")
+IGNORE= cannot build node.js with LibreSSL. You must enable BUNDLED_SSL
+.endif
+.endif
+
.if ${COMPILER_TYPE} == clang
MAKE_ENV+= LINK=clang++
CFLAGS+= -Wno-unused-private-field
diff --git a/www/node4/pkg-plist b/www/node4/pkg-plist
index bf262a8ea55f..0d3ac23fbecd 100644
--- a/www/node4/pkg-plist
+++ b/www/node4/pkg-plist
@@ -1,5 +1,4 @@
bin/node
-include/node/android-ifaddrs.h
include/node/ares.h
include/node/ares_version.h
include/node/common.gypi
@@ -11,112 +10,98 @@ include/node/node_buffer.h
include/node/node_internals.h
include/node/node_object_wrap.h
include/node/node_version.h
-include/node/openssl/aes.h
-include/node/openssl/archs/BSD-x86/opensslconf.h
-include/node/openssl/archs/BSD-x86_64/opensslconf.h
-include/node/openssl/archs/VC-WIN32/opensslconf.h
-include/node/openssl/archs/VC-WIN64A/opensslconf.h
-include/node/openssl/archs/aix-gcc/opensslconf.h
-include/node/openssl/archs/aix64-gcc/opensslconf.h
-include/node/openssl/archs/darwin-i386-cc/opensslconf.h
-include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h
-include/node/openssl/archs/linux-aarch64/opensslconf.h
-include/node/openssl/archs/linux-armv4/opensslconf.h
-include/node/openssl/archs/linux-elf/opensslconf.h
-include/node/openssl/archs/linux-ppc/opensslconf.h
-include/node/openssl/archs/linux-ppc64/opensslconf.h
-include/node/openssl/archs/linux-x32/opensslconf.h
-include/node/openssl/archs/linux-x86_64/opensslconf.h
-include/node/openssl/archs/solaris-x86-gcc/opensslconf.h
-include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h
-include/node/openssl/asn1.h
-include/node/openssl/asn1_mac.h
-include/node/openssl/asn1t.h
-include/node/openssl/bio.h
-include/node/openssl/blowfish.h
-include/node/openssl/bn.h
-include/node/openssl/buffer.h
-include/node/openssl/camellia.h
-include/node/openssl/cast.h
-include/node/openssl/cmac.h
-include/node/openssl/cms.h
-include/node/openssl/comp.h
-include/node/openssl/conf.h
-include/node/openssl/conf_api.h
-include/node/openssl/crypto.h
-include/node/openssl/des.h
-include/node/openssl/des_old.h
-include/node/openssl/dh.h
-include/node/openssl/dsa.h
-include/node/openssl/dso.h
-include/node/openssl/dtls1.h
-include/node/openssl/e_os2.h
-include/node/openssl/ebcdic.h
-include/node/openssl/ec.h
-include/node/openssl/ecdh.h
-include/node/openssl/ecdsa.h
-include/node/openssl/engine.h
-include/node/openssl/err.h
-include/node/openssl/evp.h
-include/node/openssl/hmac.h
-include/node/openssl/idea.h
-include/node/openssl/krb5_asn.h
-include/node/openssl/kssl.h
-include/node/openssl/lhash.h
-include/node/openssl/md4.h
-include/node/openssl/md5.h
-include/node/openssl/mdc2.h
-include/node/openssl/modes.h
-include/node/openssl/obj_mac.h
-include/node/openssl/objects.h
-include/node/openssl/ocsp.h
-include/node/openssl/opensslconf.h
-include/node/openssl/opensslv.h
-include/node/openssl/ossl_typ.h
-include/node/openssl/pem.h
-include/node/openssl/pem2.h
-include/node/openssl/pkcs12.h
-include/node/openssl/pkcs7.h
-include/node/openssl/pqueue.h
-include/node/openssl/rand.h
-include/node/openssl/rc2.h
-include/node/openssl/rc4.h
-include/node/openssl/ripemd.h
-include/node/openssl/rsa.h
-include/node/openssl/safestack.h
-include/node/openssl/seed.h
-include/node/openssl/sha.h
-include/node/openssl/srp.h
-include/node/openssl/srtp.h
-include/node/openssl/ssl.h
-include/node/openssl/ssl2.h
-include/node/openssl/ssl23.h
-include/node/openssl/ssl3.h
-include/node/openssl/stack.h
-include/node/openssl/symhacks.h
-include/node/openssl/tls1.h
-include/node/openssl/ts.h
-include/node/openssl/txt_db.h
-include/node/openssl/ui.h
-include/node/openssl/ui_compat.h
-include/node/openssl/whrlpool.h
-include/node/openssl/x509.h
-include/node/openssl/x509_vfy.h
-include/node/openssl/x509v3.h
-include/node/pthread-fixes.h
-include/node/stdint-msvc2008.h
-include/node/tree.h
-include/node/uv-aix.h
-include/node/uv-bsd.h
-include/node/uv-darwin.h
-include/node/uv-errno.h
-include/node/uv-linux.h
-include/node/uv-sunos.h
-include/node/uv-threadpool.h
-include/node/uv-unix.h
-include/node/uv-version.h
-include/node/uv-win.h
-include/node/uv.h
+%%BUNDLED_SSL%%include/node/openssl/aes.h
+%%BUNDLED_SSL%%include/node/openssl/archs/BSD-x86/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/BSD-x86_64/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/VC-WIN32/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/VC-WIN64A/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/aix-gcc/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/aix64-gcc/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/darwin-i386-cc/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/linux-aarch64/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/linux-armv4/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/linux-elf/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/linux-ppc/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/linux-ppc64/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/linux-x32/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/linux-x86_64/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/solaris-x86-gcc/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/asn1.h
+%%BUNDLED_SSL%%include/node/openssl/asn1_mac.h
+%%BUNDLED_SSL%%include/node/openssl/asn1t.h
+%%BUNDLED_SSL%%include/node/openssl/bio.h
+%%BUNDLED_SSL%%include/node/openssl/blowfish.h
+%%BUNDLED_SSL%%include/node/openssl/bn.h
+%%BUNDLED_SSL%%include/node/openssl/buffer.h
+%%BUNDLED_SSL%%include/node/openssl/camellia.h
+%%BUNDLED_SSL%%include/node/openssl/cast.h
+%%BUNDLED_SSL%%include/node/openssl/cmac.h
+%%BUNDLED_SSL%%include/node/openssl/cms.h
+%%BUNDLED_SSL%%include/node/openssl/comp.h
+%%BUNDLED_SSL%%include/node/openssl/conf.h
+%%BUNDLED_SSL%%include/node/openssl/conf_api.h
+%%BUNDLED_SSL%%include/node/openssl/crypto.h
+%%BUNDLED_SSL%%include/node/openssl/des.h
+%%BUNDLED_SSL%%include/node/openssl/des_old.h
+%%BUNDLED_SSL%%include/node/openssl/dh.h
+%%BUNDLED_SSL%%include/node/openssl/dsa.h
+%%BUNDLED_SSL%%include/node/openssl/dso.h
+%%BUNDLED_SSL%%include/node/openssl/dtls1.h
+%%BUNDLED_SSL%%include/node/openssl/e_os2.h
+%%BUNDLED_SSL%%include/node/openssl/ebcdic.h
+%%BUNDLED_SSL%%include/node/openssl/ec.h
+%%BUNDLED_SSL%%include/node/openssl/ecdh.h
+%%BUNDLED_SSL%%include/node/openssl/ecdsa.h
+%%BUNDLED_SSL%%include/node/openssl/engine.h
+%%BUNDLED_SSL%%include/node/openssl/err.h
+%%BUNDLED_SSL%%include/node/openssl/evp.h
+%%BUNDLED_SSL%%include/node/openssl/hmac.h
+%%BUNDLED_SSL%%include/node/openssl/idea.h
+%%BUNDLED_SSL%%include/node/openssl/krb5_asn.h
+%%BUNDLED_SSL%%include/node/openssl/kssl.h
+%%BUNDLED_SSL%%include/node/openssl/lhash.h
+%%BUNDLED_SSL%%include/node/openssl/md4.h
+%%BUNDLED_SSL%%include/node/openssl/md5.h
+%%BUNDLED_SSL%%include/node/openssl/mdc2.h
+%%BUNDLED_SSL%%include/node/openssl/modes.h
+%%BUNDLED_SSL%%include/node/openssl/obj_mac.h
+%%BUNDLED_SSL%%include/node/openssl/objects.h
+%%BUNDLED_SSL%%include/node/openssl/ocsp.h
+%%BUNDLED_SSL%%include/node/openssl/opensslconf.h
+%%BUNDLED_SSL%%include/node/openssl/opensslv.h
+%%BUNDLED_SSL%%include/node/openssl/ossl_typ.h
+%%BUNDLED_SSL%%include/node/openssl/pem.h
+%%BUNDLED_SSL%%include/node/openssl/pem2.h
+%%BUNDLED_SSL%%include/node/openssl/pkcs12.h
+%%BUNDLED_SSL%%include/node/openssl/pkcs7.h
+%%BUNDLED_SSL%%include/node/openssl/pqueue.h
+%%BUNDLED_SSL%%include/node/openssl/rand.h
+%%BUNDLED_SSL%%include/node/openssl/rc2.h
+%%BUNDLED_SSL%%include/node/openssl/rc4.h
+%%BUNDLED_SSL%%include/node/openssl/ripemd.h
+%%BUNDLED_SSL%%include/node/openssl/rsa.h
+%%BUNDLED_SSL%%include/node/openssl/safestack.h
+%%BUNDLED_SSL%%include/node/openssl/seed.h
+%%BUNDLED_SSL%%include/node/openssl/sha.h
+%%BUNDLED_SSL%%include/node/openssl/srp.h
+%%BUNDLED_SSL%%include/node/openssl/srtp.h
+%%BUNDLED_SSL%%include/node/openssl/ssl.h
+%%BUNDLED_SSL%%include/node/openssl/ssl2.h
+%%BUNDLED_SSL%%include/node/openssl/ssl23.h
+%%BUNDLED_SSL%%include/node/openssl/ssl3.h
+%%BUNDLED_SSL%%include/node/openssl/stack.h
+%%BUNDLED_SSL%%include/node/openssl/symhacks.h
+%%BUNDLED_SSL%%include/node/openssl/tls1.h
+%%BUNDLED_SSL%%include/node/openssl/ts.h
+%%BUNDLED_SSL%%include/node/openssl/txt_db.h
+%%BUNDLED_SSL%%include/node/openssl/ui.h
+%%BUNDLED_SSL%%include/node/openssl/ui_compat.h
+%%BUNDLED_SSL%%include/node/openssl/whrlpool.h
+%%BUNDLED_SSL%%include/node/openssl/x509.h
+%%BUNDLED_SSL%%include/node/openssl/x509_vfy.h
+%%BUNDLED_SSL%%include/node/openssl/x509v3.h
include/node/v8-debug.h
include/node/v8-platform.h
include/node/v8-profiler.h