summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2006-08-01 08:58:49 +0000
committerrillig <rillig>2006-08-01 08:58:49 +0000
commit538bb54fa5c55f5fc3d4fb1e78b6cb7dc321f7e4 (patch)
tree49e03ad34b3cd3a8c26fd82487c2259eff12c2ee /pkgtools
parent3c199a6ef819ca4a3a8a74394bdca2e3cd4a5b61 (diff)
downloadpkgsrc-538bb54fa5c55f5fc3d4fb1e78b6cb7dc321f7e4.tar.gz
Pkglint can now resolve a plain occurrence of ${DISTNAME} in PKGNAME,
which helps for some Perl modules to get the correct package name, which in turn influences whether the update requests from doc/TODO can be shown or not. Suggested by wiz.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 083350739fa..5d2ee18e23c 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.667 2006/07/29 10:56:03 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.668 2006/08/01 08:58:49 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -6471,6 +6471,12 @@ sub checkfile_package_Makefile($$$) {
my $distname = defined($distname_line) ? $distname_line->get("value") : undef;
my $pkgname = defined($pkgname_line) ? $pkgname_line->get("value") : undef;
+ # Let's do some tricks to get the proper value of the package
+ # name more often.
+ if (defined($distname) && defined($pkgname)) {
+ $pkgname =~ s/\$\{DISTNAME\}/$distname/;
+ }
+
if (defined($pkgname) && defined($distname) && ($pkgname eq $distname || $pkgname eq "\${DISTNAME}")) {
$pkgname_line->log_note("PKGNAME is \${DISTNAME} by default. You don't need to define PKGNAME.");
}