rev 10358 - scripts

Modestas Vainius modax-guest at alioth.debian.org
Mon Apr 28 23:57:19 UTC 2008


Author: modax-guest
Date: 2008-04-28 23:57:18 +0000 (Mon, 28 Apr 2008)
New Revision: 10358

Modified:
   scripts/autofixtll
Log:
0.5 is unusable, release 0.5.1

Modified: scripts/autofixtll
===================================================================
--- scripts/autofixtll	2008-04-28 23:33:55 UTC (rev 10357)
+++ scripts/autofixtll	2008-04-28 23:57:18 UTC (rev 10358)
@@ -133,7 +133,7 @@
 sub Library::new {
     my ($cls, $name, $cmake_target, %other) = @_;
     my $path = $other{path};
-    my $condition = $other{condition};
+    my $condition = (exists $other{condition}) ? $other{condition} : undef;
     if (!defined $path) {
         $path = "/usr/lib/lib$name.so";
     }
@@ -306,15 +306,16 @@
     my $cmakelists = File::Spec->catfile($dir, "CMakeLists.txt");
 
 
-    my $strlibs = ""; # Unconditional libs
+    my $normlibs = ""; # Unconditional (normal) libs
     my $condlibs = ""; # Conditional linking
+    my $strlibs = join(" ", map($_->{cmake_target}, @$libs)); # Both
     for (@$libs) {
-        if (exists $_->{condition}) {
+        if (defined $_->{condition}) {
             $condlibs .= sprintf("if (%s)\n  target_link_libraries($target %s)\nendif (%s)\n",
                 $_->{condition}, $_->{cmake_target}, $_->{condition});
         } else {
-            $strlibs .= " " if ($strlibs);
-            $strlibs .= $_->{cmake_target};
+            $normlibs .= " " if ($normlibs);
+            $normlibs .= $_->{cmake_target};
         }
     }
 
@@ -332,13 +333,13 @@
                 m/^\s*(target_link_libraries\s*\(\s*$target\s+)(.*?)(\s*\).*)?$/i) {
 
                 my $newline;
-                if ($strlibs) {
+                if ($normlibs) {
                     # Fix it
                     $newline = $1;
                     my $end = $3;
                     $newline .= $2 if ($2);
                     $newline .= " " if ($newline !~ m/\s+$/);
-                    $newline .= $strlibs;
+                    $newline .= $normlibs;
                     $newline .= $end if ($end);
                     $newline .= "\n";
                 } else {
@@ -530,7 +531,7 @@
 
 ############## Main loop ##############################
 
-$main::VERSION = "0.5.0";
+$main::VERSION = "0.5.1";
 
 my $sourcedir = Cwd::getcwd();
 my $builddir = "obj-" . get_gnu_build_type();




More information about the pkg-kde-commits mailing list