From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 7 16:30:43 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4788D16A578 for ; Tue, 7 Sep 2004 16:30:43 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D02B443D64 for ; Tue, 7 Sep 2004 16:30:31 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i87GUVha031507 for ; Tue, 7 Sep 2004 16:30:31 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i87GUVmS031506; Tue, 7 Sep 2004 16:30:31 GMT (envelope-from gnats) Resent-Date: Tue, 7 Sep 2004 16:30:31 GMT Resent-Message-Id: <200409071630.i87GUVmS031506@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yen-Ming Lee Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4048916A4CE; Tue, 7 Sep 2004 16:27:05 +0000 (GMT) Received: from utopia.leeym.com (utopia.leeym.com [211.21.137.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF72A43D49; Tue, 7 Sep 2004 16:27:04 +0000 (GMT) (envelope-from leeym@utopia.leeym.com) Received: from localhost (localhost [127.0.0.1]) by utopia.leeym.com (Postfix) with ESMTP id DA2833EADDA; Wed, 8 Sep 2004 00:27:03 +0800 (CST) Received: from utopia.leeym.com ([127.0.0.1]) by localhost (utopia.leeym.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 60054-04; Wed, 8 Sep 2004 00:26:54 +0800 (CST) Received: by utopia.leeym.com (Postfix, from userid 1000) id DB8523EADDD; Wed, 8 Sep 2004 00:26:52 +0800 (CST) Message-Id: <20040907162652.DB8523EADDD@utopia.leeym.com> Date: Wed, 8 Sep 2004 00:26:52 +0800 (CST) From: Yen-Ming Lee To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: marcus@FreeBSD.org Subject: ports/71468: [PATCH] devel/portlint: check OPTIONS X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2004 16:30:43 -0000 >Number: 71468 >Category: ports >Synopsis: [PATCH] devel/portlint: check OPTIONS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Sep 07 16:30:31 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Yen-Ming Lee >Release: FreeBSD 5.3-BETA3 i386 >Organization: FreeBSD Taiwan >Environment: System: FreeBSD utopia.leeym.com 5.3-BETA3 FreeBSD 5.3-BETA3 #1: Sun Sep 5 01:06:46 CST >Description: - check if all options listed in OPTIONS have related definitions. - check if any WITH_* or WITHOUT_* defined but not listed in OPTIONS. (disabled temporarily, since some ports still use ${SCRIPTDIR}/configure*) Port maintainer (marcus@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- portlint-2.6.7.patch begins here --- Index: src/portlint.pl =================================================================== RCS file: /home/pcvs/ports/devel/portlint/src/portlint.pl,v retrieving revision 1.63 diff -u -u -r1.63 portlint.pl --- src/portlint.pl 1 Sep 2004 04:13:32 -0000 1.63 +++ src/portlint.pl 7 Sep 2004 14:47:55 -0000 @@ -174,7 +174,7 @@ MASTER_SITES WRKDIR WRKSRC NO_WRKSUBDIR PATCHDIR SCRIPTDIR FILESDIR PKGDIR COMMENT DESCR PLIST PKGCATEGORY PKGINSTALL PKGDEINSTALL PKGREQ PKGMESSAGE MD5_FILE .CURDIR INSTALLS_SHLIB USE_LIBTOOL_VER - INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER + INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER OPTIONS ); my $cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", @varlist); @@ -1020,6 +1020,7 @@ my $use_gnome_hack = 0; my($realwrksrc, $wrksrc, $nowrksubdir) = ('', '', ''); my(@mman, @pman); + my(@mopt, @oopt); my($pkg_version, $versiondir, $versionfile) = ('', '', ''); my $useindex = 0; my %deprecated = (); @@ -2306,6 +2307,25 @@ "use post-patch instead."); } + # check OPTIONS + print "OK: checking OPTIONS.\n" if ($verbose); + @oopt = ($makevar{OPTIONS} =~ /(\w+)\s+\".*?\"\s+\w+/sg); + @mopt = ($tmp =~ /^\s*\.\s*(?:ifdef\s+|if\s+defined\s*)\(?\s*WITH(?:OUT)?_(\w+)\s*\)?/mg); + foreach my $i (@oopt) { + if (!grep(/^$i$/, @mopt)) { + &perror("WARN: $file: $i is listed in OPTIONS, ". + "but neither WITH_$i nor WITHOUT_$i appears."); + } + } + foreach my $i (@mopt) { + next if ($i eq 'NLS'); # skip WITHOUT_NLS + if (!grep(/^$i$/, @oopt)) { + # XXX: disabled temporarily. + # Some ports still use ${SCRIPTDIR}/configure* scripts + #&perror("WARN: $file: WITH_$i or WITHOUT_$i appears, ". + # "consider using OPTIONS macro."); + } + } 1; } --- portlint-2.6.7.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: