ExtUtils::Liblist fails to account for .dll.a lib_ext used by (e.g.) official GTK+ win32 build

[email protected] (Alex Kapranoff) Sun, 9 Aug 2009 18:42:27 +0400
Newsgroups perl.makemaker
Message-ID <[email protected]>
So here's the patch to ExtUtils/Liblist/Kid.pm to add support for .dll.a
libs. With it I can now successfully build the gtk-perl stack (all the chain
from Glib including Pango and Cairo) on Strawberry perl.


-- 
Alex Kapranoff.
patch-Kid.pm (application/x-perl, 571 B)
--- Kid.pm.orig	2009-07-07 17:49:06.000000000 +0400
+++ Kid.pm	2009-08-09 18:30:24.000000000 +0400
@@ -311,6 +311,7 @@
 	$_ .= $libext if !/\Q$libext\E$/i;
 
 	my $secondpass = 0;
+	my $secondpass2 = 0;
     LOOKAGAIN:
 
         # look for the file itself
@@ -346,6 +347,11 @@
 	    }
 	}
 
+	# do another pass with lib & .dll if they used -l
+	if (!$found_lib and $thislib =~ /^-l/ and $GC and !$secondpass2++) {
+	    goto LOOKAGAIN if s/^(.*)$libext$/lib$1.dll$libext/;
+	}
+
 	# give up
 	warn "Note (probably harmless): "
 		     ."No library found for $thislib\n"