Change 34219 by [EMAIL PROTECTED] on 2008/08/24 08:58:40

        Subject: [PATCH] Re: Fix 34200 on Cygwin
        From: Reini Urban <[EMAIL PROTECTED]>
        Date: Sun, 24 Aug 2008 10:47:23 +0200
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/installperl#159 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm#7 edit
... //depot/perl/lib/ExtUtils/t/Embed.t#25 edit

Differences ...

==== //depot/perl/installperl#159 (xtext) ====
Index: perl/installperl
--- perl/installperl#158~34200~ 2008-08-11 06:15:08.000000000 -0700
+++ perl/installperl    2008-08-24 01:58:40.000000000 -0700
@@ -364,7 +364,14 @@
     $coredir =~ tr/./_/;
     map { s|^$coredir/||i; } @corefiles = <$coredir/*.*>;
 }
-else {
+elsif ($Is_Cygwin) { # On Cygwin symlink it to CORE to make Makefile happy
+    my $coredll = "$installarchlib/CORE/$libperl";
+    ( $Config{'d_link'} eq 'define' &&
+      eval { CORE::link "$installbin/$libperl", $coredll } ) ||
+    eval { symlink "$installbin/$libperl", $coredll }  ||
+    copy("$installbin/$libperl", $coredll);
+    @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
+} else {
     # [als] hard-coded 'libperl' name... not good!
     @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
 

==== //depot/perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm#7 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm
--- perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm#6~34200~      2008-08-11 
06:15:08.000000000 -0700
+++ perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm       2008-08-24 
01:58:40.000000000 -0700
@@ -17,9 +17,8 @@
 
 sub link {
   my ($self, %args) = @_;
-  # libperl.dll.a fails with -Uusedl. -L../CORE -lperl is better
   $args{extra_linker_flags} = [
-    '-L'.$self->perl_inc().' -lperl',
+    $self->perl_inc().'/'.($self->{config}{useshrplib} ? 'libperl.dll.a' : 
'libperl.a'),
     $self->split_like_shell($args{extra_linker_flags})
   ];
 

==== //depot/perl/lib/ExtUtils/t/Embed.t#25 (text) ====
Index: perl/lib/ExtUtils/t/Embed.t
--- perl/lib/ExtUtils/t/Embed.t#24~34200~       2008-08-11 06:15:08.000000000 
-0700
+++ perl/lib/ExtUtils/t/Embed.t 2008-08-24 01:58:40.000000000 -0700
@@ -105,6 +105,9 @@
         s!-bE:(\S+)!-bE:$perl_exp!;
     }
    }
+   elsif ($^O eq 'cygwin') { # Cygwin needs no special treatment like below
+       ;
+   }
    elsif ($Config{'libperl'} !~ /\Alibperl\./) {
      # Everyone needs libperl copied if it's not found by '-lperl'.
      $testlib = $Config{'libperl'};
End of Patch.

Reply via email to