From root@helo.liwing.de  Wed Aug 13 01:35:04 2003
Return-Path: <root@helo.liwing.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 984FF37B401; Wed, 13 Aug 2003 01:35:04 -0700 (PDT)
Received: from helo.liwing.de (helo.liwing.de [213.70.188.163])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 6184B43F85; Wed, 13 Aug 2003 01:35:03 -0700 (PDT)
	(envelope-from root@helo.liwing.de)
Received: from helo.liwing.de (localhost.liwing.de [127.0.0.1])
	by helo.liwing.de (8.12.7/8.12.7) with ESMTP id h7D8Z16l086378;
	Wed, 13 Aug 2003 08:35:01 GMT
	(envelope-from root@helo.liwing.de)
Received: (from root@localhost)
	by helo.liwing.de (8.12.7/8.12.7/Submit) id h7D8Z0Kd086377;
	Wed, 13 Aug 2003 08:35:00 GMT
Message-Id: <200308130835.h7D8Z0Kd086377@helo.liwing.de>
Date: Wed, 13 Aug 2003 08:35:00 GMT
From: Jens Rehsack <rehsack@liwing.de>
Reply-To: Jens Rehsack <rehsack@liwing.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Jens Rehsack <rehsack@liwing.de>, marcus@freebsd.org
Subject: [PATCH] update of devel/portlint to recognize eg. autocommands
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         55529
>Category:       ports
>Synopsis:       [PATCH] update of devel/portlint to recognize eg. autocommands
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    marcus
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 13 01:40:18 PDT 2003
>Closed-Date:    Thu Aug 14 22:05:54 PDT 2003
>Last-Modified:  Thu Aug 14 22:05:54 PDT 2003
>Originator:     Jens Rehsack
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
LiWing IT-Services
>Environment:
System: FreeBSD statler 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Mon Aug 11 08:11:10 GMT 2003 trevor@statler:/usr/obj/usr/src/sys/STATLER i386


	
>Description:
	Before submitting new port in PR ports/55514 I tested it with portlint.
	The morning after I detected, that I'm using aclocal and libtoolize
	directly instead of using ${ACLOCAL}. So I'm adding the according test
	inclusive WARN to portlint.
>How-To-Repeat:
	
>Fix:

	

--- patch-moreargs begins here ---
Index: devel/portlint/src/portlint.pl
===================================================================
diff -u devel/portlint/src/portlint.pl.orig devel/portlint/src/portlint.pl
--- devel/portlint/src/portlint.pl.orig	Wed Aug 13 07:56:38 2003
+++ devel/portlint/src/portlint.pl	Wed Aug 13 08:27:07 2003
@@ -870,7 +870,8 @@
 	print "OK: checking direct use of command names.\n" if ($verbose);
 	foreach my $i (qw(
 awk basename cat chmod chown cp echo expr false file find gmake grep gzcat
-ldconfig ln md5 mkdir mv patch rm rmdir sed sh touch tr which xargs xmkmf
+ldconfig ln md5 mkdir mv patch perl rm rmdir ruby sed sh touch tr which
+xargs xmkmf
 	)) {
 		$cmdnames{$i} = "\$\{\U$i\E\}";
 	}
@@ -878,7 +879,13 @@
 	$cmdnames{'gunzip'} = '${GUNZIP_CMD}';
 	$cmdnames{'gzip'} = '${GZIP_CMD}';
 	$cmdnames{'install'} = '${INSTALL_foobaa}';
+	$cmdnames{'python'} = '${PYTHON_CMD}';
 	$cmdnames{'strip'} = '${STRIP_CMD}';
+	foreach my $i (qw(
+aclocal autoconf autoheader automake autoreconf autoupdate autoscan ifnames libtool libtoolize
+	)) {
+		$autocmdnames{$i} = "\$\{" . ( ( $i !~ /auto|aclocal/ ) ? "AUTO" : "" ) . "\U$i\E\}";
+	}
 	#
 	# ignore parameter string to echo command.
 	# note that we leave the command as is, since we need to check the
@@ -891,6 +898,16 @@
 	     && $j !~ /^COMMENT(.)?=/) {
 			&perror("WARN: possible direct use of command \"$i\" ".
 				"found. use $cmdnames{$i} instead.");
+		}
+	}
+
+	foreach my $i (keys %autocmdnames) {
+		if ($j =~ /[\s\/]($i\d*)[\s;]/
+		 && $j !~ /\n[A-Z]+_TARGET[?+]?=[^\n]+($i\d*)/
+		 && $j !~ /^COMMENT(.)?=/) {
+			&perror("WARN: possible direct use of command \"$1\" ".
+				"found. Use $autocmdnames{$i} instead and ".
+				"set according USE_*_VER= flag");
 		}
 	}
 
--- patch-moreargs ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->marcus 
Responsible-Changed-By: erwin 
Responsible-Changed-When: Wed Aug 13 02:01:01 PDT 2003 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55529 
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Thu Aug 14 22:05:44 PDT 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55529 
>Unformatted:
