ports/54381: [PATCH] add support for SITE_PERL to portlint

Oliver Eikemeier eikemeier at fillmore-labs.com
Fri Jul 11 15:10:17 UTC 2003


>Number:         54381
>Category:       ports
>Synopsis:       [PATCH] add support for SITE_PERL to portlint
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 11 08:10:15 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Eikemeier
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 4.8-STABLE

>Description:

SITE_PERL is available since bsd.port.mk revision 1.433
  <http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk#rev1.433>

FreeBSD ports should standardize on using it.

>How-To-Repeat:
>Fix:

Proposed patch below. Additionally either the portrevision or the
portversion must be bumped.

--- portlint-SITE_PERL.patch begins here ---
--- src/portlint.pl.orig	Fri Mar  7 21:15:54 2003
+++ src/portlint.pl	Fri Jul 11 16:10:22 2003
@@ -420,6 +420,10 @@
 			&perror("WARN: $file $.: use of <\$ARCH> deprecated, ".
 				"use \${MACHINE_ARCH} instead.");
 		}
+		if (m'lib/perl5/site_perl/%%PERL_VER%%') {
+			&perror("WARN: $file $.: use %%SITE_PERL%% ".
+				"instead of lib/perl5/site_perl/%%PERL_VER%%.");
+		}
 		if ($_ =~ /^\@/) {
 			if ($_ =~ /^\@(cwd|cd)[ \t]+(\S+)/) {
 				$curdir = $2;
@@ -832,6 +836,23 @@
 	# whole file: full path name
 	#
 	&abspathname($whole, $file);
+
+	#
+	# whole file: SITE_PERL
+	#
+	print "OK: checking SITE_PERL.\n" if ($verbose);
+	if ($whole =~ /\nSITE_PERL[?:]?=/) {
+		&perror("FATAL: use of SITE_PERL discouraged. ".
+			"it is set in bsd.port.mk.");
+	}
+	
+	#
+	# whole file: ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}
+	#
+	if ($j =~ m'\${(?:LOCALBASE|PREFIX)}/lib/perl5/site_perl/\${PERL_VER}') {
+		&perror("WARN: possible use of \"\${LOCALBASE}/lib/perl5/site_perl/\${PERL_VER}\" ".
+			"found. use \"\${SITE_PERL}\" instead.");
+	}
 
 	#
 	# slave port check
--- portlint-SITE_PERL.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list