Update to 2.8.5.
* Add a check for .mo (translation) files, and warn if USE_GETTEXT is not set. [1] * Make sure USE_RC_SUBR checking does macro expansion to catch cases were USE_RC_SUBR=${PORTNAME} (for example). [2] PR: 93273 [2] Requested by: kris [1]
This commit is contained in:
parent
21f5de50af
commit
ecae66b28e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155974
4 changed files with 82 additions and 20 deletions
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= portlint
|
||||
PORTVERSION= 2.8.4
|
||||
PORTVERSION= 2.8.5
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# OpenBSD and NetBSD will be accepted.
|
||||
#
|
||||
# $FreeBSD$
|
||||
# $MCom: portlint/portlint.pl,v 1.107 2006/02/11 23:05:34 marcus Exp $
|
||||
# $MCom: portlint/portlint.pl,v 1.110 2006/02/14 03:19:10 marcus Exp $
|
||||
#
|
||||
|
||||
use vars qw/ $opt_a $opt_A $opt_b $opt_C $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 = 8;
|
||||
my $micro = 4;
|
||||
my $micro = 5;
|
||||
|
||||
sub l { '[{(]'; }
|
||||
sub r { '[)}]'; }
|
||||
|
@ -176,7 +176,8 @@ my @varlist = qw(
|
|||
PKGDIR COMMENT DESCR PLIST PKGCATEGORY PKGINSTALL PKGDEINSTALL
|
||||
PKGREQ PKGMESSAGE MD5_FILE .CURDIR INSTALLS_SHLIB USE_AUTOTOOLS
|
||||
INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER
|
||||
PLIST_FILES OPTIONS INSTALLS_OMF USE_KDELIBS_VER
|
||||
PLIST_FILES OPTIONS INSTALLS_OMF USE_KDELIBS_VER USE_GETTEXT
|
||||
USE_RC_SUBR
|
||||
);
|
||||
|
||||
my $cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", @varlist);
|
||||
|
@ -703,6 +704,11 @@ sub checkplist {
|
|||
"for more details)");
|
||||
}
|
||||
|
||||
if ($_ =~ m|\.mo$| && $makevar{USE_GETTEXT} eq '') {
|
||||
&perror("WARN: $file [$.]: installing gettext translation files, ".
|
||||
"please define USE_GETTEXT as appropriate");
|
||||
}
|
||||
|
||||
if ($autoinfo && $_ =~ /\.info$/) {
|
||||
&perror("WARN: $file [$.]: enumerating info files in the plist is deprecated in favor of adding info files into the Makefile using the INFO macro.");
|
||||
}
|
||||
|
@ -2544,19 +2550,34 @@ FETCH_DEPENDS DEPENDS DEPENDS_TARGET PERL_RUN_DEPENDS PERL_BUILD_DEPENDS
|
|||
# check for deprecated use of USE_RC_SUBR, and current syntax
|
||||
#
|
||||
if ($tmp =~ /\nUSE_RC_SUBR=([\s]*)(.*)/) {
|
||||
my $subr_value = $2;
|
||||
my $subr_value = $makevar{USE_RC_SUBR};
|
||||
if ($subr_value eq '') {
|
||||
$subr_value = $2;
|
||||
}
|
||||
|
||||
if (($subr_value =~ /^yes$/i) ||
|
||||
($subr_value =~ /^true$/i) ||
|
||||
($subr_value =~ /^1$/)) {
|
||||
&perror("FATAL: The value of the USE_RC_SUBR variable should ".
|
||||
"be the name of the intended rc.d script, and there should ".
|
||||
"be a corresponding file in the files/ directory.");
|
||||
&perror("FATAL: $file: The value of the USE_RC_SUBR variable ".
|
||||
"should be the name of the intended rc.d script, and there ".
|
||||
"should be a corresponding file in the files/ directory.");
|
||||
} else {
|
||||
foreach my $i (split(/\s/, $subr_value)) {
|
||||
if (! -f "files/$i.in") {
|
||||
&perror("FATAL: $i listed in USE_RC_SUBR, ".
|
||||
my $mvar;
|
||||
if ($i =~ /\$\{([^}]+)\}/) {
|
||||
$mvar = $1;
|
||||
if (defined($makevar{$mvar})) {
|
||||
$i = $makevar{$mvar};
|
||||
} else {
|
||||
$i = &getMakevar($mvar);
|
||||
}
|
||||
}
|
||||
if ($i ne '' && ! -f "files/$i.in") {
|
||||
&perror("FATAL: $file: $i listed in USE_RC_SUBR, ".
|
||||
"but files/$i.in is missing.");
|
||||
} elsif ($i eq '' && $mvar ne '') {
|
||||
&perror("WARN: $file: possible undefined make variable ".
|
||||
"$mvar used as the value for USE_RC_SUBR.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2732,6 +2753,16 @@ EOF
|
|||
}
|
||||
}
|
||||
|
||||
sub get_makevar {
|
||||
my($mvar) = @_;
|
||||
my($cmd, $result);
|
||||
|
||||
$cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", $mvar);
|
||||
$result = `$cmd`;
|
||||
|
||||
return chomp $result;
|
||||
}
|
||||
|
||||
sub is_predefined {
|
||||
my($url, $file) = @_;
|
||||
my($site, $site_re);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= portlint
|
||||
PORTVERSION= 2.8.4
|
||||
PORTVERSION= 2.8.5
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# OpenBSD and NetBSD will be accepted.
|
||||
#
|
||||
# $FreeBSD$
|
||||
# $MCom: portlint/portlint.pl,v 1.107 2006/02/11 23:05:34 marcus Exp $
|
||||
# $MCom: portlint/portlint.pl,v 1.110 2006/02/14 03:19:10 marcus Exp $
|
||||
#
|
||||
|
||||
use vars qw/ $opt_a $opt_A $opt_b $opt_C $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 = 8;
|
||||
my $micro = 4;
|
||||
my $micro = 5;
|
||||
|
||||
sub l { '[{(]'; }
|
||||
sub r { '[)}]'; }
|
||||
|
@ -176,7 +176,8 @@ my @varlist = qw(
|
|||
PKGDIR COMMENT DESCR PLIST PKGCATEGORY PKGINSTALL PKGDEINSTALL
|
||||
PKGREQ PKGMESSAGE MD5_FILE .CURDIR INSTALLS_SHLIB USE_AUTOTOOLS
|
||||
INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER
|
||||
PLIST_FILES OPTIONS INSTALLS_OMF USE_KDELIBS_VER
|
||||
PLIST_FILES OPTIONS INSTALLS_OMF USE_KDELIBS_VER USE_GETTEXT
|
||||
USE_RC_SUBR
|
||||
);
|
||||
|
||||
my $cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", @varlist);
|
||||
|
@ -703,6 +704,11 @@ sub checkplist {
|
|||
"for more details)");
|
||||
}
|
||||
|
||||
if ($_ =~ m|\.mo$| && $makevar{USE_GETTEXT} eq '') {
|
||||
&perror("WARN: $file [$.]: installing gettext translation files, ".
|
||||
"please define USE_GETTEXT as appropriate");
|
||||
}
|
||||
|
||||
if ($autoinfo && $_ =~ /\.info$/) {
|
||||
&perror("WARN: $file [$.]: enumerating info files in the plist is deprecated in favor of adding info files into the Makefile using the INFO macro.");
|
||||
}
|
||||
|
@ -2544,19 +2550,34 @@ FETCH_DEPENDS DEPENDS DEPENDS_TARGET PERL_RUN_DEPENDS PERL_BUILD_DEPENDS
|
|||
# check for deprecated use of USE_RC_SUBR, and current syntax
|
||||
#
|
||||
if ($tmp =~ /\nUSE_RC_SUBR=([\s]*)(.*)/) {
|
||||
my $subr_value = $2;
|
||||
my $subr_value = $makevar{USE_RC_SUBR};
|
||||
if ($subr_value eq '') {
|
||||
$subr_value = $2;
|
||||
}
|
||||
|
||||
if (($subr_value =~ /^yes$/i) ||
|
||||
($subr_value =~ /^true$/i) ||
|
||||
($subr_value =~ /^1$/)) {
|
||||
&perror("FATAL: The value of the USE_RC_SUBR variable should ".
|
||||
"be the name of the intended rc.d script, and there should ".
|
||||
"be a corresponding file in the files/ directory.");
|
||||
&perror("FATAL: $file: The value of the USE_RC_SUBR variable ".
|
||||
"should be the name of the intended rc.d script, and there ".
|
||||
"should be a corresponding file in the files/ directory.");
|
||||
} else {
|
||||
foreach my $i (split(/\s/, $subr_value)) {
|
||||
if (! -f "files/$i.in") {
|
||||
&perror("FATAL: $i listed in USE_RC_SUBR, ".
|
||||
my $mvar;
|
||||
if ($i =~ /\$\{([^}]+)\}/) {
|
||||
$mvar = $1;
|
||||
if (defined($makevar{$mvar})) {
|
||||
$i = $makevar{$mvar};
|
||||
} else {
|
||||
$i = &getMakevar($mvar);
|
||||
}
|
||||
}
|
||||
if ($i ne '' && ! -f "files/$i.in") {
|
||||
&perror("FATAL: $file: $i listed in USE_RC_SUBR, ".
|
||||
"but files/$i.in is missing.");
|
||||
} elsif ($i eq '' && $mvar ne '') {
|
||||
&perror("WARN: $file: possible undefined make variable ".
|
||||
"$mvar used as the value for USE_RC_SUBR.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2732,6 +2753,16 @@ EOF
|
|||
}
|
||||
}
|
||||
|
||||
sub get_makevar {
|
||||
my($mvar) = @_;
|
||||
my($cmd, $result);
|
||||
|
||||
$cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", $mvar);
|
||||
$result = `$cmd`;
|
||||
|
||||
return chomp $result;
|
||||
}
|
||||
|
||||
sub is_predefined {
|
||||
my($url, $file) = @_;
|
||||
my($site, $site_re);
|
||||
|
|
Loading…
Reference in a new issue