summaryrefslogtreecommitdiff
path: root/ports-mgmt/portlint/src
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2017-08-03 12:55:02 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2017-08-03 12:55:02 +0000
commit7fd91ebc31fccc63a6c5d827bfee1b62ada69212 (patch)
tree6da78545024f2d4753424635f8ea4aa270f041af /ports-mgmt/portlint/src
parentdevel/git-cinnabar: rebuild after r447205 (diff)
Update to 2.17.11.
* Trim comments after USE_GCC [1] * Add a check for redundant SHEBANG_LANG values [2] * Make sure both USES and USE_* are actually seen before checking to see if one is included before the other [3] PR: 221085 [1] 220500 [2] Submitted by: gerald [1] Reported by: dbaio [3]
Notes
Notes: svn path=/head/; revision=447208
Diffstat (limited to 'ports-mgmt/portlint/src')
-rw-r--r--ports-mgmt/portlint/src/portlint.pl23
1 files changed, 18 insertions, 5 deletions
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl
index a711720f562b..37e4ca1da97e 100644
--- a/ports-mgmt/portlint/src/portlint.pl
+++ b/ports-mgmt/portlint/src/portlint.pl
@@ -15,7 +15,7 @@
# was removed.
#
# $FreeBSD$
-# $MCom: portlint/portlint.pl,v 1.413 2017/07/22 01:46:20 jclarke Exp $
+# $MCom: portlint/portlint.pl,v 1.417 2017/08/03 12:52:43 jclarke Exp $
#
use strict;
@@ -50,7 +50,7 @@ $portdir = '.';
# version variables
my $major = 2;
my $minor = 17;
-my $micro = 10;
+my $micro = 11;
# default setting - for FreeBSD
my $portsdir = '/usr/ports';
@@ -159,7 +159,7 @@ my @varlist = qw(
OPTIONS_GROUP OPTIONS_SUB INSTALLS_OMF USE_RC_SUBR USES DIST_SUBDIR
ALLFILES CHECKSUM_ALGORITHMS INSTALLS_ICONS GNU_CONFIGURE
CONFIGURE_ARGS MASTER_SITE_SUBDIR LICENSE LICENSE_COMB NO_STAGE
- DEVELOPER SUB_FILES
+ DEVELOPER SUB_FILES SHEBANG_LANG
);
my %makevar;
@@ -230,7 +230,7 @@ while (my $mline = <MK>) {
}
}
}
-if ($uulineno < $ulineno) {
+if ($uulineno > -1 && $ulineno > -1 && $uulineno < $ulineno) {
&perror("WARN", 'Makefile', $uulineno, "USE_* seen before USES. ".
"According to the porters-handbook, USES must appear first.");
}
@@ -2175,7 +2175,7 @@ xargs xmkmf
#
# whole file: USE_GCC checks
#
- if ($whole =~ /^USE_GCC[?:]?=\s*(.*)$/m) {
+ if ($whole =~ /^USE_GCC[?:]?=\s*([^\s#]*).*$/m) {
my $lineno = &linenumber($`);
my $gcc_val = $1;
if ($gcc_val eq 'any' || $gcc_val eq 'yes') {
@@ -2269,6 +2269,19 @@ xargs xmkmf
}
#
+ # whole file: check for redundant SHEBANG_LANGs
+ #
+ if ($whole =~ /\nSHEBANG_LANG[?+]?=\s*([^\s#]*).*\n/) {
+ my @shebang_langs = split(/\s+/, $1 // '');
+ foreach my $shebang_lang (@shebang_langs) {
+ if ($makevar{SHEBANG_LANG} =~ /\b$shebang_lang\b/) {
+ &perror("WARN", $file, -1, "$shebang_lang is already included in ".
+ "SHEBANG_LANG. You should remove this from $file.");
+ }
+ }
+ }
+
+ #
# whole file: CONFIGURE_ENV
#
if ($whole =~ /\nCONFIGURE_ENV[?:+]?=\s*([^\\\n]+(\\\n[^\\\n]+)*)/) {