r53320 - /trunk/dh-make-perl/lib/DhMakePerl.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Wed Feb 24 20:14:44 UTC 2010
Author: dmn
Date: Wed Feb 24 20:10:57 2010
New Revision: 53320
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53320
Log:
drop_quilt(): handle $(QUILT_STAMPFN)/unpatch target deependencies
Modified:
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=53320&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Wed Feb 24 20:10:57 2010
@@ -1379,6 +1379,9 @@
If F<debian/README.source> exists, references to quilt are removed from it (and
the file removed if empty after that).
+Both dh7-style (C<dh --with=quilt>) and old-fashioned (C<$(QUILT_STAMPFN)>
+target dependency) are supported.
+
=cut
sub drop_quilt {
@@ -1408,6 +1411,20 @@
}
}
+ # also remove $(QUILT_STAMPFN) as a target dependency
+ # note that the override_dh_auto_configure is handled above because in that
+ # case the whole makefile snipped is to be removed
+ # Here we deal with the more generic cases
+ for ( my $i = 1; $i <= $#rules; $i++ ) {
+ $rules[$i] =~ s{
+ ^ # at the beginning of the line
+ ([^\s:]+): # target name, followed by a colon
+ (.*) # any other dependencies
+ \$\(QUILT_STAMPFN\) # followed by $(QUILT_STAMPFN)
+ }{$1:$2}x;
+ }
+
+
# remove unpatch dependency in clean
for( my $i = 1; $i < @rules; $i++ ) {
if ( $rules[$i] eq 'override_dh_auto_clean: unpatch'
@@ -1423,6 +1440,18 @@
if $#rules >= $i and $rules[$i] eq '';
last;
}
+ }
+
+
+ # similarly to the $(QUILT_STAMPFN) stripping, here we process a general
+ # ependency on the 'unpatch' rule
+ for ( my $i = 1; $i <= $#rules; $i++ ) {
+ $rules[$i] =~ s{
+ ^ # at the beginning of the line
+ ([^\s:]+): # target name, followed by a colon
+ (.*) # any other dependencies
+ unpatch # followed by 'unpatch'
+ }{$1:$2}x;
}
# drop --with=quilt from dh command line
More information about the Pkg-perl-cvs-commits
mailing list