Re: ExtUtils-Depends 0.300 on Cygwin



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Torsten Schoenfeld wrote:
| Oh, I didn't know that the libFoo.dll.a thing was perl-specific.  Will
| linking against just Foo.dll work on perl 5.8.x, too?

Import libraries are the norm for Cygwin packages, but they are only
generated by the linker if so instructed.  Libtool does this, but in the
case of perl it only happened because of perlld, which is no longer in
use.  (IIRC only with Gtk2-Perl and friends does one perl module
actually link against another.)

But one can always link against the DLL rather than the implib, just
that the latter is generally more convenient.  So this change should
work on 5.8 as well.

| In <http://bugzilla.gnome.org/show_bug.cgi?id=371464>, Dirk Froemberg
| suggests using "-L/path/to/Foo -lFoo" instead of the full path.  That's
| recognized by EU::MM and thus not ignored.

While that would theoretically work, EU:MM still doesn't like it.  I
tried doing this with EU::D (patch attached, but don't laugh too hard, I
never claimed to be a Perl hacker), but I got the following instead:

Note (probably harmless): No library found for -lGtk2

(Glib and Cairo trigger false findings from the C libglib (1.2) and
libcairo libraries.)

This is because Kid doesn't recognize $thislib.$so as a legitimate
library file to link against.  So we're back to square one, now what?


Yaakov
Cygwin Ports

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH8agapiWmPGlmQSMRCD+GAKCrJOqSqzgSqgQ+m7jMjRvdx2qlSACcDSsh
QfcT0WYYs2JYoJKRiwHi4+U=
=ZIJG
-----END PGP SIGNATURE-----
diff -urN -x CYGWIN-PATCHES -x 'aclocal.m4*' -x autom4te.cache -x config.cache -x config.log -x config.status 
-x config.h -x config.h.in -x ABOUT-NLS -x Makefile.in.in -x Makevars.template -x '*SlackBuild*' -x 
'*.egg-info' -x '*.class' -x '*.pyc' -x '*.mo' -x '*.gmo' -x '*.orig' -x '*.rej' -x '*.spec' -x '*.temp' -x 
'*~' -x '*.stackdump' -x COPYING -x INSTALL -x compile -x config-ml.in -x config.guess -x config.sub -x 
depcomp -x elisp-comp -x install-sh -x ltmain.sh -x mdate-sh -x missing -x mkinstalldirs -x py-compile -x 
symlink-tree -x texinfo.tex -x ylwrap -x config.rpath -x omf.make -x xmldocs.make -x gnome-doc-utils.make -x 
gnome-doc-utils.m4 -x intltool.m4 -x intltool-extract -x intltool-extract.in -x intltool-merge -x 
intltool-merge.in -x intltool-update -x intltool-update.in 
origsrc/ExtUtils-Depends-0.300/lib/ExtUtils/Depends.pm src/ExtUtils-Depends-0.300/lib/ExtUtils/Depends.pm
--- origsrc/ExtUtils-Depends-0.300/lib/ExtUtils/Depends.pm      2008-03-30 10:36:23.000000000 -0500
+++ src/ExtUtils-Depends-0.300/lib/ExtUtils/Depends.pm  2008-03-31 22:02:29.156250000 -0500
@@ -302,7 +302,7 @@
 
        my %mappers = (
                MSWin32 => sub { $_[0] . '.lib' },
-               cygwin  => sub { 'lib' . $_[0] . '.dll.a'},
+               cygwin  => sub { $_[0] . '.dll'},
        );
        my $mapper = $mappers{$^O};
        return () unless defined $mapper;
@@ -313,15 +313,15 @@
                my $lib = $mapper->($stem);
                my $pattern = qr/$lib$/;
 
-               my $matching_file;
+               my $matching_libdir;
                find (sub {
-                       if ((not $matching_file) && /$pattern/) {;
-                               $matching_file = $File::Find::name;
+                       if ((not $matching_libdir) && /$pattern/) {;
+                               $matching_libdir = $File::Find::dir;
                        }
                }, map { -d $_ ? ($_) : () } @INC); # only extant dirs
 
-               if ($matching_file && -f $matching_file) {
-                       push @found_libs, $matching_file;
+               if ($matching_libdir && -d $matching_libdir) {
+                       push @found_libs, ('-L' . $matching_libdir, '-l' . $stem);
                        next;
                }
        }


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