summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-15 03:06:35 +0000
committerNorbert Preining <norbert@preining.info>2024-03-15 03:06:35 +0000
commit12679ab7d3c2a210f4123163671b532b8b55d5f9 (patch)
tree0060d13467186ad977f4e73488ee20dd6c0017ab /systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder
parent62170822e034fdd3f81de7274835d0d3b0467100 (diff)
CTAN sync 202403150306
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder')
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm18
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Unix.pm2
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/VMS.pm2
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows.pm31
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm2
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm2
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm2
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/aix.pm2
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/android.pm2
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/cygwin.pm2
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/darwin.pm19
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/dec_osf.pm2
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Platform/os2.pm2
13 files changed, 70 insertions, 18 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm
index 8ee248dfab..0494cafd95 100644
--- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm
+++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder/Base.pm
@@ -9,7 +9,7 @@ use Text::ParseWords;
use IPC::Cmd qw(can_run);
use File::Temp qw(tempfile);
-our $VERSION = '0.280236'; # VERSION
+our $VERSION = '0.280238'; # VERSION
# More details about C/C++ compilers:
# http://developers.sun.com/sunstudio/documentation/product/compiler.jsp
@@ -335,10 +335,24 @@ sub _do_link {
return wantarray ? ($out, @temp_files) : $out;
}
+sub quote_literal {
+ my ($self, $string) = @_;
+
+ if (length $string && $string !~ /[^a-zA-Z0-9,._+@%\/-]/) {
+ return $string;
+ }
+
+ $string =~ s{'}{'\\''}g;
+
+ return "'$string'";
+}
sub do_system {
my ($self, @cmd) = @_;
- print "@cmd\n" if !$self->{quiet};
+ if (!$self->{quiet}) {
+ my $full = join ' ', map $self->quote_literal($_), @cmd;
+ print $full . "\n";
+ }
return !system(@cmd);
}
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 }