[Midnightbsd-cvs] mports: portlint.pl: Replace a dead autotools link.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Sep 13 16:32:59 EDT 2008


Log Message:
-----------
Replace a dead autotools link.

Replace USE_*_VER with USE_AUTOTOOLS

Check for a valid expiration date.

Modified Files:
--------------
    mports/ports-mgmt/portlint/src:
        portlint.pl (r1.3 -> r1.4)

-------------- next part --------------
Index: portlint.pl
===================================================================
RCS file: /home/cvs/mports/ports-mgmt/portlint/src/portlint.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -L ports-mgmt/portlint/src/portlint.pl -L ports-mgmt/portlint/src/portlint.pl -u -r1.3 -r1.4
--- ports-mgmt/portlint/src/portlint.pl
+++ ports-mgmt/portlint/src/portlint.pl
@@ -25,6 +25,7 @@
 use Getopt::Std;
 use File::Find;
 use IPC::Open2;
+use POSIX qw(strftime);
 use strict;
 
 sub perror($$$$);
@@ -46,7 +47,7 @@
 # version variables
 my $major = 2;
 my $minor = 9;
-my $micro = 1;
+my $micro = 2;
 
 sub l { '[{(]'; }
 sub r { '[)}]'; }
@@ -1340,6 +1341,23 @@
 	}
 
 	#
+	# whole file: EXPIRATION_DATE
+	#
+	print "OK: checking for valid EXPIRATION_DATE.\n" if ($verbose);
+	my $edate;
+	if (($edate) = ($whole =~ m/\nEXPIRATION_DATE\??=[ \t]*([^\n]*)\n/)) {
+		my $lineno = &linenumber($`);
+		if ($edate ne strftime("%Y-%m-%d", 0, 0, 0,
+					substr($edate, 8, 2),
+					substr($edate, 5, 2) - 1,
+					substr($edate, 0, 4) - 1900)) {
+			&perror("FATAL", $file, $lineno, "EXPIRATION_DATE ($edate) is ".
+				"either not in YYYY-MM-DD format or it is not a valid ".
+				"date.");
+		}
+	}
+
+	#
 	# whole file: IS_INTERACTIVE/NOPORTDOCS
 	#
 	print "OK: checking IS_INTERACTIVE.\n" if ($verbose);
@@ -1394,7 +1412,7 @@
 			USE_AUTOHEADER_VER	=> 'USE_AUTOTOOLS',
 			USE_AUTOCONF_VER	=> 'USE_AUTOTOOLS',
 			WANT_AUTOCONF_VER	=> 'USE_AUTOTOOLS',
-			__HELP__			=> 'http://people.freebsd.org/~ade/autotools.txt',
+			__HELP__			=> 'http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/using-autotools.html',
 	);
 
 	%deprecated = (
@@ -1508,7 +1526,7 @@
 				&& $lm !~ /^COMMENT(.)?=[^\n]+($i\d*)/m) {
 					&perror("WARN", $file, $lineno, "possible direct use of ".
 						"command \"$sm\" found. Use $autocmdnames{$i} ".
-						"instead and set according USE_*_VER= flag");
+						"instead and set according USE_AUTOTOOLS=<tool> macro");
 			}
 		}
 	}


More information about the Midnightbsd-cvs mailing list