From owner-freebsd-ports Mon May 7 8:30:20 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C360137B423 for ; Mon, 7 May 2001 08:30:11 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f47FUBC32762; Mon, 7 May 2001 08:30:11 -0700 (PDT) (envelope-from gnats) Received: from ns1-dmz.rh.dk (gw-ext.rh.dk [130.226.106.3]) by hub.freebsd.org (Postfix) with ESMTP id 81B8837B424; Mon, 7 May 2001 08:25:41 -0700 (PDT) (envelope-from tobez@td.rh.dk) Received: from ns1-int.rh.dk (ns1-108.rh.dk [130.226.108.194]) by ns1-dmz.rh.dk (Postfix) with ESMTP id 42C34567C8; Mon, 7 May 2001 17:25:40 +0200 (CEST) Received: from creat.td.rh.dk (creat.td.rh.dk [172.31.211.71]) by ns1-int.rh.dk (8.9.3/8.9.3/mailhub-rh-dk-0.1) with ESMTP id RAA88371; Mon, 7 May 2001 17:25:39 +0200 (CEST) (envelope-from tobez@td.rh.dk) Received: (from tobez@localhost) by creat.td.rh.dk (8.11.3/8.11.3/creat-td-rh-dk-0.1) id f47FPX166024; Mon, 7 May 2001 17:25:33 +0200 (CEST) (envelope-from tobez) Message-Id: <200105071525.f47FPX166024@creat.td.rh.dk> Date: Mon, 7 May 2001 17:25:33 +0200 (CEST) From: tobez@tobez.org Reply-To: tobez@tobez.org To: FreeBSD-gnats-submit@freebsd.org Cc: mharo@freebsd.org, clive@CirX.ORG X-Send-Pr-Version: 3.113 Subject: ports/27182: Teach portlint to recognize RUN_DEPENDS=${BUILD_DEPENDS} and the like Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 27182 >Category: ports >Synopsis: Teach portlint to recognize RUN_DEPENDS=${BUILD_DEPENDS} and the like >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon May 07 08:30:05 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Anton Berezin >Release: FreeBSD 4.3-STABLE i386 >Organization: >Environment: >Description: Quite a number of ports use a construction of a form RUN_DEPENDS=${BUILD_DEPENDS} This is very useful, and is better than the alternative of specifying the same dependencies twice. Unfortunately, portlint does not like this construct. I think that portlint should be modified to specifically allow such things. >How-To-Repeat: Run portlint on, for example, textproc/p5-Text-Graphics >Fix: --- src/portlint.pl.orig Mon May 7 11:52:20 2001 +++ src/portlint.pl Mon May 7 17:09:58 2001 @@ -1222,12 +1222,24 @@ 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)) { --- Makefile.orig Mon May 7 17:14:18 2001 +++ Makefile Mon May 7 17:14:39 2001 @@ -8,7 +8,7 @@ # PORTNAME= portlint -PORTVERSION= 2.3.2 +PORTVERSION= 2.3.3 CATEGORIES= devel MASTER_SITES= # none DISTFILES= # none >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message