In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/7b0eef92ba8ed2aa84e9187dadebc5cabfc3a3c5?hp=49c6bc4fab3fbf47c282435f743a3f6cde4c72a1>
- Log ----------------------------------------------------------------- commit 7b0eef92ba8ed2aa84e9187dadebc5cabfc3a3c5 Author: Chris 'BinGOs' Williams <[email protected]> Date: Sun Jun 27 15:09:32 2010 +0100 Update ExtUtils-CBuilder to CPAN version 0.2703 [DELTA] 0.2703 - Tue Mar 16 17:10:55 EDT 2010 Bugs fixed: - fixed tests for Windows and MSVC [Jan Dubois] 0.2702 - Mon Feb 22 15:10:52 EST 2010 Bugs fixed: - compile() changes in 0.2701 did not work on Windows. Now fixed. 0.2701 - Tue Feb 16 09:12:45 EST 2010 Bugs fixed: - compile() now accepts both string & array for 'include_dirs' argument, as documented.(RT#54606) [Alberto Sim<F5>es] ----------------------------------------------------------------------- Summary of changes: Porting/Maintainers.pl | 2 +- cpan/ExtUtils-CBuilder/Changes | 16 +++++++++ cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm | 2 +- .../lib/ExtUtils/CBuilder/Base.pm | 7 +++- .../lib/ExtUtils/CBuilder/Platform/Unix.pm | 2 +- .../lib/ExtUtils/CBuilder/Platform/VMS.pm | 2 +- .../lib/ExtUtils/CBuilder/Platform/Windows.pm | 5 ++- .../lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm | 2 +- .../lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm | 2 +- .../lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm | 2 +- .../lib/ExtUtils/CBuilder/Platform/aix.pm | 2 +- .../lib/ExtUtils/CBuilder/Platform/cygwin.pm | 2 +- .../lib/ExtUtils/CBuilder/Platform/darwin.pm | 2 +- .../lib/ExtUtils/CBuilder/Platform/dec_osf.pm | 2 +- .../lib/ExtUtils/CBuilder/Platform/os2.pm | 2 +- cpan/ExtUtils-CBuilder/t/01-basic.t | 36 +++++++++++++++++++- cpan/ExtUtils-CBuilder/t/02-link.t | 7 +--- 17 files changed, 74 insertions(+), 21 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 6c7da68..632b838 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -520,7 +520,7 @@ use File::Glob qw(:case); 'ExtUtils::CBuilder' => { 'MAINTAINER' => 'kwilliams', - 'DISTRIBUTION' => 'DAGOLDEN/ExtUtils-CBuilder-0.27.tar.gz', + 'DISTRIBUTION' => 'DAGOLDEN/ExtUtils-CBuilder-0.2703.tar.gz', 'FILES' => q[cpan/ExtUtils-CBuilder], 'UPSTREAM' => 'cpan', }, diff --git a/cpan/ExtUtils-CBuilder/Changes b/cpan/ExtUtils-CBuilder/Changes index b86c638..e3e709d 100644 --- a/cpan/ExtUtils-CBuilder/Changes +++ b/cpan/ExtUtils-CBuilder/Changes @@ -1,5 +1,21 @@ Revision history for Perl extension ExtUtils::CBuilder. +0.2703 - Tue Mar 16 17:10:55 EDT 2010 + + Bugs fixed: + - fixed tests for Windows and MSVC [Jan Dubois] + +0.2702 - Mon Feb 22 15:10:52 EST 2010 + + Bugs fixed: + - compile() changes in 0.2701 did not work on Windows. Now fixed. + +0.2701 - Tue Feb 16 09:12:45 EST 2010 + + Bugs fixed: + - compile() now accepts both string & array for 'include_dirs' + argument, as documented.(RT#54606) [Alberto Simões] + 0.27 - Thu Oct 29 21:29:56 EDT 2009 Other: diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm index 7854e88..7620daf 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm @@ -5,7 +5,7 @@ use File::Path (); use File::Basename (); use vars qw($VERSION @ISA); -$VERSION = '0.27'; +$VERSION = '0.2703'; $VERSION = eval $VERSION; # Okay, this is the brute-force method of finding out what kind of diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm index 28036c6..a2d96d6 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm @@ -9,7 +9,7 @@ use Text::ParseWords; use IO::File; use vars qw($VERSION); -$VERSION = '0.27'; +$VERSION = '0.2703'; sub new { my $class = shift; @@ -89,7 +89,10 @@ sub compile { my $cf = $self->{config}; # For convenience $args{object_file} ||= $self->object_file($args{source}); - + + $args{include_dirs} = [ $args{include_dirs} ] + if exists($args{include_dirs}) && ref($args{include_dirs}) ne "ARRAY"; + my @include_dirs = $self->arg_include_dirs (@{$args{include_dirs} || []}, $self->perl_inc()); diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm index 78ff244..a3e9b3c 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Base; use vars qw($VERSION @ISA); -$VERSION = '0.27'; +$VERSION = '0.2703'; @ISA = qw(ExtUtils::CBuilder::Base); sub link_executable { diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm index 35a2eba..e31eca9 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Base; use vars qw($VERSION @ISA); -$VERSION = '0.27'; +$VERSION = '0.2703'; @ISA = qw(ExtUtils::CBuilder::Base); use File::Spec::Functions qw(catfile catdir); diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm index f0b98db..e26d1f8 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm @@ -10,7 +10,7 @@ use ExtUtils::CBuilder::Base; use IO::File; use vars qw($VERSION @ISA); -$VERSION = '0.27'; +$VERSION = '0.2703'; @ISA = qw(ExtUtils::CBuilder::Base); =begin comment @@ -86,6 +86,9 @@ sub compile { die "Missing 'source' argument to compile()" unless defined $args{source}; + $args{include_dirs} = [ $args{include_dirs} ] + if exists($args{include_dirs}) && ref($args{include_dirs}) ne "ARRAY"; + my ($basename, $srcdir) = ( File::Basename::fileparse($args{source}, '\.[^.]+$') )[0,1]; diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm index ee65c91..0764f93 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm @@ -1,7 +1,7 @@ package ExtUtils::CBuilder::Platform::Windows::BCC; use vars qw($VERSION); -$VERSION = '0.27'; +$VERSION = '0.2703'; sub format_compiler_cmd { my ($self, %spec) = @_; diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm index 132bf84..84cdd5c 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm @@ -1,7 +1,7 @@ package ExtUtils::CBuilder::Platform::Windows::GCC; use vars qw($VERSION); -$VERSION = '0.27'; +$VERSION = '0.2703'; sub format_compiler_cmd { my ($self, %spec) = @_; diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm index 7da1c9b..72c3c00 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm @@ -1,7 +1,7 @@ package ExtUtils::CBuilder::Platform::Windows::MSVC; use vars qw($VERSION); -$VERSION = '0.27'; +$VERSION = '0.2703'; sub arg_exec_file { my ($self, $file) = @_; diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm index 656e0dc..c4848ab 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm +++ b/cpan/ExtUtils-CBuilder/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.27'; +$VERSION = '0.2703'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm index f865097..e886682 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm +++ b/cpan/ExtUtils-CBuilder/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.27'; +$VERSION = '0.2703'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); # TODO: If a specific exe_file name is requested, if the exe created diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm index efc7934..6253788 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Platform::Unix; use vars qw($VERSION @ISA); -$VERSION = '0.27'; +$VERSION = '0.2703'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub compile { diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm index d07b71f..38205a9 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm +++ b/cpan/ExtUtils-CBuilder/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.27'; +$VERSION = '0.2703'; sub link_executable { my $self = shift; diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm index 2815d58..bb590ee 100644 --- a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm +++ b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm @@ -4,7 +4,7 @@ use strict; use ExtUtils::CBuilder::Platform::Unix; use vars qw($VERSION @ISA); -$VERSION = '0.27'; +$VERSION = '0.2703'; @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } diff --git a/cpan/ExtUtils-CBuilder/t/01-basic.t b/cpan/ExtUtils-CBuilder/t/01-basic.t index 66a025f..c1eab9e 100644 --- a/cpan/ExtUtils-CBuilder/t/01-basic.t +++ b/cpan/ExtUtils-CBuilder/t/01-basic.t @@ -23,7 +23,7 @@ if ( ! $b->have_compiler ) { plan skip_all => "no compiler available for testing"; } else { - plan tests => 10; + plan tests => 12; } ok $b, "created EU::CB object"; @@ -70,3 +70,37 @@ SKIP: { is( $words[0], 'foo' ); is( $words[1], 'bar' ); } + +# include_dirs should be settable as string or list +{ + package Sub; + use vars '@ISA'; + @ISA = ('ExtUtils::CBuilder'); + my $saw = 0; + sub do_system { + if ($^O eq "MSWin32") { + # ExtUtils::CBuilder::MSVC::write_compiler_script() puts the + # include_dirs into a response file and not the commandline + for (@_) { + next unless /^\@"(.*)"$/; + open(my $fh, "<", $1) or next; + local $/; + $saw = 1 if <$fh> =~ /another dir/; + last; + } + } + $saw = 1 if grep {$_ =~ /another dir/} @_; + return 1; + } + + package main; + my $s = Sub->new(); + $s->compile(source => 'foo', + include_dirs => 'another dir'); + ok $saw; + + $saw = 0; + $s->compile(source => 'foo', + include_dirs => ['a dir', 'another dir']); + ok $saw; +} diff --git a/cpan/ExtUtils-CBuilder/t/02-link.t b/cpan/ExtUtils-CBuilder/t/02-link.t index 1acf935..b16f1e3 100644 --- a/cpan/ExtUtils-CBuilder/t/02-link.t +++ b/cpan/ExtUtils-CBuilder/t/02-link.t @@ -2,7 +2,7 @@ use strict; use Test::More; -BEGIN { +BEGIN { if ($^O eq 'VMS') { # So we can get the return value of system() require vmsish; @@ -67,7 +67,7 @@ SKIP: { # Try the executable my $ec = my_system($exe_file); is( $ec, 11, "got expected exit code from executable" ) - or diag( $ec == -1 ? "Could not run '$exe_file': $!\n" + or diag( $ec == -1 ? "Could not run '$exe_file': $!\n" : "Unexpected exit code '$ec'\n"); } @@ -86,10 +86,7 @@ sub my_system { my $cmd = shift; my $ec; if ($^O eq 'VMS') { - # Preserve non-posixified status and don't bit shift the result. - use vmsish 'status'; $ec = system("mcr $cmd"); - return $ec; } $ec = system($cmd); return $ec == -1 ? -1 : $ec >> 8; -- Perl5 Master Repository
