From: Steve Peters Date: Sat, 9 Feb 2008 07:18:35 +0000 (+0000) Subject: Upgrade to ExtUtils-CBuilder-0.22 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=20b7c8df8cc1e174ac3576beee98eb518942a02c;p=p5sagit%2Fp5-mst-13.2.git Upgrade to ExtUtils-CBuilder-0.22 p4raw-id: //depot/perl@33263 --- diff --git a/lib/ExtUtils/CBuilder.pm b/lib/ExtUtils/CBuilder.pm index fae01b1..077fecd 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.21'; +$VERSION = '0.22'; $VERSION = eval $VERSION; # Okay, this is the brute-force method of finding out what kind of diff --git a/lib/ExtUtils/CBuilder/Base.pm b/lib/ExtUtils/CBuilder/Base.pm index 0c08ab7..d12ebfd 100644 --- a/lib/ExtUtils/CBuilder/Base.pm +++ b/lib/ExtUtils/CBuilder/Base.pm @@ -8,7 +8,7 @@ use Config; use Text::ParseWords; use vars qw($VERSION); -$VERSION = '0.21'; +$VERSION = '0.22'; sub new { my $class = shift; diff --git a/lib/ExtUtils/CBuilder/Platform/Unix.pm b/lib/ExtUtils/CBuilder/Platform/Unix.pm index 3fa7378..f3d6967 100644 --- a/lib/ExtUtils/CBuilder/Platform/Unix.pm +++ b/lib/ExtUtils/CBuilder/Platform/Unix.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Base; use vars qw($VERSION @ISA); -$VERSION = '0.21'; +$VERSION = '0.22'; @ISA = qw(ExtUtils::CBuilder::Base); sub link_executable { diff --git a/lib/ExtUtils/CBuilder/Platform/Windows.pm b/lib/ExtUtils/CBuilder/Platform/Windows.pm index 7b74ae0..11662df 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.21'; +$VERSION = '0.22'; @ISA = qw(ExtUtils::CBuilder::Base); sub new { @@ -33,61 +33,14 @@ sub _compiler_type { } sub split_like_shell { - # As it turns out, Windows command-parsing is very different from - # Unix command-parsing. Double-quotes mean different things, - # backslashes don't necessarily mean escapes, and so on. So we - # can't use Text::ParseWords::shellwords() to break a command string - # into words. The algorithm below was bashed out by Randy and Ken - # (mostly Randy), and there are a lot of regression tests, so we - # should feel free to adjust if desired. - + # Since Windows will pass the whole command string (not an argument + # array) to the target program and make the program parse it itself, + # we don't actually need to do any processing here. (my $self, local $_) = @_; return @$_ if defined() && UNIVERSAL::isa($_, 'ARRAY'); - - my @argv; - return @argv unless defined() && length(); - - my $arg = ''; - my( $i, $quote_mode ) = ( 0, 0 ); - - while ( $i < length() ) { - - my $ch = substr( $_, $i , 1 ); - my $next_ch = substr( $_, $i+1, 1 ); - - if ( $ch eq '\\' && $next_ch eq '"' ) { - $arg .= '"'; - $i++; - } elsif ( $ch eq '\\' && $next_ch eq '\\' ) { - $arg .= '\\'; - $i++; - } elsif ( $ch eq '"' && $next_ch eq '"' && $quote_mode ) { - $quote_mode = !$quote_mode; - $arg .= '"'; - $i++; - } elsif ( $ch eq '"' && $next_ch eq '"' && !$quote_mode && - ( $i + 2 == length() || - substr( $_, $i + 2, 1 ) eq ' ' ) - ) { # for cases like: a"" => [ 'a' ] - push( @argv, $arg ); - $arg = ''; - $i += 2; - } elsif ( $ch eq '"' ) { - $quote_mode = !$quote_mode; - } elsif ( $ch eq ' ' && !$quote_mode ) { - push( @argv, $arg ) if $arg; - $arg = ''; - ++$i while substr( $_, $i + 1, 1 ) eq ' '; - } else { - $arg .= $ch; - } - - $i++; - } - - push( @argv, $arg ) if defined( $arg ) && length( $arg ); - return @argv; + return unless defined() && length(); + return ($_); } sub arg_defines { @@ -119,7 +72,7 @@ sub compile { cflags => [ $self->split_like_shell($cf->{ccflags}), $self->split_like_shell($cf->{cccdlflags}), - $self->split_like_shell($cf->{extra_compiler_flags}), + $self->split_like_shell($args{extra_compiler_flags}), ], optimize => [ $self->split_like_shell($cf->{optimize}) ], defines => \@defines, diff --git a/lib/ExtUtils/CBuilder/Platform/aix.pm b/lib/ExtUtils/CBuilder/Platform/aix.pm index 6ad2a68..6ecf80e 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.21'; +$VERSION = '0.22'; @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 623fe0a..9dcab67 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.21'; +$VERSION = '0.22'; @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 3b0cfb4..bf6e5ec 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.21'; +$VERSION = '0.22'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub compile { diff --git a/lib/ExtUtils/CBuilder/Platform/dec_osf.pm b/lib/ExtUtils/CBuilder/Platform/dec_osf.pm index cb7a9e3..bb90ab5 100644 --- a/lib/ExtUtils/CBuilder/Platform/dec_osf.pm +++ b/lib/ExtUtils/CBuilder/Platform/dec_osf.pm @@ -6,7 +6,7 @@ use File::Spec; use vars qw($VERSION @ISA); @ISA = qw(ExtUtils::CBuilder::Platform::Unix); -$VERSION = '0.21'; +$VERSION = '0.22'; sub link_executable { my $self = shift; diff --git a/lib/ExtUtils/CBuilder/Platform/os2.pm b/lib/ExtUtils/CBuilder/Platform/os2.pm index 4657c59..5f37ebe 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.21'; +$VERSION = '0.22'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 }