diff options
author | abs <abs@pkgsrc.org> | 2003-08-28 14:44:55 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2003-08-28 14:44:55 +0000 |
commit | 636c979c407263968da447b06b4cb6821b6d3adc (patch) | |
tree | d1cb7c5706f2f8010c62fe8b7f3204cf632096a0 /pkgtools/pkglint/files | |
parent | 9eb00bb28b932fd51da7b8303ed4d6b99357ae7b (diff) | |
download | pkgsrc-636c979c407263968da447b06b4cb6821b6d3adc.tar.gz |
Update pkglint to 3.59 - handle bsd.pkg.mk's assumption that the caller is in
pkgsrc/some/dir
Diffstat (limited to 'pkgtools/pkglint/files')
-rwxr-xr-x | pkgtools/pkglint/files/lintpkgsrc.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl index d0291e658ca..b81db559cf2 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.78 2003/06/15 22:19:46 abs Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.79 2003/08/28 14:44:56 abs Exp $ # Written by David Brownlee <abs@netbsd.org>. # @@ -448,7 +448,8 @@ sub get_default_makefile_vars # Extract some variables from bsd.pkg.mk my($mkvars); - $mkvars = parse_makefile_vars("$default_vars->{PKGSRCDIR}/mk/bsd.pkg.mk"); + $mkvars = parse_makefile_vars("$default_vars->{PKGSRCDIR}/mk/bsd.pkg.mk", + "$default_vars->{PKGSRCDIR}/mk/scripts"); foreach my $varname (keys %{$mkvars}) { if ($varname =~ /_REQD$/ || $varname eq 'EXTRACT_SUFX') @@ -776,7 +777,7 @@ sub parse_makefile_pkgsrc # sub parse_makefile_vars { - my($file) = @_; + my($file, $cwd) = @_; my($pkgname, %vars, $plus, $value, @data, %incfiles, @if_false); # 0:true 1:false 2:nested-false&nomore-elsif @@ -794,7 +795,9 @@ sub parse_makefile_vars { %vars = %{$default_vars}; } $vars{BSD_PKG_MK} = 'YES'; - if ($file =~ m#(.*)/#) + if ($cwd) + { $vars{'.CURDIR'} = $cwd; } + elsif ($file =~ m#(.*)/#) { $vars{'.CURDIR'} = $1; } else { $vars{'.CURDIR'} = getcwd; } |