Bug 221085 - ports-mgmt/portlint: handle comments in USE_GCC
Summary: ports-mgmt/portlint: handle comments in USE_GCC
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: Joe Marcus Clarke
Depends on:
Reported: 2017-07-29 08:38 UTC by Gerald Pfeifer
Modified: 2018-07-20 11:26 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (marcus)

Proposed fix. (422 bytes, patch)
2017-07-29 08:38 UTC, Gerald Pfeifer
gerald: maintainer-approval? (marcus)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer freebsd_committer 2017-07-29 08:38:49 UTC
Created attachment 184824 [details]
Proposed fix.

I just was a little puzzled about the following:

  WARN: Makefile: [72]: Setting a specific version for USE_GCC should only be  done as a last resort.  Unless you have confirmed this port does not build with later versions of GCC, please use USE_GCC=5	# Cannot require ourselves, needs to be at least 4.9.+.

Looking at the code I realized portlint does not trim comments, but uses everything after USE_GCC= as the parameter to this option.

This patch addresses it.  (Pardon my poor Perl skills; there may be better
Comment 1 Joe Marcus Clarke freebsd_committer 2017-07-30 16:12:38 UTC
Committed to my repo ahead of the next release.  Thanks.
Comment 2 commit-hook freebsd_committer 2017-08-03 12:55:46 UTC
A commit references this bug:

Author: marcus
Date: Thu Aug  3 12:55:02 UTC 2017
New revision: 447208
URL: https://svnweb.freebsd.org/changeset/ports/447208

  Update to 2.17.11.

  * Trim comments after USE_GCC [1]
  * Add a check for redundant SHEBANG_LANG values [2]
  * Make sure both USES and USE_* are actually seen before checking
    to see if one is included before the other [3]

  PR:		221085 [1]
  		220500 [2]
  Submitted by:	gerald [1]
  Reported by:	dbaio [3]

Comment 3 Joe Marcus Clarke freebsd_committer 2017-08-03 12:57:10 UTC
Committed to 2.17.11.  Thanks!
Comment 4 Thanos 2018-07-20 11:26:08 UTC