From c0d9e84d0bfee3e0dc4bc15b9f440ab1f7b3bfe5 Mon Sep 17 00:00:00 2001 From: mharo Date: Sat, 14 Sep 2002 18:57:41 +0000 Subject: Teach portlint to recognize RUN_DEPENDS=${BUILD_DEPENDS} and the like PR: 27182 Submitted by: Anton Berezin --- devel/portlint/Makefile | 2 +- devel/portlint/src/portlint.pl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'devel/portlint') diff --git a/devel/portlint/Makefile b/devel/portlint/Makefile index 92bc56f6b553..4248b7d4f7d2 100644 --- a/devel/portlint/Makefile +++ b/devel/portlint/Makefile @@ -8,7 +8,7 @@ # PORTNAME= portlint -PORTVERSION= 2.3.2 +PORTVERSION= 2.3.3 CATEGORIES= devel MASTER_SITES= # none DISTFILES= # none diff --git a/devel/portlint/src/portlint.pl b/devel/portlint/src/portlint.pl index d40afa00f7b1..2db5d109a6da 100644 --- a/devel/portlint/src/portlint.pl +++ b/devel/portlint/src/portlint.pl @@ -1222,12 +1222,24 @@ LIB_DEPENDS BUILD_DEPENDS RUN_DEPENDS FETCH_DEPENDS DEPENDS DEPENDS_TARGET if ($tmp =~ /(LIB_|BUILD_|RUN_|FETCH_)?DEPENDS/) { &checkearlier($file, $tmp, @varnames); + my %seen_depends; + if (!defined $ENV{'PORTSDIR'}) { $ENV{'PORTSDIR'} = $portsdir; } foreach my $i (grep(/^[A-Z_]*DEPENDS[?+]?=/, split(/\n/, $tmp))) { $i =~ s/^([A-Z_]*DEPENDS)[?+]?=[ \t]*//; $j = $1; + $seen_depends{$j}++; + if ($j ne 'DEPENDS' && + $i =~ /^\${([A-Z_]+DEPENDS)}\s*$/ && + $seen_depends{$1} && + $j ne $1) + { + print "OK: $j refers to $1, skipping checks.\n" + if ($verbose); + next; + } print "OK: checking ports listed in $j.\n" if ($verbose); foreach my $k (split(/\s+/, $i)) { -- cgit