summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrillig <rillig>2005-11-04 22:54:59 +0000
committerrillig <rillig>2005-11-04 22:54:59 +0000
commit12f8373652c8551cf0198630210d8400a1f04f1b (patch)
treeed02f98c63f54eca4959a6b18ed07cd81c6750de
parent8aff64d8c2bfca82c7f7a51d122ef80b024fb7ad (diff)
downloadpkgsrc-12f8373652c8551cf0198630210d8400a1f04f1b.tar.gz
Updated pkglint to 4.37.1.
- Improved detection of valid tool names.
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl25
2 files changed, 17 insertions, 12 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index df0949df59d..43a8dcfa886 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.283 2005/11/04 20:39:49 rillig Exp $
+# $NetBSD: Makefile,v 1.284 2005/11/04 22:54:59 rillig Exp $
#
-DISTNAME= pkglint-4.37
+DISTNAME= pkglint-4.37.1
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 5443b5cdadd..1ba01712285 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.334 2005/11/04 21:59:37 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.335 2005/11/04 22:54:59 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -1438,23 +1438,28 @@ sub get_tool_names() {
return $get_tool_names_value;
}
- my $fname = conf_pkgsrcdir."/mk/tools/defaults.mk";
- my $lines = load_lines($fname, true);
my $tools = {};
- if (!$lines) {
- log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
- } else {
+ foreach my $file (qw(autoconf automake ldconfig make replace rpcgen texinfo)) {
+ my $fname = conf_pkgsrcdir."/mk/tools/${file}.mk";
+ my $lines = load_lines($fname, true);
+
+ if (!$lines) {
+ log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
+ next;
+ }
+
foreach my $line (@{$lines}) {
if ($line->text =~ regex_varassign) {
my ($varname, undef, $value, undef) = ($1, $2, $3, $4);
- if ($varname =~ qr"^_TOOLS_VARNAME\.(.*)$") {
- my ($toolname) = ($1);
- $tools->{$toolname} = $value;
+ if ($varname eq "TOOLS_CREATE" && $value =~ qr"^([-\w.]+)$") {
+ $tools->{$value} = true;
+ } elsif ($varname =~ qr"^TOOLS_PATH\.([-\w.]+)$") {
+ $tools->{$1} = true;
}
}
}
}
- log_info($fname, NO_LINE_NUMBER, "Known tools: ".join(" ", sort(keys(%{$tools}))));
+ log_info(NO_FILE, NO_LINE_NUMBER, "Known tools: ".join(" ", sort(keys(%{$tools}))));
# As long as there is no reliable way to get a list of all valid
# tool names, this is the best I can do.