CBuilder::Android: fix ->link() to respect wantarray.
authorBrian Fraser <fraserbn@gmail.com>
Wed, 5 Feb 2014 10:37:32 +0000 (07:37 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Thu, 6 Feb 2014 02:12:17 +0000 (23:12 -0300)
16 files changed:
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm
dist/ExtUtils-CBuilder/t/01-basic.t
dist/ExtUtils-CBuilder/t/03-cplusplus.t

index 1f66c93..d9b4fa3 100644 (file)
@@ -6,7 +6,7 @@ use File::Basename ();
 use Perl::OSType qw/os_type/;
 
 use vars qw($VERSION @ISA);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 $VERSION = eval $VERSION;
 
 # We only use this once - don't waste a symbol table entry on it.
index c7b1a10..a22abc8 100644 (file)
@@ -10,7 +10,7 @@ use IPC::Cmd qw(can_run);
 use File::Temp qw(tempfile);
 
 use vars qw($VERSION);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 
 # More details about C/C++ compilers:
 # http://developers.sun.com/sunstudio/documentation/product/compiler.jsp
index 2dab172..1a89c7d 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use ExtUtils::CBuilder::Base;
 
 use vars qw($VERSION @ISA);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 @ISA = qw(ExtUtils::CBuilder::Base);
 
 sub link_executable {
index d6d99c6..534ee5e 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use ExtUtils::CBuilder::Base;
 
 use vars qw($VERSION @ISA);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 @ISA = qw(ExtUtils::CBuilder::Base);
 
 use File::Spec::Functions qw(catfile catdir);
index aea09ba..8a251f9 100644 (file)
@@ -10,7 +10,7 @@ use ExtUtils::CBuilder::Base;
 use IO::File;
 
 use vars qw($VERSION @ISA);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 @ISA = qw(ExtUtils::CBuilder::Base);
 
 =begin comment
index 7bf2573..6f00fa3 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::CBuilder::Platform::Windows::BCC;
 
 use vars qw($VERSION);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 
 sub format_compiler_cmd {
   my ($self, %spec) = @_;
index 2bdb016..88f863c 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::CBuilder::Platform::Windows::GCC;
 
 use vars qw($VERSION);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 
 sub format_compiler_cmd {
   my ($self, %spec) = @_;
index 38eb209..8320242 100644 (file)
@@ -1,7 +1,7 @@
 package ExtUtils::CBuilder::Platform::Windows::MSVC;
 
 use vars qw($VERSION);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 
 sub arg_exec_file {
   my ($self, $file) = @_;
index 223be29..25b3074 100644 (file)
@@ -5,7 +5,7 @@ use ExtUtils::CBuilder::Platform::Unix;
 use File::Spec;
 
 use vars qw($VERSION @ISA);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 sub need_prelink { 1 }
index 2e56db1..facc501 100644 (file)
@@ -5,7 +5,7 @@ use File::Spec;
 use ExtUtils::CBuilder::Platform::Unix;
 
 use vars qw($VERSION @ISA);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 # The Android linker will not recognize symbols from
@@ -31,7 +31,7 @@ sub link {
   # So we make this all work by returning an absolute path.
   my($so_file, @so_tmps) = $self->SUPER::link(%args);
   $so_file = File::Spec->rel2abs($so_file);
-  return ($so_file, @so_tmps);
+  return wantarray ? ($so_file, @so_tmps) : $so_file;
 }
 
 1;
index 9186fbb..94ce283 100644 (file)
@@ -5,7 +5,7 @@ use File::Spec;
 use ExtUtils::CBuilder::Platform::Unix;
 
 use vars qw($VERSION @ISA);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 # TODO: If a specific exe_file name is requested, if the exe created
index e334d91..1f85d3f 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use ExtUtils::CBuilder::Platform::Unix;
 
 use vars qw($VERSION @ISA);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 sub compile {
index ef2d3ee..f5cf92d 100644 (file)
@@ -6,7 +6,7 @@ use File::Spec;
 
 use vars qw($VERSION @ISA);
 @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 
 sub link_executable {
   my $self = shift;
index 5aec8f3..4e94304 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use ExtUtils::CBuilder::Platform::Unix;
 
 use vars qw($VERSION @ISA);
-$VERSION = '0.280215';
+$VERSION = '0.280216';
 @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
 
 sub need_prelink { 1 }
index c910802..b99382f 100644 (file)
@@ -50,6 +50,7 @@ ok 1;
 my ($lib, @temps) = $b->link(objects => $object_file,
                              module_name => 'basict');
 $lib =~ tr/"'//d;
+$_ = File::Spec->rel2abs($_) for $lib_file, $lib;
 is $lib_file, $lib;
 
 for ($source_file, $object_file, $lib_file) {
index e0c21e4..78290d3 100644 (file)
@@ -49,6 +49,7 @@ ok 1;
 my ($lib, @temps) = $b->link(objects => $object_file,
                              module_name => 'cplust');
 $lib =~ tr/"'//d;
+$_ = File::Spec->rel2abs($_) for $lib_file, $lib;
 is $lib_file, $lib;
 
 for ($source_file, $object_file, $lib_file) {