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]
This commit is contained in:
parent
daf9ab50f7
commit
9cc44c271c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=457486
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= portlint
|
||||
PORTVERSION= 2.17.14
|
||||
PORTVERSION= 2.17.15
|
||||
CATEGORIES= ports-mgmt
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -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 = <MK>) {
|
||||
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');
|
||||
@ -1822,6 +1851,14 @@ sub checkmakefile {
|
||||
"Use USES[+]=pkgconfig instead.");
|
||||
}
|
||||
|
||||
#
|
||||
# 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
|
||||
#
|
||||
@ -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
|
||||
@ -2185,6 +2222,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
|
||||
#
|
||||
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user