From owner-svn-ports-all@FreeBSD.ORG Sun May 17 22:44:10 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F192670; Sun, 17 May 2015 22:44:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AF17185F; Sun, 17 May 2015 22:44:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4HMiAVQ060129; Sun, 17 May 2015 22:44:10 GMT (envelope-from marcus@FreeBSD.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4HMi9bO060127; Sun, 17 May 2015 22:44:09 GMT (envelope-from marcus@FreeBSD.org) Message-Id: <201505172244.t4HMi9bO060127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcus set sender to marcus@FreeBSD.org using -f From: Joe Marcus Clarke Date: Sun, 17 May 2015 22:44:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r386646 - in head/ports-mgmt/portlint: . src X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 22:44:10 -0000 Author: marcus Date: Sun May 17 22:44:09 2015 New Revision: 386646 URL: https://svnweb.freebsd.org/changeset/ports/386646 Log: Update to 2.16.4 * Correct a typo. This should have been SITE_ARCH_REL. [1] * Pre-populate USES with an explicit grep of the Makefile. [2] * Correct a typo to prevent direct command usage checking in pkg-* files. [3] * Adjust the order of first-paragraph items so that proper checking is done. [4] * Adjust the warning about installing docs by wrapping with .if ${PORT_OPTIONS:MDOCS}. [5] * Add a check for ${SETENV} instead of ${ENV}. [5] PR: 199974 [2] 199693 [3] 199428 [4] 199417 [5] Submitted by: adamw [4] sunpoet [1] Modified: head/ports-mgmt/portlint/Makefile head/ports-mgmt/portlint/src/portlint.pl Modified: head/ports-mgmt/portlint/Makefile ============================================================================== --- head/ports-mgmt/portlint/Makefile Sun May 17 22:13:20 2015 (r386645) +++ head/ports-mgmt/portlint/Makefile Sun May 17 22:44:09 2015 (r386646) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= portlint -PORTVERSION= 2.16.3 +PORTVERSION= 2.16.4 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none Modified: head/ports-mgmt/portlint/src/portlint.pl ============================================================================== --- head/ports-mgmt/portlint/src/portlint.pl Sun May 17 22:13:20 2015 (r386645) +++ head/ports-mgmt/portlint/src/portlint.pl Sun May 17 22:44:09 2015 (r386646) @@ -15,7 +15,7 @@ # was removed. # # $FreeBSD$ -# $MCom: portlint/portlint.pl,v 1.354 2015/04/13 04:48:55 jclarke Exp $ +# $MCom: portlint/portlint.pl,v 1.361 2015/05/17 21:39:49 jclarke Exp $ # use strict; @@ -50,7 +50,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 16; -my $micro = 3; +my $micro = 4; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -213,6 +213,12 @@ while () { close(IN); +open(MK, 'Makefile') || die "Makefile: $!"; +my @muses = grep($_ = /^USES[?+]?=\s*(.*)/ && $1, ); +foreach my $muse (@muses) { + $makevar{USES} .= " " . $muse; +} + # # check for files. # @@ -1275,6 +1281,16 @@ sub checkmakefile { } # + # checking for use of ${ENV} + # + print "OK: checking for use of \${ENV} instead of \${SETENV}.\n" if ($verbose); + if ($whole =~ /\$\{ENV}/m) { + my $lineno = &linenumber($`); + &perror("WARN", $file, $lineno, "most uses of \${ENV} should really ". + "be \${SETENV} to avoid strange behaviors in sh(1)."); + } + + # # whole file: use of :LU variable expansion modifiers # print "OK: checking for use of :LU variable expansion modifiers.\n" if ($verbose); @@ -1696,10 +1712,12 @@ sub checkmakefile { } if ($sharedocused && $whole !~ /defined\s*\(?NOPORTDOCS\)?/ && $whole !~ /def\s*\(?NOPORTDOCS\)?/) { - if ($docsused == 0 + if ($docsused == 1 && $whole !~ m#(\$[\{\(]PREFIX[\}\)]|$localbase)/share/doc/#) { - &perror("WARN", $file, -1, "use \".if \${PORT_OPTIONS:MDOCS}\" to wrap ". - "installation of files into $localbase/share/doc."); + &perror("WARN", $file, -1, "you should only use \".if \${PORT_OPTIONS:MDOCS}\" to wrap ". + "installation of files into $localbase/share/doc if the". + " collection of files is large and it takes considerable time". + " to copy."); } } else { $docsused++; @@ -1992,7 +2010,7 @@ xargs xmkmf if ($j =~ m'\${STAGEDIR}\${SITE_ARCH}') { my $lineno = &linenumber($`); &perror("WARN", $file, $lineno, "\${STAGEDIR}\${SITE_ARCH} should be ". - "replaced by \${STAGEDIR}\${PREFIX}/\${SITE_BASE_REL}."); + "replaced by \${STAGEDIR}\${PREFIX}/\${SITE_ARCH_REL}."); } # @@ -2672,9 +2690,10 @@ DIST_SUBDIR EXTRACT_ONLY } push(@varnames, qw( -PORTNAME PORTVERSION PORTREVISION PORTEPOCH CATEGORIES MASTER_SITES -PKGNAMEPREFIX PKGNAMESUFFIX DISTNAME EXTRACT_SUFX -DISTFILES EXTRACT_ONLY +PORTNAME PORTVERSION DISTVERSIONPREFIX DISTVERSION DISTVERSIONSUFFIX +PORTREVISION PORTEPOCH CATEGORIES MASTER_SITES MASTER_SITE_SUBDIR +PROJECTHOST PKGNAMEPREFIX PKGNAMESUFFIX DISTNAME EXTRACT_SUFX DISTFILES +DIST_SUBDIR EXTRACT_ONLY )); # @@ -3255,7 +3274,7 @@ work \${WRKDIR} instead EOF foreach my $i (keys %cmdnames) { # use (?![\w-]) instead of \b to exclude pkg-* - if ($s =~ /^[^#]*(\.\/|\$[\{\(]\.CURDIR[\}\)]\/|[ \t])(\b$i)(?![\w-])/ + if ($file =~ /^[^#]*(\.\/|\$[\{\(]\.CURDIR[\}\)]\/|[ \t])(\b$i)(?![\w-])/ && $s !~ /^COMMENT(.)?=[^\n]+$i/m && $s !~ /^IGNORE(.)?=[^\n]+$i/m && $s !~ /^BROKEN(.)?=[^\n]+$i/m