--- pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl 2001/03/31 20:19:04 1.3 +++ pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl 2007/07/12 15:35:43 1.8 @@ -1,12 +1,12 @@ -#!@PREFIX@/bin/perl +#!@PERL5@ # -# $NetBSD: patchdiff.pl,v 1.3 2001/03/31 20:19:04 skrll Exp $ +# $NetBSD: patchdiff.pl,v 1.8 2007/07/12 15:35:43 joerg Exp $ # # patchdiff: compares a set of patches patch-aa, patch-ab, ... in # $WRKDIR/.newpatches in the with another set in patches. # # Copyright (c) 2000 by Dieter Baron and -# Thomas Klausner +# Thomas Klausner # All Rights Reserved. Absolutely no warranty. use Getopt::Std; @@ -63,9 +63,11 @@ EOF %new=(); $thisdir=cwd(); chomp($thisdir); -$oldpatchdir=$thisdir."/patches"; +$oldpatchdir=`@MAKE@ show-var VARNAME=PATCHDIR` or + die ("can't find PATCHDIR -- wrong dir?"); +chomp($oldpatchdir); -$wrkdir=`make show-var VARNAME=WRKDIR` or +$wrkdir=`@MAKE@ show-var VARNAME=WRKDIR` or die ("can't find WRKDIR -- wrong dir?"); chomp($wrkdir); @@ -93,7 +95,7 @@ foreach $patch (keys%new) { if (defined($orig{$patch})) { # system("diff",$orig{$patch},$new{$patch}); $diff=`diff $orig{$patch} $new{$patch}`; - $diff=~s/^\dc\d\n..\$NetBSD.*\$\n---\n..\$NetBSD.*\$\n//m; + $diff=~s/^\dc\d\n..\$[N]etBSD.*\$\n---\n..\$[N]etBSD.*\$\n//m; $diff=~s/^\dc\d\n..\+\+\+.*\n---\n..\+\+\+.*\n//m; if ($diff) { print "Comparing $orig{$patch} to $new{$patch}\n$diff";