aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports-mgmt/portlint/Makefile2
-rw-r--r--ports-mgmt/portlint/src/portlint.pl13
2 files changed, 13 insertions, 2 deletions
diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile
index d4f50b743d04..a88c542754da 100644
--- a/ports-mgmt/portlint/Makefile
+++ b/ports-mgmt/portlint/Makefile
@@ -3,7 +3,7 @@
PORTNAME= portlint
PORTVERSION= 2.18.8
-PORTREVISION= 1
+PORTREVISION= 2
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 70f44a4cc965..c5775fc68e88 100644
--- a/ports-mgmt/portlint/src/portlint.pl
+++ b/ports-mgmt/portlint/src/portlint.pl
@@ -1790,7 +1790,7 @@ sub checkmakefile {
}
#
- # while file: check that CMAKE_BOOL just has words
+ # whole file: check that CMAKE_BOOL just has words
#
print "OK: checking that *_CMAKE_BOOL only contains words.\n" if ($verbose);
if ($whole =~ /\n([\w\d]+)_CMAKE_BOOL[?+:]?=([^\n]+)\n/) {
@@ -1802,6 +1802,17 @@ sub checkmakefile {
}
}
+ print "OK: checking that *CMAKE* co-occurs with *USES+=cmake.\n" if ($verbose);
+ while ($whole =~ /\n([\w\d]+_)?CMAKE_(ARGS|BOOL|BOOL_ON|BOOL_OFF|OFF|ON)\b/g) {
+ my $lineno = &linenumber($`);
+ my $o = $1;
+ my $found_cmake = 0;
+ unless ($makevar{USES} =~ /\b(cmake\b|cmake:)/) {
+ $o = "" unless ($o);
+ &perror("FATAL", $file, $lineno, "${o}CMAKE_$2 is set without USES+=cmake");
+ }
+ }
+
#
# whole file: NO_CHECKSUM
#