summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/lintpkgsrc.pl
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools/pkglint/files/lintpkgsrc.pl')
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index b68748c425d..0c3c46007d0 100755
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl
@@ -1,6 +1,6 @@
#!@PREFIX@/bin/perl
-# $NetBSD: lintpkgsrc.pl,v 1.72 2002/11/14 04:01:56 wiz Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.73 2003/01/02 22:17:46 atatat Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -712,6 +712,14 @@ sub parse_makefile_pkgsrc
{ $pkgname = $vars->{PKGNAME}; }
elsif (defined $vars->{DISTNAME})
{ $pkgname = $vars->{DISTNAME}; }
+ if ($pkgname !~ /(.*)-(\d.*)/)
+ {
+ # invoke make here as a last resort
+ my($pkgsrcdir) = ($file =~ m:(/.*)/:);
+ my($makepkgname) = `cd $pkgsrcdir ; make show-vars VARNAMES=PKGNAME`;
+ if ($makepkgname =~ /(.*)-(\d.*)/)
+ { $pkgname = $makepkgname; }
+ }
if ($pkgname =~ /^pkg_install-(\d+)$/ && $1 < $pkg_installver)
{ $pkgname = "pkg_install-$pkg_installver"; }
if (defined $pkgname)