r13427 - /scripts/dpatch2quilt

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Thu Jan 24 14:39:35 UTC 2008


Author: dmn
Date: Thu Jan 24 14:39:35 2008
New Revision: 13427

URL: http://svn.debian.org/wsvn/?sc=1&rev=13427
Log:
Support multi-line Build-Depends

Modified:
    scripts/dpatch2quilt

Modified: scripts/dpatch2quilt
URL: http://svn.debian.org/wsvn/scripts/dpatch2quilt?rev=13427&op=diff
==============================================================================
--- scripts/dpatch2quilt (original)
+++ scripts/dpatch2quilt Thu Jan 24 14:39:35 2008
@@ -27,7 +27,20 @@
 sed -i -e 's;/usr/share/dpatch/dpatch\.make;/usr/share/quilt/quilt.make;' debian/rules
 sed -i -e 's;DPATCH_STAMPFN;QUILT_STAMPFN;' debian/rules
 sed -i -e 's;patch-stamp;$(QUILT_STAMPFN);' debian/rules
-sed -i -e 's;Build-Depends:\(.*\)dpatch\(.*\);Build-Depends:\1quilt\2;' debian/control
+
+# same as "sed s/dpatch/quilt", but supports multi-line Build-Depends
+perl -i -pe '
+if( /^Build-Depends: / ) {
+    $do_replace = 1;
+    s/dpatch ?(?:\(.+\))?/quilt/;
+    next;
+}
+if( /^ / ) {
+    s/dpatch ?(?:\(.+\))?/quilt/ if $do_replace;
+} else {
+    $do_replace = 0;
+}' debian/control
+
 sed -i -e '1,/@DPATCH@/ d' debian/patches/*.diff
 
 echo




More information about the Pkg-perl-cvs-commits mailing list