summaryrefslogtreecommitdiff
path: root/ports-mgmt/portlint/src
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2020-11-29 17:24:43 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2020-11-29 17:24:43 +0000
commit2ade1a8170d9da2c16e96e7d37ddc4a0709f823b (patch)
tree4005dac25b96d898f5e989fe4874741c8667d70c /ports-mgmt/portlint/src
parentdatabases/mongodb40: allow build with python 3 (diff)
Update to 2.19.3.
* Do not complain about USE_LDCONFIG32 [1] * Allow a master port to have its last line be ".endif" [2] * Attempt to find OPTIONS use in a smarter way [3] PR: 251431 [1] 251430 [2] 249970 [3] Submitted by: gerald [1]
Notes
Notes: svn path=/head/; revision=556590
Diffstat (limited to 'ports-mgmt/portlint/src')
-rw-r--r--ports-mgmt/portlint/src/portlint.pl37
1 files changed, 24 insertions, 13 deletions
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl
index 05336f32f6a2..ed4606cafee0 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.515 2020/05/31 15:15:06 jclarke Exp $
+# $MCom: portlint/portlint.pl,v 1.519 2020/11/29 17:21:16 jclarke Exp $
#
use strict;
@@ -50,7 +50,7 @@ $portdir = '.';
# version variables
my $major = 2;
my $minor = 19;
-my $micro = 2;
+my $micro = 3;
# default setting - for FreeBSD
my $portsdir = '/usr/ports';
@@ -1790,14 +1790,24 @@ sub checkmakefile {
}
if (!grep(/^$i$/, (@mopt, @popt))) {
if ($whole !~ /\n${i}_($m)(_\w+)?(.)?=[^\n]+/ and $whole !~ /\n[-\w]+-${i}-(on|off):\n/) {
- if (!$slaveport) {
- &perror("WARN", $file, -1, "$i is listed in ".
- "OPTIONS_DEFINE, but no PORT_OPTIONS:M$i appears.");
- } else {
- &perror("WARN", $file, -1, "$i is listed in ".
- "OPTIONS_DEFINE, but no PORT_OPTIONS:M$i appears ".
- "in this slave Makefile. Make sure it appears in ".
- "the master's Makefile.");
+ my $found_opt_use = 0;
+ foreach my $oarg ('BUILD_DEPENDS', 'RUN_DEPENDS', 'LIB_DEPENDS') {
+ my $oarg_var = &get_makevar("${i}_${oarg}");
+ if ($oarg_var ne "") {
+ $found_opt_use = 1;
+ last;
+ }
+ }
+ if (!$found_opt_use) {
+ if (!$slaveport) {
+ &perror("WARN", $file, -1, "$i is listed in ".
+ "OPTIONS_DEFINE, but no PORT_OPTIONS:M$i appears.");
+ } else {
+ &perror("WARN", $file, -1, "$i is listed in ".
+ "OPTIONS_DEFINE, but no PORT_OPTIONS:M$i appears ".
+ "in this slave Makefile. Make sure it appears in ".
+ "the master's Makefile.");
+ }
}
}
}
@@ -1830,7 +1840,7 @@ sub checkmakefile {
my $lineno = &linenumber($`);
&perror("WARN", $file, $lineno, "is $1$2 a user-settable option? ".
"Consider using WITH_$2 instead.")
- if ($1.$2 ne 'USE_GCC');
+ if ($1.$2 ne 'USE_GCC' && $1.$2 ne 'USE_LDCONFIG32');
}
#
@@ -2624,9 +2634,10 @@ xargs xmkmf
#$slaveport = 0;
print "OK: non-slave port detected, checking for anything after bsd.port(.post).mk.\n"
if ($verbose);
- if ($whole !~ /\n\.include\s+<bsd\.port(?:\.post)?\.mk>\s*$/s) {
+ if ($whole !~ /\n\.include\s+<bsd\.port(?:\.post)?\.mk>\s*$/s &&
+ $whole !~ /\n\.endif\s*$/s) {
&perror("FATAL", $file, -1, "the last line of Makefile has to be".
- ' .include <bsd.port(.post).mk>');
+ ' .include <bsd.port(.post).mk> (or .endif in the case of a conditional)');
}
if ($whole =~ /^MASTERDIR\s*[+?:!]?\s*=/m) {
&perror("WARN", $file, -1, "non-slave ports may not define MASTERDIR");