Bug 210618 - www/node, www/node4, www/node5: work around build breakages due to include path ordering
Summary: www/node, www/node4, www/node5: work around build breakages due to include pa...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords: patch, patch-ready
Depends on:
Blocks: 210305 210426 210578 210675
  Show dependency treegraph
 
Reported: 2016-06-27 10:33 UTC by Bradley T. Hughes
Modified: 2016-06-29 20:02 UTC (History)
1 user (show)

See Also:


Attachments
patch from a git commit, apply with patch -p1 (4.04 KB, text/plain)
2016-06-27 10:33 UTC, Bradley T. Hughes
bhughes: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bradley T. Hughes freebsd_committer freebsd_triage 2016-06-27 10:33:06 UTC
Created attachment 171860 [details]
patch from a git commit, apply with patch -p1

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.
Comment 1 Bradley T. Hughes freebsd_committer freebsd_triage 2016-06-27 10:40:38 UTC
- portlint -AC:
WARN: Makefile: new ports should not set PORTREVISION.
WARN: /usr/ports/www/node/files/patch-deps_v8_src_arm_cpu-arm.cc: patch was not generated using ``make makepatch''.  It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format.
0 fatal errors and 2 warnings found.

- testport: OK (poudriere 10.3-RELEASE, amd64 tested)
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2016-06-29 08:25:58 UTC
For future reference, when providing patches with git, please add --no-prefix to the git diff line, so that the a/ and b/ are stripped and the patch is straightforward to apply with svn patch.
Comment 3 Bradley T. Hughes freebsd_committer freebsd_triage 2016-06-29 09:02:09 UTC
I will do that. Thanks for the tip, Mathieu :)
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-06-29 20:01:19 UTC
A commit references this bug:

Author: pi
Date: Wed Jun 29 20:00:48 UTC 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@fastmail.fm> (maintainer)

Changes:
  head/www/node/Makefile
  head/www/node4/Makefile
  head/www/node5/Makefile
Comment 5 Kurt Jaeger freebsd_committer freebsd_triage 2016-06-29 20:02:38 UTC
Committed, thanks!