aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2017-08-03 20:55:02 +0800
committermarcus <marcus@FreeBSD.org>2017-08-03 20:55:02 +0800
commitc2e21e8feb160cd1fc7aa69993d2de1d79afee03 (patch)
tree6da78545024f2d4753424635f8ea4aa270f041af
parent1b97ea6b026ea4292ed7fc0c708ecdb80cbca85d (diff)
downloadfreebsd-ports-gnome-c2e21e8feb160cd1fc7aa69993d2de1d79afee03.tar.gz
freebsd-ports-gnome-c2e21e8feb160cd1fc7aa69993d2de1d79afee03.tar.zst
freebsd-ports-gnome-c2e21e8feb160cd1fc7aa69993d2de1d79afee03.zip
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]
-rw-r--r--ports-mgmt/portlint/Makefile2
-rw-r--r--ports-mgmt/portlint/src/portlint.pl23
2 files changed, 19 insertions, 6 deletions
diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile
index 0bda4afeb034..4530c2365ed6 100644
--- a/ports-mgmt/portlint/Makefile
+++ b/ports-mgmt/portlint/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= portlint
-PORTVERSION= 2.17.10
+PORTVERSION= 2.17.11
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 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]+)*)/) {