aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-05-01 10:25:00 +0800
committermarcus <marcus@FreeBSD.org>2004-05-01 10:25:00 +0800
commitfd3c1bf9da0ddf8178a71179cd581262a1d78a84 (patch)
tree228f6c09972aa9d6570b1d5f42eda402f741b463 /devel
parenta320cf41e8ce82278773e043d57ca1584db07cca (diff)
downloadfreebsd-ports-graphics-fd3c1bf9da0ddf8178a71179cd581262a1d78a84.tar.gz
freebsd-ports-graphics-fd3c1bf9da0ddf8178a71179cd581262a1d78a84.tar.zst
freebsd-ports-graphics-fd3c1bf9da0ddf8178a71179cd581262a1d78a84.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]
Diffstat (limited to 'devel')
-rw-r--r--devel/portlint/Makefile2
-rw-r--r--devel/portlint/src/portlint.pl42
2 files changed, 38 insertions, 6 deletions
diff --git a/devel/portlint/Makefile b/devel/portlint/Makefile
index ee68a6f92ed..cd6b13d3647 100644
--- a/devel/portlint/Makefile
+++ b/devel/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/devel/portlint/src/portlint.pl b/devel/portlint/src/portlint.pl
index 74d0e4216c5..71b68db77a2 100644
--- a/devel/portlint/src/portlint.pl
+++ b/devel/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 ".