diff options
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform')
12 files changed, 54 insertions, 16 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Unix.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Unix.pm index 590068ca6f..2eaf591bbe 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Unix.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Unix.pm @@ -4,7 +4,7 @@ use warnings; use strict; use ExtUtils::CBuilder::Base; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Base); sub link_executable { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/VMS.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/VMS.pm index d9b1fbd571..d09a608fef 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/VMS.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/VMS.pm @@ -4,7 +4,7 @@ use warnings; use strict; use ExtUtils::CBuilder::Base; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Base); use File::Spec::Functions qw(catfile catdir); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows.pm index b81384f629..2fffc83d13 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows.pm @@ -8,7 +8,7 @@ use File::Spec; use ExtUtils::CBuilder::Base; use IO::File; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Base); =begin comment @@ -51,6 +51,22 @@ sub _compiler_type { : 'GCC'); } +# native quoting, not shell quoting +sub quote_literal { + my ($self, $string) = @_; + + # some of these characters don't need to be quoted for "native" quoting, but + # quote them anyway so they are more likely to make it through cmd.exe + if (length $string && $string !~ /[ \t\n\x0b"|<>%]/) { + return $string; + } + + $string =~ s{(\\*)(?="|\z)}{$1$1}g; + $string =~ s{"}{\\"}g; + + return qq{"$string"}; +} + sub split_like_shell { # Since Windows will pass the whole command string (not an argument # array) to the target program and make the program parse it itself, @@ -65,10 +81,15 @@ sub split_like_shell { 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, @_); + my $cmd = join ' ', + grep length, + map {$a=$_;$a=~s/\t/ /g;$a=~s/^\s+|\s+$//;$a} + grep defined, @_; + + if (!$self->{quiet}) { + print $cmd . "\n"; + } + local $self->{quiet} = 1; return $self->SUPER::do_system($cmd); } diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm index 657241a214..6ab48ba88f 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm @@ -1,6 +1,6 @@ package ExtUtils::CBuilder::Platform::Windows::BCC; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION use strict; use warnings; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm index 52664c7083..c3eb7a0e63 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm @@ -1,6 +1,6 @@ package ExtUtils::CBuilder::Platform::Windows::GCC; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION use warnings; use strict; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm index 6cbcc9b276..ce5e99f082 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm @@ -1,6 +1,6 @@ package ExtUtils::CBuilder::Platform::Windows::MSVC; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION use warnings; use strict; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/aix.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/aix.pm index 2ef8b38c06..35de7fa89c 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/aix.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/aix.pm @@ -5,7 +5,7 @@ use strict; use ExtUtils::CBuilder::Platform::Unix; use File::Spec; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/android.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/android.pm index 8500ab93e3..44ad646f1f 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/android.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/android.pm @@ -6,7 +6,7 @@ use File::Spec; use ExtUtils::CBuilder::Platform::Unix; use Config; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); # The Android linker will not recognize symbols from diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/cygwin.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/cygwin.pm index 3c8beacdeb..14d814ca5a 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/cygwin.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/cygwin.pm @@ -5,7 +5,7 @@ use strict; use File::Spec; use ExtUtils::CBuilder::Platform::Unix; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); # TODO: If a specific exe_file name is requested, if the exe created diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/darwin.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/darwin.pm index e050e32ae7..7e8ae7a4c7 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/darwin.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/darwin.pm @@ -3,10 +3,14 @@ package ExtUtils::CBuilder::Platform::darwin; use warnings; use strict; use ExtUtils::CBuilder::Platform::Unix; +use Config; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); +my ($osver) = split /\./, $Config{osvers}; +my $apple_cor = $^X eq "/usr/bin/perl" && $osver >= 18; + sub compile { my $self = shift; my $cf = $self->{config}; @@ -22,5 +26,18 @@ sub compile { $self->SUPER::compile(@_); } +sub arg_include_dirs { + my $self = shift; + + if ($apple_cor) { + my $perl_inc = $self->perl_inc; + return map { + $_ eq $perl_inc ? ("-iwithsysroot", $_ ) : "-I$_" + } @_; + } + else { + return $self->SUPER::arg_include_dirs(@_); + } +} 1; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm index 971cf93ff5..6b97095b51 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm @@ -5,7 +5,7 @@ use strict; use ExtUtils::CBuilder::Platform::Unix; use File::Spec; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub link_executable { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/os2.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/os2.pm index 58d316b57e..a7d11dceea 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/os2.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/os2.pm @@ -4,7 +4,7 @@ use warnings; use strict; use ExtUtils::CBuilder::Platform::Unix; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub need_prelink { 1 } |