FreeBSD Bugzilla – Attachment 171860 Details for
Bug 210618
www/node, www/node4, www/node5: work around build breakages due to include path ordering
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
patch from a git commit, apply with patch -p1
nodejs-post-configure-workaround.diff (text/plain), 4.04 KB, created by
Bradley T. Hughes
on 2016-06-27 10:33:06 UTC
(
hide
)
Description:
patch from a git commit, apply with patch -p1
Filename:
MIME Type:
Creator:
Bradley T. Hughes
Created:
2016-06-27 10:33:06 UTC
Size:
4.04 KB
patch
obsolete
>commit 424131bd58ab7178c0107be787b4e590ada461dc >Author: Bradley T. Hughes <bradleythughes@fastmail.fm> >Date: Mon Jun 27 09:29:08 2016 +0000 > > www/node, www/node4, www/node5: 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. > >diff --git a/www/node/Makefile b/www/node/Makefile >index b6a7ac8..5242108 100644 >--- a/www/node/Makefile >+++ b/www/node/Makefile >@@ -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 > >diff --git a/www/node4/Makefile b/www/node4/Makefile >index de5accc..6b283f7 100644 >--- a/www/node4/Makefile >+++ b/www/node4/Makefile >@@ -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 > >diff --git a/www/node5/Makefile b/www/node5/Makefile >index 36a5184..4744265 100644 >--- a/www/node5/Makefile >+++ b/www/node5/Makefile >@@ -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 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
bhughes
:
maintainer-approval+
Actions:
View
Attachments on
bug 210618
: 171860