svn commit: r417791 - in head/www: node node4 node5
Kurt Jaeger
pi at FreeBSD.org
Wed Jun 29 20:00:49 UTC 2016
Author: pi
Date: Wed Jun 29 20:00:47 2016
New Revision: 417791
URL: https://svnweb.freebsd.org/changeset/ports/417791
Log:
www/node[45]: work around build breakages due to include path ordering
Add a post-configure step to strip out all occurrences of
-I${LOCALBASE}/include. Rely instead on USES+=localbase to tell the
compiler where to find includes from external dependencies.
After r416894, node.js builds will use external dependencies instead of
bundled ones. Fallout from this changes includes several build
breakages. All come from the fact that the node-gyp build process adds
-I${LOCALBASE}/include to CFLAGS before all others, including its own
bundled dependencies. This causes the build to incorrectly pick up
include files from any packages in ${LOCALBASE}, rather than the bundled
libraries as intended.
PR: 210618
Submitted by: Bradley T. Hughes <bradleythughes at fastmail.fm> (maintainer)
Modified:
head/www/node/Makefile
head/www/node4/Makefile
head/www/node5/Makefile
Modified: head/www/node/Makefile
==============================================================================
--- head/www/node/Makefile Wed Jun 29 19:35:48 2016 (r417790)
+++ head/www/node/Makefile Wed Jun 29 20:00:47 2016 (r417791)
@@ -19,7 +19,7 @@ OPTIONS_SUB= yes
BUNDLED_SSL_DESC= Use node.js's bundled OpenSSL implementation
BUNDLED_SSL_USE_OFF= OPENSSL=yes
-USES= compiler execinfo gmake python:2,build pkgconfig
+USES= compiler execinfo gmake python:2,build pkgconfig localbase
HAS_CONFIGURE= yes
USE_LDCONFIG= yes
@@ -94,6 +94,16 @@ post-patch:
${WRKSRC}/deps/v8/src/d8.gyp \
${WRKSRC}/node.gyp
+post-configure:
+ # Post-process Makefile and *.mk files created by node-gyp and remove
+ # all occurrences of -I${LOCALBASE}/include. C*FLAGS include this
+ # before all -I../deps/* for bundled code. This can cause build
+ # breakages if the dependency is installed in ${LOCALBASE}. The
+ # USES+=localbase # above will ensure that we pick up includes for real
+ # external dependencies.
+ ${FIND} ${WRKSRC}/out -type f -print0 \
+ | ${XARGS} -0 ${REINPLACE_CMD} -e "s|-I${LOCALBASE}/include||g"
+
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/node
Modified: head/www/node4/Makefile
==============================================================================
--- head/www/node4/Makefile Wed Jun 29 19:35:48 2016 (r417790)
+++ head/www/node4/Makefile Wed Jun 29 20:00:47 2016 (r417791)
@@ -21,7 +21,7 @@ OPTIONS_SUB= yes
BUNDLED_SSL_DESC= Use node.js's bundled OpenSSL implementation
BUNDLED_SSL_USE_OFF= OPENSSL=yes
-USES= compiler execinfo gmake python:2 pkgconfig
+USES= compiler execinfo gmake python:2 pkgconfig localbase
HAS_CONFIGURE= yes
USE_LDCONFIG= yes
@@ -91,6 +91,16 @@ post-patch:
${WRKSRC}/node.gyp \
${WRKSRC}/tools/icu/icu-generic.gyp
+post-configure:
+ # Post-process Makefile and *.mk files created by node-gyp and remove
+ # all occurrences of -I${LOCALBASE}/include. C*FLAGS include this
+ # before all -I../deps/* for bundled code. This can cause build
+ # breakages if the dependency is installed in ${LOCALBASE}. The
+ # USES+=localbase above will ensure that we pick up includes for real
+ # external dependencies.
+ ${FIND} ${WRKSRC}/out -type f -print0 \
+ | ${XARGS} -0 ${REINPLACE_CMD} -e "s|-I${LOCALBASE}/include||g"
+
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/node
Modified: head/www/node5/Makefile
==============================================================================
--- head/www/node5/Makefile Wed Jun 29 19:35:48 2016 (r417790)
+++ head/www/node5/Makefile Wed Jun 29 20:00:47 2016 (r417791)
@@ -23,7 +23,7 @@ OPTIONS_SUB= yes
BUNDLED_SSL_DESC= Use node.js's bundled OpenSSL implementation
BUNDLED_SSL_USE_OFF= OPENSSL=yes
-USES= compiler execinfo gmake python:2 pkgconfig
+USES= compiler execinfo gmake python:2 pkgconfig localbase
HAS_CONFIGURE= yes
USE_LDCONFIG= yes
@@ -91,6 +91,16 @@ post-patch:
${WRKSRC}/deps/v8/src/d8.gyp \
${WRKSRC}/node.gyp
+post-configure:
+ # Post-process Makefile and *.mk files created by node-gyp and remove
+ # all occurrences of -I${LOCALBASE}/include. C*FLAGS include this
+ # before all -I../deps/* for bundled code. This can cause build
+ # breakages if the dependency is installed in ${LOCALBASE}. The
+ # USES+=localbase above will ensure that we pick up includes for real
+ # external dependencies.
+ ${FIND} ${WRKSRC}/out -type f -print0 \
+ | ${XARGS} -0 ${REINPLACE_CMD} -e "s|-I${LOCALBASE}/include||g"
+
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/node
More information about the svn-ports-head
mailing list