Front page | perl.perl5.changes |
Postings from April 2008
Change 33721: Upgrade to ExtUtils-CBuilder-0.23
From:
Steve Hay
Date:
April 22, 2008 02:46
Subject:
Change 33721: Upgrade to ExtUtils-CBuilder-0.23
Change 33721 by steveh@maldoror on 2008/04/22 09:41:44
Upgrade to ExtUtils-CBuilder-0.23
Wipes out local mods in 01-basic.t from #33339 (which are superseded
by changes in 0.23), but keeps local mods for VMS from #32277 (which
are still not in 0.23)
Affected files ...
... //depot/perl/lib/ExtUtils/CBuilder.pm#14 edit
... //depot/perl/lib/ExtUtils/CBuilder/Base.pm#13 edit
... //depot/perl/lib/ExtUtils/CBuilder/Changes#5 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/Unix.pm#5 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/VMS.pm#10 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/Windows.pm#15 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/aix.pm#5 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm#5 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/darwin.pm#5 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm#5 edit
... //depot/perl/lib/ExtUtils/CBuilder/Platform/os2.pm#7 edit
... //depot/perl/lib/ExtUtils/CBuilder/t/01-basic.t#8 edit
Differences ...
==== //depot/perl/lib/ExtUtils/CBuilder.pm#14 (text) ====
Index: perl/lib/ExtUtils/CBuilder.pm
--- perl/lib/ExtUtils/CBuilder.pm#13~33339~ 2008-02-21 05:38:57.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder.pm 2008-04-22 02:41:44.000000000 -0700
@@ -5,7 +5,7 @@
use File::Basename ();
use vars qw($VERSION @ISA);
-$VERSION = '0.22_01';
+$VERSION = '0.23';
$VERSION = eval $VERSION;
# Okay, this is the brute-force method of finding out what kind of
==== //depot/perl/lib/ExtUtils/CBuilder/Base.pm#13 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Base.pm
--- perl/lib/ExtUtils/CBuilder/Base.pm#12~33263~ 2008-02-08 23:18:35.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/Base.pm 2008-04-22 02:41:44.000000000 -0700
@@ -6,9 +6,10 @@
use Cwd ();
use Config;
use Text::ParseWords;
+use IO::File;
use vars qw($VERSION);
-$VERSION = '0.22';
+$VERSION = '0.23';
sub new {
my $class = shift;
@@ -118,10 +119,8 @@
my $tmpfile = File::Spec->catfile(File::Spec->tmpdir, 'compilet.c');
{
- local *FH;
- open FH, "> $tmpfile" or die "Can't create $tmpfile: $!";
- print FH "int boot_compilet() { return 1; }\n";
- close FH;
+ my $FH = IO::File->new("> $tmpfile") or die "Can't create $tmpfile: $!";
+ print $FH "int boot_compilet() { return 1; }\n";
}
my ($obj_file, @lib_files);
==== //depot/perl/lib/ExtUtils/CBuilder/Changes#5 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Changes
--- perl/lib/ExtUtils/CBuilder/Changes#4~32205~ 2007-10-31 02:40:38.000000000 -0700
+++ perl/lib/ExtUtils/CBuilder/Changes 2008-04-22 02:41:44.000000000 -0700
@@ -1,5 +1,23 @@
Revision history for Perl extension ExtUtils::CBuilder.
+ - Fixed some problems (some old, some new) with Strawberry Perl on
+ Windows. [Alberto Simo~es]
+
+ - Will now install in the core perl lib directory when the user's
+ perl is new enough to have us in core. [Yi Ma Mao]
+
+0.22 - Fri Feb 8 21:52:21 2008
+
+ - Replaced the split_like_shell() method on Windows with a
+ near-no-op, which is probably more correct and has the benefit of
+ not messing up UNC paths. [John R. LoVerso, see
+ http://rt.cpan.org/Ticket/Display.html?id=26545]
+
+ - Fixed extra_compiler_flags on Windows, they were being
+ ignored. [Robert May]
+
+0.21 - Tue Oct 30 06:46:01 2007
+
- Clean up perl_src path using Cwd::realpath(). Only affects usage
as part of the perl core.
==== //depot/perl/lib/ExtUtils/CBuilder/Platform/Unix.pm#5 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/Unix.pm
--- perl/lib/ExtUtils/CBuilder/Platform/Unix.pm#4~33263~ 2008-02-08 23:18:35.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/Platform/Unix.pm 2008-04-22 02:41:44.000000000 -0700
@@ -4,7 +4,7 @@
use ExtUtils::CBuilder::Base;
use vars qw($VERSION @ISA);
-$VERSION = '0.22';
+$VERSION = '0.23';
@ISA = qw(ExtUtils::CBuilder::Base);
sub link_executable {
==== //depot/perl/lib/ExtUtils/CBuilder/Platform/VMS.pm#10 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/VMS.pm
--- perl/lib/ExtUtils/CBuilder/Platform/VMS.pm#9~32277~ 2007-11-11 15:03:03.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/Platform/VMS.pm 2008-04-22 02:41:44.000000000 -0700
@@ -4,7 +4,7 @@
use ExtUtils::CBuilder::Base;
use vars qw($VERSION @ISA);
-$VERSION = '0.22';
+$VERSION = '0.23_01';
@ISA = qw(ExtUtils::CBuilder::Base);
use File::Spec::Functions qw(catfile catdir);
==== //depot/perl/lib/ExtUtils/CBuilder/Platform/Windows.pm#15 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/Windows.pm
--- perl/lib/ExtUtils/CBuilder/Platform/Windows.pm#14~33263~ 2008-02-08 23:18:35.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/Platform/Windows.pm 2008-04-22 02:41:44.000000000 -0700
@@ -7,9 +7,10 @@
use File::Spec;
use ExtUtils::CBuilder::Base;
+use IO::File;
use vars qw($VERSION @ISA);
-$VERSION = '0.22';
+$VERSION = '0.23';
@ISA = qw(ExtUtils::CBuilder::Base);
sub new {
@@ -43,6 +44,16 @@
return ($_);
}
+sub do_system {
+ # See above
+ my $self = shift;
+ my $cmd = join(" ",
+ grep length,
+ map {$a=$_;$a=~s/\t/ /g;$a=~s/^\s+|\s+$//;$a}
+ grep defined, @_);
+ return $self->SUPER::do_system($cmd);
+}
+
sub arg_defines {
my ($self, %args) = @_;
s/"/\\"/g foreach values %args;
@@ -282,18 +293,16 @@
$self->add_to_cleanup($script);
print "Generating script '$script'\n" if !$self->{quiet};
- open( SCRIPT, ">$script" )
+ my $SCRIPT = IO::File->new( ">$script" )
or die( "Could not create script '$script': $!" );
- print SCRIPT join( "\n",
+ print $SCRIPT join( "\n",
map { ref $_ ? @{$_} : $_ }
grep defined,
delete(
@spec{ qw(includes cflags optimize defines perlinc) } )
);
- close SCRIPT;
-
push @{$spec{includes}}, '@"' . $script . '"';
return %spec;
@@ -355,10 +364,10 @@
print "Generating script '$script'\n" if !$self->{quiet};
- open( SCRIPT, ">$script" )
+ my $SCRIPT = IO::File->new( ">$script" )
or die( "Could not create script '$script': $!" );
- print SCRIPT join( "\n",
+ print $SCRIPT join( "\n",
map { ref $_ ? @{$_} : $_ }
grep defined,
delete(
@@ -367,8 +376,6 @@
def_file implib map_file) } )
);
- close SCRIPT;
-
push @{$spec{lddlflags}}, '@"' . $script . '"';
return %spec;
@@ -412,7 +419,7 @@
print "Generating script '$script'\n" if !$self->{quiet};
- open( SCRIPT, ">$script" )
+ my $SCRIPT = IO::File->new( ">$script" )
or die( "Could not create script '$script': $!" );
# XXX Borland "response files" seem to be unable to accept macro
@@ -420,15 +427,13 @@
# backslash doesn't work, and any level of quotes are stripped. The
# result is is a floating point number in the source file where a
# string is expected. So we leave the macros on the command line.
- print SCRIPT join( "\n",
+ print $SCRIPT join( "\n",
map { ref $_ ? @{$_} : $_ }
grep defined,
delete(
@spec{ qw(includes cflags optimize perlinc) } )
);
- close SCRIPT;
-
push @{$spec{includes}}, '@"' . $script . '"';
return %spec;
@@ -478,29 +483,25 @@
print "Generating scripts '$ld_script' and '$ld_libs'.\n" if !$self->{quiet};
# Script 1: contains options & names of object files.
- open( LD_SCRIPT, ">$ld_script" )
+ my $LD_SCRIPT = IO::File->new( ">$ld_script" )
or die( "Could not create linker script '$ld_script': $!" );
- print LD_SCRIPT join( " +\n",
+ print $LD_SCRIPT join( " +\n",
map { @{$_} }
grep defined,
delete(
@spec{ qw(lddlflags libpath other_ldflags startup objects) } )
);
- close LD_SCRIPT;
-
# Script 2: contains name of libs to link against.
- open( LD_LIBS, ">$ld_libs" )
+ my $LD_LIBS = IO::File->new( ">$ld_libs" )
or die( "Could not create linker script '$ld_libs': $!" );
- print LD_LIBS join( " +\n",
+ print $LD_LIBS join( " +\n",
(delete $spec{libperl} || ''),
@{delete $spec{perllibs} || []},
);
- close LD_LIBS;
-
push @{$spec{lddlflags}}, '@"' . $ld_script . '"';
push @{$spec{perllibs}}, '@"' . $ld_libs . '"';
@@ -622,32 +623,30 @@
print "Generating script '$script'\n" if !$self->{quiet};
- open( SCRIPT, ">$script" )
+ my $SCRIPT = IO::File->new( ">$script" )
or die( "Could not create script '$script': $!" );
- print( SCRIPT 'SEARCH_DIR(' . $_ . ")\n" )
+ print $SCRIPT ( 'SEARCH_DIR(' . $_ . ")\n" )
for @{delete $spec{libpath} || []};
# gcc takes only one startup file, so the first object in startup is
# specified as the startup file and any others are shifted into the
# beginning of the list of objects.
if ( $spec{startup} && @{$spec{startup}} ) {
- print SCRIPT 'STARTUP(' . shift( @{$spec{startup}} ) . ")\n";
+ print $SCRIPT 'STARTUP(' . shift( @{$spec{startup}} ) . ")\n";
unshift @{$spec{objects}},
@{delete $spec{startup} || []};
}
- print SCRIPT 'INPUT(' . join( ',',
+ print $SCRIPT 'INPUT(' . join( ',',
@{delete $spec{objects} || []}
) . ")\n";
- print SCRIPT 'INPUT(' . join( ' ',
+ print $SCRIPT 'INPUT(' . join( ' ',
(delete $spec{libperl} || ''),
@{delete $spec{perllibs} || []},
) . ")\n";
- close SCRIPT;
-
push @{$spec{other_ldflags}}, '"' . $script . '"';
return %spec;
==== //depot/perl/lib/ExtUtils/CBuilder/Platform/aix.pm#5 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/aix.pm
--- perl/lib/ExtUtils/CBuilder/Platform/aix.pm#4~33263~ 2008-02-08 23:18:35.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/Platform/aix.pm 2008-04-22 02:41:44.000000000 -0700
@@ -5,7 +5,7 @@
use File::Spec;
use vars qw($VERSION @ISA);
-$VERSION = '0.22';
+$VERSION = '0.23';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
==== //depot/perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm#5 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm
--- perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm#4~33263~ 2008-02-08 23:18:35.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/Platform/cygwin.pm 2008-04-22 02:41:44.000000000 -0700
@@ -5,7 +5,7 @@
use ExtUtils::CBuilder::Platform::Unix;
use vars qw($VERSION @ISA);
-$VERSION = '0.22';
+$VERSION = '0.23';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub link_executable {
==== //depot/perl/lib/ExtUtils/CBuilder/Platform/darwin.pm#5 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/darwin.pm
--- perl/lib/ExtUtils/CBuilder/Platform/darwin.pm#4~33263~ 2008-02-08 23:18:35.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/Platform/darwin.pm 2008-04-22 02:41:44.000000000 -0700
@@ -4,7 +4,7 @@
use ExtUtils::CBuilder::Platform::Unix;
use vars qw($VERSION @ISA);
-$VERSION = '0.22';
+$VERSION = '0.23';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub compile {
==== //depot/perl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm#5 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
--- perl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm#4~33263~ 2008-02-08 23:18:35.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm 2008-04-22 02:41:44.000000000 -0700
@@ -6,7 +6,7 @@
use vars qw($VERSION @ISA);
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
-$VERSION = '0.22';
+$VERSION = '0.23';
sub link_executable {
my $self = shift;
==== //depot/perl/lib/ExtUtils/CBuilder/Platform/os2.pm#7 (text) ====
Index: perl/lib/ExtUtils/CBuilder/Platform/os2.pm
--- perl/lib/ExtUtils/CBuilder/Platform/os2.pm#6~33263~ 2008-02-08 23:18:35.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/Platform/os2.pm 2008-04-22 02:41:44.000000000 -0700
@@ -4,7 +4,7 @@
use ExtUtils::CBuilder::Platform::Unix;
use vars qw($VERSION @ISA);
-$VERSION = '0.22';
+$VERSION = '0.23';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
==== //depot/perl/lib/ExtUtils/CBuilder/t/01-basic.t#8 (text) ====
Index: perl/lib/ExtUtils/CBuilder/t/01-basic.t
--- perl/lib/ExtUtils/CBuilder/t/01-basic.t#7~33339~ 2008-02-21 05:38:57.000000000 -0800
+++ perl/lib/ExtUtils/CBuilder/t/01-basic.t 2008-04-22 02:41:44.000000000 -0700
@@ -53,13 +53,16 @@
}
my @words = $b->split_like_shell(' foo bar');
-if ($^O eq 'MSWin32') {
- ok @words, 1;
- ok $words[0], ' foo bar';
- skip 'No splitting in split_like_shell() on Win32';
-}
-else {
- ok @words, 2;
- ok $words[0], 'foo';
- ok $words[1], 'bar';
-}
+
+skip(
+ $^O =~ m/MSWin/ ? "Skip under MSWindows" : 0, # whether to skip
+ @words, 2
+ );
+skip(
+ $^O =~ m/MSWin/ ? "Skip under MSWindows" : 0, # whether to skip
+ $words[0], 'foo'
+);
+skip(
+ $^O =~ m/MSWin/ ? "Skip under MSWindows" : 0, # whether to skip
+ $words[1], 'bar'
+);
End of Patch.
-
Change 33721: Upgrade to ExtUtils-CBuilder-0.23
by Steve Hay