From: Rafael Garcia-Suarez Date: Thu, 2 Jun 2005 11:19:02 +0000 (+0000) Subject: Upgrade to ExtUtils::CBuilder 0.12 and ExtUtils::ParseXS 2.10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=345dbb93fc4813c4387eb6b1eedefc6d79a752d0;p=p5sagit%2Fp5-mst-13.2.git Upgrade to ExtUtils::CBuilder 0.12 and ExtUtils::ParseXS 2.10 p4raw-id: //depot/perl@24675 --- diff --git a/lib/ExtUtils/CBuilder.pm b/lib/ExtUtils/CBuilder.pm index deb1fd8..f2950aa 100644 --- a/lib/ExtUtils/CBuilder.pm +++ b/lib/ExtUtils/CBuilder.pm @@ -5,7 +5,7 @@ use File::Path (); use File::Basename (); use vars qw($VERSION @ISA); -$VERSION = '0.11_01'; +$VERSION = '0.12'; $VERSION = eval $VERSION; # Okay, this is the brute-force method of finding out what kind of @@ -154,7 +154,7 @@ together. =back The operation of this method is also affected by the -C, C, C, C, and C +C, C, C, C, and C entries in C. =item link diff --git a/lib/ExtUtils/CBuilder/Base.pm b/lib/ExtUtils/CBuilder/Base.pm index fb20773..68a9f41 100644 --- a/lib/ExtUtils/CBuilder/Base.pm +++ b/lib/ExtUtils/CBuilder/Base.pm @@ -7,8 +7,7 @@ use Config; use Text::ParseWords; use vars qw($VERSION); -$VERSION = '0.00_02'; -$VERSION = eval $VERSION; +$VERSION = '0.12'; sub new { my $class = shift; @@ -181,7 +180,7 @@ sub _do_link { my @temp_files; @temp_files = $self->prelink(%args, - dl_name => $args{module_name}) if $self->need_prelink; + dl_name => $args{module_name}) if $args{lddl} && $self->need_prelink; my @linker_flags = $self->split_like_shell($args{extra_linker_flags}); my @output = $args{lddl} ? $self->arg_share_object_file($out) : $self->arg_exec_file($out); @@ -216,29 +215,27 @@ sub perl_src { # N.B. makemaker actually searches regardless of PERL_CORE, but # only squawks at not finding it if PERL_CORE is set - if ($ENV{PERL_CORE}) { - my $Updir = File::Spec->updir; - my($dir); - foreach $dir ($Updir, - File::Spec->catdir($Updir,$Updir), - File::Spec->catdir($Updir,$Updir,$Updir), - File::Spec->catdir($Updir,$Updir,$Updir,$Updir), - File::Spec->catdir($Updir,$Updir,$Updir,$Updir,$Updir)) - { - if ( - -f File::Spec->catfile($dir,"config_h.SH") - && - -f File::Spec->catfile($dir,"perl.h") - && - -f File::Spec->catfile($dir,"lib","Exporter.pm") - ) { - return $dir; - } + return unless $ENV{PERL_CORE}; + + my $Updir = File::Spec->updir; + my $dir = $Updir; + + # Try up to 5 levels upwards + for (1..5) { + if ( + -f File::Spec->catfile($dir,"config_h.SH") + && + -f File::Spec->catfile($dir,"perl.h") + && + -f File::Spec->catfile($dir,"lib","Exporter.pm") + ) { + return $dir; } - warn "PERL_CORE is set but I can't find your perl source!\n"; + $dir = File::Spec->catdir($dir, $Updir); } - + + warn "PERL_CORE is set but I can't find your perl source!\n"; return; } diff --git a/lib/ExtUtils/CBuilder/Platform/Unix.pm b/lib/ExtUtils/CBuilder/Platform/Unix.pm index 63b725a..1d874d4 100644 --- a/lib/ExtUtils/CBuilder/Platform/Unix.pm +++ b/lib/ExtUtils/CBuilder/Platform/Unix.pm @@ -4,9 +4,17 @@ use strict; use ExtUtils::CBuilder::Base; use vars qw($VERSION @ISA); -$VERSION = '0.01'; +$VERSION = '0.12'; @ISA = qw(ExtUtils::CBuilder::Base); +sub link_executable { + my $self = shift; + # $Config{cc} is usually a better bet for linking executables than $Config{ld} + local $self->{config}{ld} = + $self->{config}{cc} . " " . $self->{config}{ldflags}; + return $self->SUPER::link_executable(@_); +} + sub link { my $self = shift; my $cf = $self->{config}; diff --git a/lib/ExtUtils/CBuilder/Platform/VMS.pm b/lib/ExtUtils/CBuilder/Platform/VMS.pm index 3830960..9014e7c 100644 --- a/lib/ExtUtils/CBuilder/Platform/VMS.pm +++ b/lib/ExtUtils/CBuilder/Platform/VMS.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Base; use vars qw($VERSION @ISA); -$VERSION = '0.01'; +$VERSION = '0.12'; @ISA = qw(ExtUtils::CBuilder::Base); sub need_prelink { 0 } diff --git a/lib/ExtUtils/CBuilder/Platform/Windows.pm b/lib/ExtUtils/CBuilder/Platform/Windows.pm index 1c0ec97..8c1750f 100644 --- a/lib/ExtUtils/CBuilder/Platform/Windows.pm +++ b/lib/ExtUtils/CBuilder/Platform/Windows.pm @@ -9,7 +9,7 @@ use File::Spec; use ExtUtils::CBuilder::Base; use vars qw($VERSION @ISA); -$VERSION = '0.01'; +$VERSION = '0.12'; @ISA = qw(ExtUtils::CBuilder::Base); sub new { @@ -158,7 +158,7 @@ sub link { # if running in perl source tree, look for libs there, not installed my $lddlflags = $cf->{lddlflags}; my $perl_src = $self->perl_src(); - $lddlflags =~ s/\Q$cf->{archlibexp}\E\\CORE/$perl_src/ if $perl_src; + $lddlflags =~ s/\Q$cf->{archlibexp}\E[\\\/]CORE/$perl_src/ if $perl_src; my %spec = ( srcdir => $to, diff --git a/lib/ExtUtils/CBuilder/Platform/aix.pm b/lib/ExtUtils/CBuilder/Platform/aix.pm index 892c344..f759404 100644 --- a/lib/ExtUtils/CBuilder/Platform/aix.pm +++ b/lib/ExtUtils/CBuilder/Platform/aix.pm @@ -5,7 +5,7 @@ use ExtUtils::CBuilder::Platform::Unix; use File::Spec; use vars qw($VERSION @ISA); -$VERSION = '0.01'; +$VERSION = '0.12'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } diff --git a/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/lib/ExtUtils/CBuilder/Platform/cygwin.pm index 5b26c75..88c979d 100644 --- a/lib/ExtUtils/CBuilder/Platform/cygwin.pm +++ b/lib/ExtUtils/CBuilder/Platform/cygwin.pm @@ -5,7 +5,7 @@ use File::Spec; use ExtUtils::CBuilder::Platform::Unix; use vars qw($VERSION @ISA); -$VERSION = '0.01'; +$VERSION = '0.12'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub link_executable { diff --git a/lib/ExtUtils/CBuilder/Platform/darwin.pm b/lib/ExtUtils/CBuilder/Platform/darwin.pm index 7ea9114..6426601 100644 --- a/lib/ExtUtils/CBuilder/Platform/darwin.pm +++ b/lib/ExtUtils/CBuilder/Platform/darwin.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Platform::Unix; use vars qw($VERSION @ISA); -$VERSION = '0.01'; +$VERSION = '0.12'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub compile { diff --git a/lib/ExtUtils/CBuilder/Platform/os2.pm b/lib/ExtUtils/CBuilder/Platform/os2.pm index d02ae8a..ec86bea 100644 --- a/lib/ExtUtils/CBuilder/Platform/os2.pm +++ b/lib/ExtUtils/CBuilder/Platform/os2.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Platform::Unix; use vars qw($VERSION @ISA); -$VERSION = '0.01'; +$VERSION = '0.12'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } diff --git a/lib/ExtUtils/ParseXS.pm b/lib/ExtUtils/ParseXS.pm index 90a2847..2af2f74 100644 --- a/lib/ExtUtils/ParseXS.pm +++ b/lib/ExtUtils/ParseXS.pm @@ -17,8 +17,7 @@ my(@XSStack); # Stack of conditionals and INCLUDEs my($XSS_work_idx, $cpp_next_tmp); use vars qw($VERSION); -$VERSION = '2.09_02'; -$VERSION = eval $VERSION; +$VERSION = '2.10'; use vars qw(%input_expr %output_expr $ProtoUsed @InitFileCode $FH $proto_re $Overload $errors $Fallback $cplusplus $hiertype $WantPrototypes $WantVersionChk $except $WantLineNumbers