diff options
author | abs <abs> | 2001-05-01 15:52:50 +0000 |
---|---|---|
committer | abs <abs> | 2001-05-01 15:52:50 +0000 |
commit | e98da5b1b86285cfa98359c0eeada6c84039389d (patch) | |
tree | c6de52244d7751115b37f3fec142656aa0399fe4 | |
parent | 1b9d3fb3c2b634fdf7f874a579f4b2573f4ca621 (diff) | |
download | pkgsrc-e98da5b1b86285cfa98359c0eeada6c84039389d.tar.gz |
Update pkglint to 2.49
lintpkgsrc now handles '/1' suffix in make S:x:y: expressions
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/pkglint/files/lintpkgsrc.pl | 13 |
2 files changed, 12 insertions, 5 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 5fb472b6e5d..bacbb4de184 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.90 2001/04/23 14:49:44 wiz Exp $ +# $NetBSD: Makefile,v 1.91 2001/05/01 15:52:50 abs Exp $ # -DISTNAME= pkglint-2.48 +DISTNAME= pkglint-2.49 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl index 51369ed5bce..3a6c022cf23 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.46 2001/04/27 16:10:36 abs Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.47 2001/05/01 15:52:50 abs Exp $ # Written by David Brownlee <abs@netbsd.org>. # @@ -765,7 +765,7 @@ sub parse_makefile_vars $vars{$key} = $_; $loop = 1; } - elsif ($vars{$key} =~ m#\${(\w+):([CS]([^{}])[^{}\3]+\3[^{}\3]*\3g?(|:[^{}]+))}#) + elsif ($vars{$key} =~ m#\${(\w+):([CS]([^{}])[^{}\3]+\3[^{}\3]*\3[g1]*(|:[^{}]+))}#) { my($left, $subvar, $right) = ($`, $1, $'); my(@patterns) = split(':', $2); @@ -783,7 +783,7 @@ sub parse_makefile_vars debug("substitutelist: $key ($result) $subvar (@patterns)\n"); foreach (@patterns) { - if (! m#([CS])/([^/]+)/([^/]*)/(g?)#) + if (! m#([CS])/([^/]+)/([^/]*)/([1g]*)#) { next; } my($how, $from, $to, $global) = ($1, $2, $3, $4); @@ -792,8 +792,15 @@ sub parse_makefile_vars if ($how eq 'S') # Limited substitution - keep ^ and $ { $from =~ s/([?.{}\]\[*+])/\\$1/g; } $to =~ s/\\(\d)/\$$1/g; # Change \1 etc to $1 + + my($notfirst); + if ($global =~ s/1//) + { ($from, $notfirst) = split('\s', $from, 2); } + debug("substituteperl: $subvar, $how, $from, $to\n"); eval "\$result =~ s/$from/$to/$global"; + if (defined $notfirst) + { $result .= " $notfirst"; } } $vars{$key} = $left . $result . $right; $loop = 1; |