svn commit: r386559 - in head/www/npm: . files
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Sat May 16 17:02:39 UTC 2015
Author: sunpoet
Date: Sat May 16 17:02:37 2015
New Revision: 386559
URL: https://svnweb.freebsd.org/changeset/ports/386559
Log:
- 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 at saper.info> [1]
Thanks to: adamw, bdrewery
MFH: 2015Q2
Added:
head/www/npm/files/
head/www/npm/files/extra-patch-bug-178881 (contents, props changed)
Modified:
head/www/npm/Makefile
Modified: head/www/npm/Makefile
==============================================================================
--- head/www/npm/Makefile Sat May 16 16:39:16 2015 (r386558)
+++ head/www/npm/Makefile Sat May 16 17:02:37 2015 (r386559)
@@ -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.
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>
Added: head/www/npm/files/extra-patch-bug-178881
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/npm/files/extra-patch-bug-178881 Sat May 16 17:02:37 2015 (r386559)
@@ -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 =
More information about the svn-ports-head
mailing list