diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2014-02-08 19:59:23 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2014-02-08 19:59:23 +0000 |
commit | aed7be51435796c5159f7210ac8823ae6794b9e0 (patch) | |
tree | 0d6a5b5feab2ad4085c27bd388819ea91637dea2 /ports-mgmt/portlint | |
parent | d4f15e20d8bdc5ca779d3edbd7cf57e76901b13a (diff) | |
download | ports-aed7be51435796c5159f7210ac8823ae6794b9e0.tar.gz ports-aed7be51435796c5159f7210ac8823ae6794b9e0.zip |
Notes
Diffstat (limited to 'ports-mgmt/portlint')
-rw-r--r-- | ports-mgmt/portlint/Makefile | 2 | ||||
-rw-r--r-- | ports-mgmt/portlint/src/portlint.pl | 35 |
2 files changed, 32 insertions, 5 deletions
diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index add956dcd2fc..66c5a0f7fe90 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= portlint -PORTVERSION= 2.14.9 +PORTVERSION= 2.14.10 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 c22d291f2b0a..cff4e72eb9dc 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.305 2014/01/05 05:50:13 marcus Exp $ +# $MCom: portlint/portlint.pl,v 1.310 2014/02/08 19:57:20 marcus Exp $ # use strict; @@ -52,7 +52,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 14; -my $micro = 9; +my $micro = 10; sub l { '[{(]'; } sub r { '[)}]'; } @@ -1237,6 +1237,12 @@ sub check_depends_syntax { "really necessary."); } + # Check for old-style LIB_DEPENDS + if ($j eq 'LIB_DEPENDS' && $m{'dep'} !~ m/^lib.*\.so$/) { + &perror("WARN", $file, -1, "$j the new format is ". + "libFOO.so (e.g., lib$m{'dep'}.so)."); + } + # check port dir existence $k = $m{'dir'}; $k =~ s/\${PORTSDIR}/$ENV{'PORTSDIR'}/; @@ -1636,6 +1642,25 @@ sub checkmakefile { &perror("FATAL", $file, -1, "Use true/false (without quotes) instead of \${TRUE}/\${FALSE} in DESKTOP_ENTRIES."); } + my @dte_parts = split(/\s+/, $desktop_entries); + my $dtc = 0; + my $dte_quote = 0; + foreach my $dte_part (@dte_parts) { + if ($dtc % 5 == 0 && $dte_part eq '""') { + &perror("FATAL", $file, -1, "Use true/false (without quotes) instead of \${TRUE}/\${FALSE} in DESKTOP_ENTRIES."); + } + if ($dte_quote == 1 && $dte_part =~ /"$/) { + $dte_quote = 0; + } + if ($dte_part =~ /^"[^"]+$/) { + $dte_quote = 1; + next; + } + if (!$dte_quote) { + $dtc++; + } + } + # # whole file: USE_* as a user-settable option # @@ -2536,7 +2561,7 @@ DIST_SUBDIR EXTRACT_ONLY if ($makevar{MASTER_SITES} ne '' && ! grep {$makevar{MASTER_SITES} =~ m|$_|} @MASTERSITES_WHITELIST) { my @sites = split(/\s+/, $makevar{MASTER_SITES}); - if (scalar(@sites) == 1) { + if (scalar(@sites) == 1 && !&is_predefined($sites[0], undef)) { &perror("WARN", $file, -1, "only one MASTER_SITE configured. ". "Consider adding additional mirrors."); } @@ -3485,7 +3510,7 @@ sub is_predefined { $site_re = quotemeta $site; $site_re =~ s,$subdir_re,/(.*)/,; - if ($url =~ /$site_re/) { + if ($url =~ /$site_re/ && $file) { my $pe = "how about using \"\${MASTER_SITE_$predefined{$site}}\" "; if ($1) { $pe .= "with \"MASTER_SITE_SUBDIR=$1\", "; @@ -3493,6 +3518,8 @@ sub is_predefined { $pe .= "instead of \"$url\"?"; &perror("WARN", $file, -1, $pe); return &TRUE; + } elsif ($url =~ /$site_re/ && !$file) { + return &TRUE; } } undef; |