aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/portlint
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2004-05-01 02:25:00 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2004-05-01 02:25:00 +0000
commitce673392c8d0ac7f82233d093e7979dae8364c9f (patch)
treef807946a0ef4d84690968c6f3631e124c09e0cc9 /ports-mgmt/portlint
parent986ee705a7534ffb20b25d1ca118b2c2db0b5e83 (diff)
downloadports-ce673392c8d0ac7f82233d093e7979dae8364c9f.tar.gz
ports-ce673392c8d0ac7f82233d093e7979dae8364c9f.zip
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]
Notes
Notes: svn path=/head/; revision=108065
Diffstat (limited to 'ports-mgmt/portlint')
-rw-r--r--ports-mgmt/portlint/Makefile2
-rw-r--r--ports-mgmt/portlint/src/portlint.pl42
2 files changed, 38 insertions, 6 deletions
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 (<IN>) {
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 .= ' ';
@@ -1028,6 +1034,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
#
pos($whole) = 0;
@@ -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 ".