From ce673392c8d0ac7f82233d093e7979dae8364c9f Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Sat, 1 May 2004 02:25:00 +0000 Subject: Update to 2.6.1. * Add a check to see if PLIST_{FILES,DIRS} is defined and pkg-plist exists. If so, print an error [1] * Add a check for direct usage of iconv.\d+ and intl.\d+ instead of USE_ICONV and USE_GETTEXT [1] * If %%DOCSDIR%% is used in the plist, make sure @dirrm %%DOCSDIR%% is also present [1] * Don't flag a missing distinfo as FATAL [2] Submitted by: krion [1] eik [2] --- ports-mgmt/portlint/Makefile | 2 +- ports-mgmt/portlint/src/portlint.pl | 42 ++++++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 6 deletions(-) (limited to 'ports-mgmt/portlint') diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index ee68a6f92ed9..cd6b13d3647d 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -8,7 +8,7 @@ # PORTNAME= portlint -PORTVERSION= 2.6.0 +PORTVERSION= 2.6.1 CATEGORIES= devel MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index 74d0e4216c57..71b68db77a2a 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -17,7 +17,7 @@ # OpenBSD and NetBSD will be accepted. # # $FreeBSD$ -# $Id: portlint.pl,v 1.44 2004/03/26 20:42:32 marcus Exp $ +# $Id: portlint.pl,v 1.46 2004/05/01 02:22:20 marcus Exp $ # use vars qw/ $opt_a $opt_A $opt_b $opt_c $opt_h $opt_t $opt_v $opt_M $opt_N $opt_B $opt_V /; @@ -40,7 +40,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 6; -my $micro = 0; +my $micro = 1; sub l { '[{(]'; } sub r { '[)}]'; } @@ -250,12 +250,11 @@ close(IN); # # check for files. # -my @checker = ($makevar{DESCR}, 'Makefile', 'distinfo', $makevar{MD5_FILE}); +my @checker = ($makevar{DESCR}, 'Makefile', $makevar{MD5_FILE}); my %checker = ( $makevar{DESCR} => 'checkdescr', 'Makefile' => 'checkmakefile', - $makevar{MD5_FILE} => 'TRUE', - 'distinfo' => 'checkdistinfo', + $makevar{MD5_FILE} => 'checkdistinfo', ); if ($extrafile) { my @files = ( @@ -584,6 +583,8 @@ sub checkplist { my(@omffile) = (); my(@infofile) = (); + my $seen_dirrm_docsdir; + open(IN, "< $file") || return 0; while () { if ($_ =~ /[ \t]+\n?$/) { @@ -603,6 +604,7 @@ sub checkplist { &perror("WARN: $file [$.]: use \%\%SITE_PERL\%\% ". "instead of lib/perl5/site_perl/\%\%PERL_VER\%\%."); } + $seen_dirrm_docsdir++ if /^(\%\%PORTDOCS\%\%)?\@dirrm\s+\%\%DOCSDIR\%\%/; if ($_ =~ /^\@/) { if ($_ =~ /^\@(cwd|cd)[ \t]+(\S+)/) { $curdir = $2; @@ -766,6 +768,10 @@ sub checkplist { } } + if ($sharedocused && !$seen_dirrm_docsdir) { + &perror("WARN: $file: \%\%PORTDOCS\%\%\@dirrm \%\%DOCSDIR\%\% is missing"); + } + # Check that each OMF file has an install and deinstall line. my $omf_install = join(" ", @exec_omf); $omf_install .= ' '; @@ -1027,6 +1033,18 @@ sub checkmakefile { } } + # + # whole file: PLIST_FILES and PLIST_DIRS + # + print "OK: checking PLIST_FILES and PLIST_DIRS.\n" if ($verbose); + if ($whole =~ /\nPLIST_FILES.?=/ || $whole =~ /\nPLIST_DIRS.?=/) { + if (-f 'pkg-plist') { + my $lineno = &linenumber($`); + &perror("WARN: $file [$lineno]: You may remove pkg-plist ". + "if you use PLIST_FILES and/or PLIST_DIRS."); + } + } + # # whole file: USE_* used too late # @@ -1847,6 +1865,20 @@ FETCH_DEPENDS DEPENDS DEPENDS_TARGET "USE_PERL5."); } + # check USE_ICONV + if ($m{'dep'} =~ /^(iconv\.\d+)$/) { + &perror("WARN: $file: dependency to $1 ". + "listed in $j. consider using ". + "USE_ICONV."); + } + + # check USE_GETTEXT + if ($m{'dep'} =~ /^(intl\.\d+)$/) { + &perror("WARN: $file: dependency to $1 ". + "listed in $j. consider using ". + "USE_GETTEXT."); + } + # check USE_GMAKE if ($m{'dep'} =~ /^(gmake|\${GMAKE})$/) { &perror("WARN: $file: dependency to $1 ". -- cgit v1.2.3