From owner-svn-ports-head@freebsd.org Fri Apr 5 12:08:55 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B8911575477; Fri, 5 Apr 2019 12:08:55 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FA5F8E9CD; Fri, 5 Apr 2019 12:08:55 +0000 (UTC) (envelope-from adridg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3C0CCDF4; Fri, 5 Apr 2019 12:08:54 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x35C8sQr041924; Fri, 5 Apr 2019 12:08:54 GMT (envelope-from adridg@FreeBSD.org) Received: (from adridg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x35C8sTT041922; Fri, 5 Apr 2019 12:08:54 GMT (envelope-from adridg@FreeBSD.org) Message-Id: <201904051208.x35C8sTT041922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adridg set sender to adridg@FreeBSD.org using -f From: Adriaan de Groot Date: Fri, 5 Apr 2019 12:08:54 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: adridg X-SVN-Commit-Paths: in head/ports-mgmt/portlint: . src X-SVN-Commit-Revision: 497950 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2FA5F8E9CD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2019 12:08:55 -0000 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 #