From owner-svn-ports-all@freebsd.org Thu Dec 28 23:46:55 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA759E88F1E; Thu, 28 Dec 2017 23:46:55 +0000 (UTC) (envelope-from marcus@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 mx1.freebsd.org (Postfix) with ESMTPS id C1E7171AFE; Thu, 28 Dec 2017 23:46:55 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBSNksR4083451; Thu, 28 Dec 2017 23:46:54 GMT (envelope-from marcus@FreeBSD.org) Received: (from marcus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBSNksGB083449; Thu, 28 Dec 2017 23:46:54 GMT (envelope-from marcus@FreeBSD.org) Message-Id: <201712282346.vBSNksGB083449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marcus set sender to marcus@FreeBSD.org using -f From: Joe Marcus Clarke Date: Thu, 28 Dec 2017 23:46:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r457486 - in head/ports-mgmt/portlint: . src X-SVN-Group: ports-head X-SVN-Commit-Author: marcus X-SVN-Commit-Paths: in head/ports-mgmt/portlint: . src X-SVN-Commit-Revision: 457486 X-SVN-Commit-Repository: ports 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.25 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: Thu, 28 Dec 2017 23:46:56 -0000 Author: marcus Date: Thu Dec 28 23:46:54 2017 New Revision: 457486 URL: https://svnweb.freebsd.org/changeset/ports/457486 Log: Update to 2.17.15. * Don't check for direct command use for ONLY_FOR_ARCHS_REASON and NOT_FOR_ARCHS_REASON when a specific arch has been specified. [1] * Preserve an original variable value to make sure the check for copying dependecies is actually performed. * Don't complain about incon installation if the port is a Qt5 port. [2] * Check that PLIST_FILES entries do not contain %%FOO% notation. [3] * Check that DOCS and EXAMPLES are defined as OPTIONS when using %%PORTDOCS%% and %%PORTEXAMPLES%%. [4] * Check that if USE_LDCONFIG is defined, then the port installs shared objects. [5] * Check that when USE_KDE is defined, then USES=kde:5 is also defined. [6] * Ignore flavors when trying to find port directories. [7] * Revert the fix for 221971 (USE_GITHUB). More debate is needed here. PR: 223285 [1] 223498 [2] 223539 [3] 223541 [4] 223762 [5] 224140 [6] 224245 [7] Submitted by: adridg [2] mat [4] 224245 [7] Modified: head/ports-mgmt/portlint/Makefile head/ports-mgmt/portlint/src/portlint.pl Modified: head/ports-mgmt/portlint/Makefile ============================================================================== --- head/ports-mgmt/portlint/Makefile Thu Dec 28 22:45:57 2017 (r457485) +++ head/ports-mgmt/portlint/Makefile Thu Dec 28 23:46:54 2017 (r457486) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= portlint -PORTVERSION= 2.17.14 +PORTVERSION= 2.17.15 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none Modified: head/ports-mgmt/portlint/src/portlint.pl ============================================================================== --- head/ports-mgmt/portlint/src/portlint.pl Thu Dec 28 22:45:57 2017 (r457485) +++ head/ports-mgmt/portlint/src/portlint.pl Thu Dec 28 23:46:54 2017 (r457486) @@ -15,7 +15,7 @@ # was removed. # # $FreeBSD$ -# $MCom: portlint/portlint.pl,v 1.432 2017/12/07 03:23:53 jclarke Exp $ +# $MCom: portlint/portlint.pl,v 1.443 2017/12/28 23:42:15 jclarke Exp $ # use strict; @@ -50,7 +50,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 17; -my $micro = 14; +my $micro = 15; # default setting - for FreeBSD my $portsdir = '/usr/ports'; @@ -153,7 +153,7 @@ my @varlist = qw( WRKDIR WRKSRC NO_WRKSUBDIR SCRIPTDIR FILESDIR PKGDIR COMMENT DESCR PLIST PKGCATEGORY PKGINSTALL PKGDEINSTALL PKGREQ PKGMESSAGE DISTINFO_FILE .CURDIR USE_LDCONFIG USE_AUTOTOOLS - USE_GNOME USE_PERL5 INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION + USE_GNOME USE_PERL5 USE_QT5 INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PLIST_FILES PLIST_DIRS PORTDOCS PORTEXAMPLES OPTIONS_DEFINE OPTIONS_RADIO OPTIONS_SINGLE OPTIONS_MULTI OPTIONS_GROUP OPTIONS_SUB INSTALLS_OMF USE_RC_SUBR USES DIST_SUBDIR @@ -218,7 +218,7 @@ my $ulineno = -1; my $uulineno = -1; my @muses = (); while (my $mline = ) { - if ($uulineno == -1 && $mline =~ /^USE_/ && $mline !~ /^USE_GITHUB/) { + if ($uulineno == -1 && $mline =~ /^USE_/) { $uulineno = $.; } if ($mline =~ /^USES[?+]?=\s*(.*)/) { @@ -558,6 +558,7 @@ sub checkplist { my $item_count = 0; my $owner_seen = 0; my $group_seen = 0; + my $found_so = 0; # Variables that are allowed to be out-of-sync in the XXXDIR check. # E.g., %%PORTDOCS%%%%RUBY_MODDOCDIR%% will be OK because there is @@ -773,10 +774,13 @@ sub checkplist { $makevar{USE_LDCONFIG} eq '') { &perror("WARN", $file, $., "installing shared libraries, ". "please define USE_LDCONFIG as appropriate"); + } elsif ($_ =~ m|lib[^\/]+\.so(\.\d+)?$|) { + $found_so++; } if ($_ =~ m|^share/icons/.*/| && - $makevar{INSTALLS_ICONS} eq '') { + $makevar{INSTALLS_ICONS} eq '' && + needs_installs_icons()) { &perror("WARN", $file, $., "installing icons, ". "please define INSTALLS_ICONS as appropriate"); } @@ -904,6 +908,11 @@ sub checkplist { &perror("WARN", $file, -1, "There are only $item_count items in the plist. Consider using PLIST_FILES instead of pkg-plist when installing less than $numpitems items."); } + if ($makevar{USE_LDCONFIG} ne '' && !$found_so) { + &perror("WARN", $file, -1, "You have defined USE_LDCONFIG, but this ". + "port does not install any shared objects."); + } + close(IN); 1; } @@ -1074,6 +1083,7 @@ sub check_depends_syntax { if ($k =~ /^#/) { last; } + my $ok = $k; if ($k =~ /^\$\{(\w+)\}$/) { $k = get_makevar($1); } @@ -1084,8 +1094,8 @@ sub check_depends_syntax { print "OK: checking dependency value for $j.\n" if ($verbose); - if ($k =~ /\$\{((PATCH_|EXTRACT_|LIB_|BUILD_|RUN_|TEST_|FETCH_)*DEPENDS)}/) { - &perror("WARN", $file, -1, "do not set $j to $k. ". + if ($ok =~ /\$\{((PATCH_|EXTRACT_|LIB_|BUILD_|RUN_|TEST_|FETCH_)*DEPENDS)}/) { + &perror("WARN", $file, -1, "do not set $j to $ok. ". "Instead, explicity list out required $j dependencies."); } @@ -1099,7 +1109,7 @@ sub check_depends_syntax { } my %m = (); $m{'dep'} = $l[0]; - $m{'dir'} = $l[1]; + $m{'dir'} = (split(/\@/, $l[1]))[0]; $m{'tgt'} = $l[2] // ''; my %depmvars = (); foreach my $dv ($m{'dep'}, $m{'dir'}, $m{'tgt'}) { @@ -1474,10 +1484,15 @@ sub checkmakefile { "If possible, install this file with a different name."); } if ($plist_file =~ m|^share/icons/.*/| && - $makevar{INSTALLS_ICONS} eq '') { + $makevar{INSTALLS_ICONS} eq '' && + needs_installs_icons()) { &perror("WARN", "", -1, "PLIST_FILES: installing icons, ". "please define INSTALLS_ICONS as appropriate"); } + if ($plist_file =~ /%%[\w_\d]+%%/) { + &perror("FATAL", "", -1, "PLIST_FILES: files cannot contain ". + "%%FOO%% variables. Use make variables and logic instead"); + } } } @@ -1650,6 +1665,20 @@ sub checkmakefile { my %seen = (); @popt = grep { !$seen{$_}++ } @popt; } + foreach my $i (@popt) { + if ($i eq 'PORTDOCS') { + if (!grep(/^DOCS$/, @opt)) { + &perror("FATAL", $file, -1, "PORTDOCS appears in plist ". + "but DOCS is not listed in OPTIONS_DEFINE."); + } + } elsif ($i eq 'PORTEXAMPLES') { + if (!grep(/^EXAMPLES$/, @opt)) { + &perror("FATAL", $file, -1, "PORTEXAMPLES appears in plist ". + "but EXAMPLES is not listed in OPTIONS_DEFINE."); + } + } + } + foreach my $i ((@opt, @aopt)) { # skip global options next if ($i eq 'DOCS' or $i eq 'NLS' or $i eq 'EXAMPLES' or $i eq 'IPV6' or $i eq 'X11' or $i eq 'DEBUG'); @@ -1823,6 +1852,14 @@ sub checkmakefile { } # + # whole file: using INSTALLS_ICONS when it is not wanted + # + if (!($makevar{INSTALLS_ICONS} eq '') && + !needs_installs_icons()) { + &perror("WARN", $file, -1, "INSTALLS_ICONS is set, but should not be."); + } + + # # whole file: EXPIRATION_DATE # print "OK: checking for valid EXPIRATION_DATE.\n" if ($verbose); @@ -1999,8 +2036,8 @@ xargs xmkmf && $curline !~ /^CATEGORIES(.)?=[^\n]+$i/m && $curline !~ /^(\w+)?USES(.)?=[^\n]+$i/m && $curline !~ /^WX_COMPS(.)?=[^\n]+$i/m - && $curline !~ /^ONLY_FOR_ARCHS_REASON(.)?=[^\n]+$i/m - && $curline !~ /^NOT_FOR_ARCHS_REASON(.)?=[^\n]+$i/m + && $curline !~ /^ONLY_FOR_ARCHS_REASON(_[\w\d]+)?(.)?=[^\n]+$i/m + && $curline !~ /^NOT_FOR_ARCHS_REASON(_[\w\d]+)?(.)?=[^\n]+$i/m && $curline !~ /^SHEBANG_FILES(.)?=[^\n]+$i/m && $curline !~ /^[A-Z0-9_]+_DESC=[^\n]+$i/m && $curline !~ /^\s*#.+$/m @@ -2186,6 +2223,17 @@ xargs xmkmf } # + # whole file: USE_KDE check + # + if ($whole =~ /^USE_KDE[?:]?=\s*(.*)$/m) { + if ($makevar{USES} !~ /\bkde:5/) { + my $lineno = &linenumber($`); + &perror("WARN", $file, $lineno, "USE_KDE is defined without ". + "defining USES=kde:5"); + } + } + + # # whole file: USE_GCC checks # if ($whole =~ /^USE_GCC[?:]?=\s*([^\s#]*).*$/m) { @@ -3569,6 +3617,13 @@ sub urlcheck { "extra \":\"."); } } + +# GNOME wants INSTALL_ICONS, but Qt-based applications, including KDE, don't. +# Be pessimistic: everything needs it unless we know it doesn't. +sub needs_installs_icons { + return $makevar{USE_QT5} eq '' +} + sub TRUE {1;} # Local variables: