mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
Update to 2.6.0
* Add some additional checks for USE_* variables included too late [1] * Add a check for SIZE in distinfo [2] * Fix a small style nit [2] * Warn is USE_SIZE is used in a port's Makefile * Check to see if a port supports WITHOUT_NLS if USE_GETTEXT is defined [3] Submitted by: eik [1] krion [2] Requested by: kris [3]
This commit is contained in:
parent
0a36889426
commit
6ab42818d7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=105377
@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= portlint
|
||||
PORTVERSION= 2.5.9
|
||||
PORTVERSION= 2.6.0
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -17,7 +17,7 @@
|
||||
# OpenBSD and NetBSD will be accepted.
|
||||
#
|
||||
# $FreeBSD$
|
||||
# $Id: portlint.pl,v 1.43 2004/03/21 07:31:33 marcus Exp $
|
||||
# $Id: portlint.pl,v 1.44 2004/03/26 20:42:32 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 /;
|
||||
@ -39,8 +39,8 @@ $portdir = '.';
|
||||
|
||||
# version variables
|
||||
my $major = 2;
|
||||
my $minor = 5;
|
||||
my $micro = 9;
|
||||
my $minor = 6;
|
||||
my $micro = 0;
|
||||
|
||||
sub l { '[{(]'; }
|
||||
sub r { '[)}]'; }
|
||||
@ -250,12 +250,13 @@ close(IN);
|
||||
#
|
||||
# check for files.
|
||||
#
|
||||
my @checker = ($makevar{DESCR}, 'Makefile', $makevar{MD5_FILE});
|
||||
my @checker = ($makevar{DESCR}, 'Makefile', 'distinfo', $makevar{MD5_FILE});
|
||||
my %checker = (
|
||||
$makevar{DESCR} => 'checkdescr',
|
||||
'Makefile' => 'checkmakefile',
|
||||
$makevar{MD5_FILE} => 'TRUE'
|
||||
);
|
||||
$makevar{DESCR} => 'checkdescr',
|
||||
'Makefile' => 'checkmakefile',
|
||||
$makevar{MD5_FILE} => 'TRUE',
|
||||
'distinfo' => 'checkdistinfo',
|
||||
);
|
||||
if ($extrafile) {
|
||||
my @files = (
|
||||
<$makevar{SCRIPTDIR}/*>,
|
||||
@ -492,6 +493,24 @@ if ($err || $warn) {
|
||||
}
|
||||
exit $err;
|
||||
|
||||
#
|
||||
# distinfo
|
||||
#
|
||||
sub checkdistinfo {
|
||||
my($file) = @_;
|
||||
my($sizefound) = 0;
|
||||
open(IN, "< $file") || return 0;
|
||||
while (<IN>) {
|
||||
if ($_ =~ /^SIZE/) {
|
||||
$sizefound = 1;
|
||||
}
|
||||
}
|
||||
if (!$sizefound) {
|
||||
&perror("WARN: $file: does not contain SIZE.");
|
||||
}
|
||||
close(IN);
|
||||
}
|
||||
|
||||
#
|
||||
# pkg-descr
|
||||
#
|
||||
@ -693,7 +712,7 @@ sub checkplist {
|
||||
|
||||
if ($_ =~ /^info\/dir$/) {
|
||||
&perror("FATAL: $file [$.]: \"info/dir\" should not be listed.".
|
||||
"use install-info to add/remove ".
|
||||
"Use install-info to add/remove ".
|
||||
"an entry.");
|
||||
$infooverwrite++;
|
||||
}
|
||||
@ -1016,18 +1035,20 @@ sub checkmakefile {
|
||||
print "OK: checking for USE_* used too late.\n" if ($verbose);
|
||||
my @use_early = qw(
|
||||
APACHE
|
||||
BZIP2
|
||||
GNUSTEP
|
||||
IMAKE
|
||||
JAVA
|
||||
KDE(?:BASE|LIBS)_VER
|
||||
LIBRUBY
|
||||
(?:LIB)?RUBY
|
||||
LINUX_PREFIX
|
||||
OPENSSL
|
||||
PHP
|
||||
PYTHON
|
||||
QT2?
|
||||
QT_VER
|
||||
RUBY
|
||||
X_PREFIX
|
||||
ZIP
|
||||
);
|
||||
|
||||
my @other_early = qw(
|
||||
@ -1069,6 +1090,16 @@ sub checkmakefile {
|
||||
"it is intended to be a user variable.");
|
||||
}
|
||||
|
||||
#
|
||||
# whole file: USE_SIZE
|
||||
#
|
||||
print "OK: checking USE_SIZE.\n" if ($verbose);
|
||||
if ($whole =~ /\nUSE_SIZE/) {
|
||||
my $lineno = &linenumber($`);
|
||||
&perror("WARN: $file [$lineno]: use of USE_SIZE is no longer ".
|
||||
"required.");
|
||||
}
|
||||
|
||||
#
|
||||
# whole file: MACHINE_ARCH
|
||||
#
|
||||
@ -1114,6 +1145,15 @@ sub checkmakefile {
|
||||
"installation of files into $localbase/share/doc.");
|
||||
}
|
||||
|
||||
#
|
||||
# whole file: check for USE_GETTEXT
|
||||
#
|
||||
print "OK: checking for USE_GETTEXT without WITHOUT_NLS.\n" if ($verbose);
|
||||
if ($whole =~ /\nUSE_GETTEXT/ && $whole !~ /def(?:ined)?\s*\(?WITHOUT_NLS\)?/) {
|
||||
&perror("WARN: $file: Consider adding support for a WITHOUT_NLS ".
|
||||
"knob to conditionally disable gettext support.");
|
||||
}
|
||||
|
||||
#
|
||||
# whole file: direct use of command names
|
||||
#
|
||||
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= portlint
|
||||
PORTVERSION= 2.5.9
|
||||
PORTVERSION= 2.6.0
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -17,7 +17,7 @@
|
||||
# OpenBSD and NetBSD will be accepted.
|
||||
#
|
||||
# $FreeBSD$
|
||||
# $Id: portlint.pl,v 1.43 2004/03/21 07:31:33 marcus Exp $
|
||||
# $Id: portlint.pl,v 1.44 2004/03/26 20:42:32 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 /;
|
||||
@ -39,8 +39,8 @@ $portdir = '.';
|
||||
|
||||
# version variables
|
||||
my $major = 2;
|
||||
my $minor = 5;
|
||||
my $micro = 9;
|
||||
my $minor = 6;
|
||||
my $micro = 0;
|
||||
|
||||
sub l { '[{(]'; }
|
||||
sub r { '[)}]'; }
|
||||
@ -250,12 +250,13 @@ close(IN);
|
||||
#
|
||||
# check for files.
|
||||
#
|
||||
my @checker = ($makevar{DESCR}, 'Makefile', $makevar{MD5_FILE});
|
||||
my @checker = ($makevar{DESCR}, 'Makefile', 'distinfo', $makevar{MD5_FILE});
|
||||
my %checker = (
|
||||
$makevar{DESCR} => 'checkdescr',
|
||||
'Makefile' => 'checkmakefile',
|
||||
$makevar{MD5_FILE} => 'TRUE'
|
||||
);
|
||||
$makevar{DESCR} => 'checkdescr',
|
||||
'Makefile' => 'checkmakefile',
|
||||
$makevar{MD5_FILE} => 'TRUE',
|
||||
'distinfo' => 'checkdistinfo',
|
||||
);
|
||||
if ($extrafile) {
|
||||
my @files = (
|
||||
<$makevar{SCRIPTDIR}/*>,
|
||||
@ -492,6 +493,24 @@ if ($err || $warn) {
|
||||
}
|
||||
exit $err;
|
||||
|
||||
#
|
||||
# distinfo
|
||||
#
|
||||
sub checkdistinfo {
|
||||
my($file) = @_;
|
||||
my($sizefound) = 0;
|
||||
open(IN, "< $file") || return 0;
|
||||
while (<IN>) {
|
||||
if ($_ =~ /^SIZE/) {
|
||||
$sizefound = 1;
|
||||
}
|
||||
}
|
||||
if (!$sizefound) {
|
||||
&perror("WARN: $file: does not contain SIZE.");
|
||||
}
|
||||
close(IN);
|
||||
}
|
||||
|
||||
#
|
||||
# pkg-descr
|
||||
#
|
||||
@ -693,7 +712,7 @@ sub checkplist {
|
||||
|
||||
if ($_ =~ /^info\/dir$/) {
|
||||
&perror("FATAL: $file [$.]: \"info/dir\" should not be listed.".
|
||||
"use install-info to add/remove ".
|
||||
"Use install-info to add/remove ".
|
||||
"an entry.");
|
||||
$infooverwrite++;
|
||||
}
|
||||
@ -1016,18 +1035,20 @@ sub checkmakefile {
|
||||
print "OK: checking for USE_* used too late.\n" if ($verbose);
|
||||
my @use_early = qw(
|
||||
APACHE
|
||||
BZIP2
|
||||
GNUSTEP
|
||||
IMAKE
|
||||
JAVA
|
||||
KDE(?:BASE|LIBS)_VER
|
||||
LIBRUBY
|
||||
(?:LIB)?RUBY
|
||||
LINUX_PREFIX
|
||||
OPENSSL
|
||||
PHP
|
||||
PYTHON
|
||||
QT2?
|
||||
QT_VER
|
||||
RUBY
|
||||
X_PREFIX
|
||||
ZIP
|
||||
);
|
||||
|
||||
my @other_early = qw(
|
||||
@ -1069,6 +1090,16 @@ sub checkmakefile {
|
||||
"it is intended to be a user variable.");
|
||||
}
|
||||
|
||||
#
|
||||
# whole file: USE_SIZE
|
||||
#
|
||||
print "OK: checking USE_SIZE.\n" if ($verbose);
|
||||
if ($whole =~ /\nUSE_SIZE/) {
|
||||
my $lineno = &linenumber($`);
|
||||
&perror("WARN: $file [$lineno]: use of USE_SIZE is no longer ".
|
||||
"required.");
|
||||
}
|
||||
|
||||
#
|
||||
# whole file: MACHINE_ARCH
|
||||
#
|
||||
@ -1114,6 +1145,15 @@ sub checkmakefile {
|
||||
"installation of files into $localbase/share/doc.");
|
||||
}
|
||||
|
||||
#
|
||||
# whole file: check for USE_GETTEXT
|
||||
#
|
||||
print "OK: checking for USE_GETTEXT without WITHOUT_NLS.\n" if ($verbose);
|
||||
if ($whole =~ /\nUSE_GETTEXT/ && $whole !~ /def(?:ined)?\s*\(?WITHOUT_NLS\)?/) {
|
||||
&perror("WARN: $file: Consider adding support for a WITHOUT_NLS ".
|
||||
"knob to conditionally disable gettext support.");
|
||||
}
|
||||
|
||||
#
|
||||
# whole file: direct use of command names
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user