diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2006-11-25 20:02:50 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2006-11-25 20:02:50 +0000 |
commit | 4da8cefd2f60fe4b9946a3bac5f328c14bc2e7e1 (patch) | |
tree | f46f6c15aa3af9a3c12ca442d658960e30803649 /ports-mgmt/portlint/src | |
parent | 0343b63483a57ea829e1919f041f07110558de05 (diff) |
Update to 2.9.2.
* Replace a dead autotools link with a FreeBSD-based link instead [1]
* Replace USE_*_VER with USE_AUTOTOOLS instead [2]
* Check for a valid EXPIRATION_DATE [3]
PR: 104042 [3]
Requested by: piotr.smyrak@heron.pl [1]
Reported by: ahze [2]
Submitted by: vd [3]
Notes
Notes:
svn path=/head/; revision=178032
Diffstat (limited to 'ports-mgmt/portlint/src')
-rw-r--r-- | ports-mgmt/portlint/src/portlint.pl | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index bbb03e8ce828..1d70537eb977 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -17,13 +17,14 @@ # OpenBSD and NetBSD will be accepted. # # $FreeBSD$ -# $MCom: portlint/portlint.pl,v 1.123 2006/08/06 22:36:21 marcus Exp $ +# $MCom: portlint/portlint.pl,v 1.126 2006/11/25 20:00:02 marcus Exp $ # use vars qw/ $opt_a $opt_A $opt_b $opt_C $opt_c $opt_g $opt_h $opt_t $opt_v $opt_M $opt_N $opt_B $opt_V /; use Getopt::Std; use File::Find; use IPC::Open2; +use POSIX qw(strftime); use strict; sub perror($$$$); @@ -45,7 +46,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 9; -my $micro = 1; +my $micro = 2; sub l { '[{(]'; } sub r { '[)}]'; } @@ -1338,6 +1339,23 @@ sub checkmakefile { } # + # 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); @@ -1392,7 +1410,7 @@ sub checkmakefile { 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 = ( @@ -1503,7 +1521,7 @@ ruby sed sh sort sysctl touch tr which xargs xmkmf && $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"); } } } |