aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2015-05-17 01:02:37 +0800
committersunpoet <sunpoet@FreeBSD.org>2015-05-17 01:02:37 +0800
commitb73389dee07cc4018ed07198d973db7890217260 (patch)
treeeb9f42f1ceb483d9a7a74ebb80fbef8888bccce9 /www
parent9fbde43d52ab72e7b07eb83c463fc4b5050f5b12 (diff)
downloadfreebsd-ports-graphics-b73389dee07cc4018ed07198d973db7890217260.tar.gz
freebsd-ports-graphics-b73389dee07cc4018ed07198d973db7890217260.tar.zst
freebsd-ports-graphics-b73389dee07cc4018ed07198d973db7890217260.zip
- Revert r386459
- Add workaround for i386 to deal with kernel bug 178881 [1] (PR/178881: getifaddrs(3) does not report IPv6 addresses properly in 32-bit compatibility mode) PR: 198350 [1] Submitted by: Marcin Cieslak <saper@saper.info> [1] Thanks to: adamw, bdrewery MFH: 2015Q2
Diffstat (limited to 'www')
-rw-r--r--www/npm/Makefile11
-rw-r--r--www/npm/files/extra-patch-bug-17888130
2 files changed, 38 insertions, 3 deletions
diff --git a/www/npm/Makefile b/www/npm/Makefile
index 2252830cf30..26daf9de899 100644
--- a/www/npm/Makefile
+++ b/www/npm/Makefile
@@ -26,8 +26,6 @@ USES= cpe python:2 tar:xz
MANPREFIX= ${PREFIX}/lib/node_modules/npm
-ONLY_FOR_ARCHS= amd64
-
CPE_VENDOR= npmjs
CPE_PRODUCT= node_packaged_modules
@@ -36,6 +34,13 @@ NODE_DEVEL_RUN_DEPENDS= node-devel>=0.8.0:${PORTSDIR}/www/node-devel
NODE_RUN_DEPENDS= node>=0.8.0:${PORTSDIR}/www/node
NODE010_RUN_DEPENDS= node010>=0.8.0:${PORTSDIR}/www/node010
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "i386"
+# Workaround for kernel bug 178881
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-bug-178881
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|node cli.js|& --cache ${WRKDIR}/.cache|' ${WRKSRC}/Makefile
@${ECHO_CMD} 'MANPATH ${PREFIX}/lib/node_modules/npm/man' > ${WRKDIR}/npm.conf
@@ -81,4 +86,4 @@ maketar: do-clean
@sudo ${INSTALL} -m 644 ${MS_WRKSRC}/${PORTNAME}-${MS_VERSION}.tar.xz ${DISTDIR}/
@cd ${.CURDIR}/ && ${MAKE_CMD} makesum
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/www/npm/files/extra-patch-bug-178881 b/www/npm/files/extra-patch-bug-178881
new file mode 100644
index 00000000000..2b6c945d6f5
--- /dev/null
+++ b/www/npm/files/extra-patch-bug-178881
@@ -0,0 +1,30 @@
+--- lib/config/defaults.js.orig 2015-05-01 04:03:19 UTC
++++ lib/config/defaults.js
+@@ -316,26 +316,7 @@ exports.types =
+ }
+
+ function getLocalAddresses () {
+- var interfaces
+- // #8094: some environments require elevated permissions to enumerate
+- // interfaces, and synchronously throw EPERM when run without
+- // elevated privileges
+- try {
+- interfaces = os.networkInterfaces()
+- } catch (e) {
+- interfaces = {}
+- }
+-
+- return Object.keys(interfaces).map(function (nic) {
+- return interfaces[nic].filter(function (addr) {
+- return addr.family === 'IPv4'
+- })
+- .map(function (addr) {
+- return addr.address
+- })
+- }).reduce(function (curr, next) {
+- return curr.concat(next)
+- }, []).concat(undefined)
++ return [ '127.0.0.1', undefined ]
+ }
+
+ exports.shorthands =