summaryrefslogtreecommitdiff
path: root/ports-mgmt/portlint
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2013-12-29 05:29:11 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2013-12-29 05:29:11 +0000
commit5916aa48db610387ac3e1e9325261828c411bdb6 (patch)
tree1a8799be3777d2eee100c11e30e09f02a80eb6c4 /ports-mgmt/portlint
parentUpdate to 2.40 (diff)
Update to 2.14.8.
* Do not warn on direct use of "false" if it is found in DESKTOP_ENTRIES. [1] * Make sure the DESKTOP_ENTRIES true/false parameter does not include quotes. * Remove an unreferenced variable dereference. [2] * Add some additional variables to avoid explicit command use checks. [3] PR: 185086 [1] 185225 [2] 185110 [3]
Notes
Notes: svn path=/head/; revision=337940
Diffstat (limited to 'ports-mgmt/portlint')
-rw-r--r--ports-mgmt/portlint/Makefile2
-rw-r--r--ports-mgmt/portlint/src/portlint.pl22
2 files changed, 16 insertions, 8 deletions
diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile
index 7c957330290d..1e20aafb443a 100644
--- a/ports-mgmt/portlint/Makefile
+++ b/ports-mgmt/portlint/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= portlint
-PORTVERSION= 2.14.7
+PORTVERSION= 2.14.8
CATEGORIES= ports-mgmt
MASTER_SITES= # none
DISTFILES= # none
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl
index 6241ba2c9fe9..3bbd1f8fa6d9 100644
--- a/ports-mgmt/portlint/src/portlint.pl
+++ b/ports-mgmt/portlint/src/portlint.pl
@@ -17,7 +17,7 @@
# OpenBSD and NetBSD will be accepted.
#
# $FreeBSD$
-# $MCom: portlint/portlint.pl,v 1.297 2013/10/26 14:41:47 marcus Exp $
+# $MCom: portlint/portlint.pl,v 1.302 2013/12/29 05:26:49 marcus Exp $
#
use strict;
@@ -52,7 +52,7 @@ $portdir = '.';
# version variables
my $major = 2;
my $minor = 14;
-my $micro = 7;
+my $micro = 8;
sub l { '[{(]'; }
sub r { '[)}]'; }
@@ -851,11 +851,11 @@ sub checkplist {
}
}
- if ($_ =~ m{^%%PORT(\w+)%%(.*?)%%(\w+)DIR%%(.*)$} and $1 ne $3) {
+ if ($_ =~ m{^%%PORT(\w+)%%(.*?)%%(\w+)DIR%%(.*)$} and $1 ne $3 and
+ defined($check_xxxdir_ok{$3})) {
&perror("WARN", $file, $., "Do not mix %%PORT$1%% with %%$3DIR%%. ".
"Use '%%PORT$check_xxxdir_ok{$3}%%$2%%$3DIR%%$4' instead and update Makefile ".
- "accordingly.") unless (defined($check_xxxdir_ok{$3}) and
- $check_xxxdir_ok{$3} eq $1);
+ "accordingly.") unless ($check_xxxdir_ok{$3} eq $1);
}
if ($_ =~ m#man/([^/]+/)?man([$manchapters])/([^\.]+\.[$manchapters])(\.gz)?$#) {
@@ -1630,8 +1630,9 @@ sub checkmakefile {
#
print "OK: checking DESKTOP_ENTRIES for \${TRUE}/\${FALSE}.\n" if ($verbose);
$desktop_entries = &get_makevar_raw('DESKTOP_ENTRIES');
- if ($desktop_entries =~ /\${TRUE}/ or $desktop_entries =~ /\${FALSE}/) {
- &perror("FATAL", $file, -1, "Use true/false instead of \${TRUE}/\${FALSE} in DESKTOP_ENTRIES.");
+ if ($desktop_entries =~ /\${TRUE}/ or $desktop_entries =~ /\${FALSE}/ or
+ $desktop_entries =~ /\"true\"/ or $desktop_entries =~ /\"false\"/) {
+ &perror("FATAL", $file, -1, "Use true/false (without quotes) instead of \${TRUE}/\${FALSE} in DESKTOP_ENTRIES.");
}
#
@@ -1893,6 +1894,11 @@ ruby sed sh sort sysctl touch tr which xargs xmkmf
# lines, and go through each one.
while ($j =~ /^(.*$i.*)$/gm) {
my $curline = $1;
+ my $dte_test = $curline;
+ $dte_test =~ s/^\s+//g;
+ if ($desktop_entries =~ /$dte_test$/) {
+ next;
+ }
my $lineno = &linenumber($`);
if ($curline =~ /(?:^|\s)[\@\-]{0,2}$i(?:$|\s)/
&& $curline !~ /^[A-Z]+_TARGET[?+]?=[^\n]+$i/m
@@ -1905,6 +1911,8 @@ ruby sed sh sort sysctl touch tr which xargs xmkmf
&& $curline !~ /^CATEGORIES(.)?=[^\n]+$i/m
&& $curline !~ /^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 !~ /^\s*#.+$/m
&& $curline !~ /\-\-$i/m
&& $curline !~ /^COMMENT(.)?=[^\n]+$i/m) {