Bug 235650 - ports-mgmt/portlint: Should complain when {opt}_CMAKE_xx is set without USES=cmake
Summary: ports-mgmt/portlint: Should complain when {opt}_CMAKE_xx is set without USES=...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Joe Marcus Clarke
URL: https://reviews.freebsd.org/D19525
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-10 19:54 UTC by Yuri Victorovich
Modified: 2019-04-05 12:17 UTC (History)
2 users (show)

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


Attachments
Add checks for {opt}_CMAKE without USES=cmake (1.23 KB, patch)
2019-03-23 20:54 UTC, Adriaan de Groot
adridg: maintainer-approval? (marcus)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2019-02-10 19:54:28 UTC
Testcase: audio/fmit rev. 488406

It has no USES=cmake, and OSS_CMAKE_ON=, etc.

portlint can easily detect that there's no cmake in any of USES= or {opt}_USES=, so it shouldn't allow {opt}_CMAKE_xx or just CMAKE_xx.

portlint-2.18.8_1
Comment 1 Adriaan de Groot freebsd_committer freebsd_triage 2019-03-09 20:41:18 UTC
Patch to implement this put into Phab.
Comment 2 Adriaan de Groot freebsd_committer freebsd_triage 2019-03-23 20:54:52 UTC
Created attachment 203074 [details]
Add checks for {opt}_CMAKE without USES=cmake

Duplicate the patch that has been sitting in Phab.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-04-05 12:09:25 UTC
A commit references this bug:

Author: adridg
Date: Fri Apr  5 12:08:54 UTC 2019
New revision: 497950
URL: https://svnweb.freebsd.org/changeset/ports/497950

Log:
  Add check for sensible CMAKE settings to ports-mgmt/portlint

  If a port sets CMAKE variables (CMAKE_ARGS, or the option helpers
  like foo_CMAKE_BOOL) then it should have USES=cmake; otherwise
  those variables don't make any sense.

  This is the slightly simplified version of the patch: there
  really shouldn't be options that switch (meta-)build systems.

  PORTREVISION bumped because I'm not sure what the versioning
  scheme is for portlint.

  PR:		235650
  Reported by:	yuri
  Approved by:	marcus (maintainer timeout 2 weeks)
  Differential Revision:	https://reviews.freebsd.org/D19525

Changes:
  head/ports-mgmt/portlint/Makefile
  head/ports-mgmt/portlint/src/portlint.pl
Comment 4 Joe Marcus Clarke freebsd_committer freebsd_triage 2019-04-05 12:17:47 UTC
A fix for this was just committed, and I folded it into my source tree.  Looking to create a new release.