Date: Fri, 5 Apr 2019 12:08:54 +0000 (UTC) From: Adriaan de Groot <adridg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r497950 - in head/ports-mgmt/portlint: . src Message-ID: <201904051208.x35C8sTT041922@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adridg Date: Fri Apr 5 12:08:54 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 Modified: head/ports-mgmt/portlint/Makefile head/ports-mgmt/portlint/src/portlint.pl Modified: head/ports-mgmt/portlint/Makefile ============================================================================== --- head/ports-mgmt/portlint/Makefile Fri Apr 5 12:01:25 2019 (r497949) +++ head/ports-mgmt/portlint/Makefile Fri Apr 5 12:08:54 2019 (r497950) @@ -3,7 +3,7 @@ PORTNAME= portlint PORTVERSION= 2.18.8 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none Modified: head/ports-mgmt/portlint/src/portlint.pl ============================================================================== --- head/ports-mgmt/portlint/src/portlint.pl Fri Apr 5 12:01:25 2019 (r497949) +++ head/ports-mgmt/portlint/src/portlint.pl Fri Apr 5 12:08:54 2019 (r497950) @@ -1790,7 +1790,7 @@ sub checkmakefile { } # - # while file: check that CMAKE_BOOL just has words + # whole file: check that CMAKE_BOOL just has words # print "OK: checking that *_CMAKE_BOOL only contains words.\n" if ($verbose); if ($whole =~ /\n([\w\d]+)_CMAKE_BOOL[?+:]?=([^\n]+)\n/) { @@ -1802,6 +1802,17 @@ sub checkmakefile { } } + print "OK: checking that *CMAKE* co-occurs with *USES+=cmake.\n" if ($verbose); + while ($whole =~ /\n([\w\d]+_)?CMAKE_(ARGS|BOOL|BOOL_ON|BOOL_OFF|OFF|ON)\b/g) { + my $lineno = &linenumber($`); + my $o = $1; + my $found_cmake = 0; + unless ($makevar{USES} =~ /\b(cmake\b|cmake:)/) { + $o = "" unless ($o); + &perror("FATAL", $file, $lineno, "${o}CMAKE_$2 is set without USES+=cmake"); + } + } + # # whole file: NO_CHECKSUM #
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904051208.x35C8sTT041922>