--- pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl 2002/08/14 16:30:07 1.5 +++ pkgsrc/pkgtools/pkgdiff/files/patchdiff.pl 2008/02/16 22:21:35 1.9 @@ -1,12 +1,12 @@ -#!@PREFIX@/bin/perl +#!@PERL5@ # -# $NetBSD: patchdiff.pl,v 1.5 2002/08/14 16:30:07 seb Exp $ +# $NetBSD: patchdiff.pl,v 1.9 2008/02/16 22:21:35 apb 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; @@ -27,6 +27,7 @@ sub getfilename { close(handle); $_ = $1; chomp(); + s/^\.\///; # ignore leading "./", if any. return $_; } close(handle); @@ -95,7 +96,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";