From owner-svn-ports-all@freebsd.org Wed Jun 29 20:00:49 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08503B85510; Wed, 29 Jun 2016 20:00:49 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7D712BC0; Wed, 29 Jun 2016 20:00:48 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5TK0mjq068594; Wed, 29 Jun 2016 20:00:48 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5TK0lRk068591; Wed, 29 Jun 2016 20:00:47 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201606292000.u5TK0lRk068591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Wed, 29 Jun 2016 20:00:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r417791 - in head/www: node node4 node5 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2016 20:00:49 -0000 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 (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