[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#565295: Acknowledgement (dpkg-cross: dependency_libs mangling fails to handle quoting)



Here's a slightly better patch.  This also corrects the fact that only
the last instance of .la in dependency_libs was substituted, rather than
all of them.

=== modified file 'dpkg-cross'
--- dpkg-cross	2010-01-07 23:47:08 +0000
+++ dpkg-cross	2010-01-14 16:36:16 +0000
@@ -664,10 +664,11 @@ sub sub_build {
 		while (<FROM>) {
 			if (/^libdir=/) {
 				print TO "libdir=\'$crosslib\'\n";
-			} elsif (/^dependency_libs=/) {
-				s/( )?-L\S+//g;
-				s:\S+/([\w\.\-]+\.la)$:$crosslib/$1:g;
-				print TO;
+			} elsif (/^dependency_libs='(.*)'$/ or /^dependency_libs=(.*)/) {
+				my $deplibs = $1;
+				$deplibs =~ s/( )?-L\S+//g;
+				$deplibs =~ s:\S+/([\w\.\-]+\.la)( |$):$crosslib/$1$2:g;
+				print TO "dependency_libs='$deplibs'\n";
 			} else {
 				print TO;
 			}

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



Reply to: