diff options
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils')
64 files changed, 527 insertions, 214 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder.pm index e470d41676..705d30af03 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/CBuilder.pm @@ -7,7 +7,7 @@ use Perl::OSType qw/os_type/; use warnings; use strict; -our $VERSION = '0.280236'; # VERSION +our $VERSION = '0.280238'; # VERSION our @ISA; # We only use this once - don't waste a symbol table entry on it. 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 } diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Command.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Command.pm index e36453608e..39cf5f2ffd 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Command.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Command.pm @@ -4,11 +4,10 @@ use 5.00503; use strict; use warnings; require Exporter; -use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION); -@ISA = qw(Exporter); -@EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f test_d chmod - dos2unix); -$VERSION = '7.62'; +our @ISA = qw(Exporter); +our @EXPORT = qw(cp rm_f rm_rf mv cat eqtime mkpath touch test_f test_d chmod + dos2unix); +our $VERSION = '7.70'; $VERSION =~ tr/_//d; my $Is_VMS = $^O eq 'VMS'; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Command/MM.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Command/MM.pm index 62fd8682d3..52198855ef 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Command/MM.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Command/MM.pm @@ -10,7 +10,7 @@ our @ISA = qw(Exporter); our @EXPORT = qw(test_harness pod2man perllocal_install uninstall warn_if_old_packlist test_s cp_nonempty); -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; my $Is_VMS = $^O eq 'VMS'; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Constant/Base.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Constant/Base.pm index bd0d8a784b..2500f8dcff 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Constant/Base.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Constant/Base.pm @@ -5,7 +5,7 @@ use vars qw($VERSION); use Carp; use Text::Wrap; use ExtUtils::Constant::Utils qw(C_stringify perl_stringify); -$VERSION = '0.06'; +$VERSION = '0.07'; use constant is_perl56 => ($] < 5.007 && $] > 5.005_50); @@ -716,7 +716,7 @@ sub normalise_items # tr///c is broken on 5.6.1 for utf8, so my original tr/\0-\177//c # doesn't work. Upgrade to 5.8 # if ($name !~ tr/\0-\177//c || $] < 5.005_50) { - if ($name =~ tr/\0-\177// == length $name || $] < 5.005_50 + if ($name !~ /[[:^ascii:]]/ || $] < 5.005_50 || $args->{disable_utf8_duplication}) { # No characters outside 7 bit ASCII. if (exists $items->{$name}) { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Install.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Install.pm index 96081806f7..83db80df50 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Install.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Install.pm @@ -32,11 +32,11 @@ ExtUtils::Install - install files from here to there =head1 VERSION -2.20 +2.22 =cut -our $VERSION = '2.20'; # <-- do not forget to update the POD section just above this line! +our $VERSION = '2.22'; # <-- do not forget to update the POD section just above this line! $VERSION = eval $VERSION; =pod diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Installed.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Installed.pm index 0cfd96b507..c82861bd1d 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Installed.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Installed.pm @@ -15,7 +15,7 @@ my $DOSISH = ($^O =~ /^(MSWin\d\d|os2|dos|mint)$/); require VMS::Filespec if $Is_VMS; -our $VERSION = '2.20'; +our $VERSION = '2.22'; $VERSION = eval $VERSION; sub _is_prefix { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Liblist.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Liblist.pm index 16c13d91cf..a21e16dc72 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Liblist.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Liblist.pm @@ -3,7 +3,7 @@ package ExtUtils::Liblist; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; use File::Spec; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Liblist/Kid.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Liblist/Kid.pm index 3a715fb082..298a026bc4 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Liblist/Kid.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Liblist/Kid.pm @@ -11,7 +11,7 @@ use 5.006; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; use ExtUtils::MakeMaker::Config; @@ -58,6 +58,11 @@ sub _unix_os2_ext { my ( $fullname, @fullname ); my ( $pwd ) = cwd(); # from Cwd.pm my ( $found ) = 0; + if ($Config{gccversion}) { + chomp(my @incpath = grep s/^ //, grep { /^#include </ .. /^End of search / } `$Config{cc} -E -v - </dev/null 2>&1 >/dev/null`); + unshift @libpath, map { s{/include[^/]*}{/lib}; $_ } @incpath + } + @libpath = grep -d, @libpath; if ( $^O eq 'darwin' or $^O eq 'next' ) { # 'escape' Mach-O ld -framework and -F flags, so they aren't dropped later on diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM.pm index b7765f05b2..554e6fbb1c 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM.pm @@ -4,7 +4,7 @@ use strict; use warnings; use ExtUtils::MakeMaker::Config; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require ExtUtils::Liblist; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_AIX.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_AIX.pm index 562ee34520..d6519d2f4e 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_AIX.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_AIX.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_AIX; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; use ExtUtils::MakeMaker::Config; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Any.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Any.pm index 69a94920ee..45136821c4 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Any.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Any.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_Any; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; use Carp; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_BeOS.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_BeOS.pm index 2c12ad1be7..e544515a3f 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_BeOS.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_BeOS.pm @@ -27,7 +27,7 @@ require ExtUtils::MM_Any; require ExtUtils::MM_Unix; our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Cygwin.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Cygwin.pm index 190db104bd..f44877b257 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Cygwin.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Cygwin.pm @@ -10,7 +10,7 @@ require ExtUtils::MM_Unix; require ExtUtils::MM_Win32; our @ISA = qw( ExtUtils::MM_Unix ); -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_DOS.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_DOS.pm index 5a9eb22707..c23ec5dcf2 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_DOS.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_DOS.pm @@ -3,7 +3,7 @@ package ExtUtils::MM_DOS; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require ExtUtils::MM_Any; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Darwin.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Darwin.pm index 5db448b9be..24f48d902e 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Darwin.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Darwin.pm @@ -8,7 +8,7 @@ BEGIN { our @ISA = qw( ExtUtils::MM_Unix ); } -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_MacOS.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_MacOS.pm index 60c149157e..e186b916d0 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_MacOS.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_MacOS.pm @@ -3,7 +3,7 @@ package ExtUtils::MM_MacOS; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; sub new { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_NW5.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_NW5.pm index c345fcb4d9..e2ba1dfcdb 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_NW5.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_NW5.pm @@ -23,7 +23,7 @@ use warnings; use ExtUtils::MakeMaker::Config; use File::Basename; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require ExtUtils::MM_Win32; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_OS2.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_OS2.pm index 788eb6ec01..2cbec89fd8 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_OS2.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_OS2.pm @@ -6,7 +6,7 @@ use warnings; use ExtUtils::MakeMaker qw(neatvalue); use File::Spec; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require ExtUtils::MM_Any; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_OS390.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_OS390.pm index 172d27c85f..cb78ecaaf1 100755 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_OS390.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_OS390.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_OS390; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; use ExtUtils::MakeMaker::Config; @@ -61,8 +61,8 @@ sub xs_make_dynamic_lib { $ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" '; } - push @m, sprintf <<'MAKE', $ld_run_path_shell, $dlsyms_arg, $self->xs_obj_opt('$@'), $ldfrom, $libs, $exportlist; - %s$(LD) $(LDDLFLAGS) %s $(OTHERLDFLAGS) %s $(MYEXTLIB) %s \ + push @m, sprintf <<'MAKE', $ld_run_path_shell, $self->xs_obj_opt('$@'), $dlsyms_arg, $ldfrom, $libs, $exportlist; + %s$(LD) %s $(LDDLFLAGS) %s $(OTHERLDFLAGS) %s $(MYEXTLIB) \ $(PERL_ARCHIVE) %s $(PERL_ARCHIVE_AFTER) %s \ $(INST_DYNAMIC_FIX) $(CHMOD) $(PERM_RWX) $@ diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_QNX.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_QNX.pm index 475711278c..ee06364810 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_QNX.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_QNX.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_QNX; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require ExtUtils::MM_Unix; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_UWIN.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_UWIN.pm index 4eabbcabd4..64852a127e 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_UWIN.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_UWIN.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_UWIN; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require ExtUtils::MM_Unix; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Unix.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Unix.pm index 977b50ed02..fe385984f1 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Unix.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Unix.pm @@ -13,10 +13,11 @@ our %Config_Override; use ExtUtils::MakeMaker qw($Verbose neatvalue _sprintf562); -# If we make $VERSION an our variable parse_version() breaks -use vars qw($VERSION); -$VERSION = '7.62'; +# If $VERSION is in scope, parse_version() breaks +{ +our $VERSION = '7.70'; $VERSION =~ tr/_//d; +} require ExtUtils::MM_Any; our @ISA = qw(ExtUtils::MM_Any); @@ -34,13 +35,16 @@ BEGIN { $Is{SunOS4} = $^O eq 'sunos'; $Is{Solaris} = $^O eq 'solaris'; $Is{SunOS} = $Is{SunOS4} || $Is{Solaris}; - $Is{BSD} = ($^O =~ /^(?:free|net|open)bsd$/ or + $Is{BSD} = ($^O =~ /^(?:free|midnight|net|open)bsd$/ or grep( $^O eq $_, qw(bsdos interix dragonfly) ) ); $Is{Android} = $^O =~ /android/; - if ( $^O eq 'darwin' && $^X eq '/usr/bin/perl' ) { + if ( $^O eq 'darwin' ) { my @osvers = split /\./, $Config{osvers}; - $Is{ApplCor} = ( $osvers[0] >= 18 ); + if ( $^X eq '/usr/bin/perl' ) { + $Is{ApplCor} = ( $osvers[0] >= 18 ); + } + $Is{AppleRPath} = ( $osvers[0] >= 9 ); } } @@ -141,9 +145,9 @@ sub c_o { $flags =~ s/"-I(\$\(PERL_INC\))"/-iwithsysroot "$1"/; } - if (my $cpp = $Config{cpprun}) { + if (my $cpp = $self->{CPPRUN}) { my $cpp_cmd = $self->const_cccmd; - $cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/; + $cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/\$(CPPRUN)/; push @m, qq{ .c.i: $cpp_cmd $flags \$*.c > \$*.i @@ -1048,9 +1052,19 @@ sub xs_make_dynamic_lib { } $ldfrom = "-all $ldfrom -none" if $Is{OSF}; + my $ldrun = ''; # The IRIX linker doesn't use LD_RUN_PATH - my $ldrun = $Is{IRIX} && $self->{LD_RUN_PATH} ? - qq{-rpath "$self->{LD_RUN_PATH}"} : ''; + if ( $self->{LD_RUN_PATH} ) { + if ( $Is{IRIX} ) { + $ldrun = qq{-rpath "$self->{LD_RUN_PATH}"}; + } + elsif ( $^O eq 'darwin' && $Is{AppleRPath} ) { + # both clang and gcc support -Wl,-rpath, but only clang supports + # -rpath so by using -Wl,-rpath we avoid having to check for the + # type of compiler + $ldrun = qq{-Wl,-rpath,"$self->{LD_RUN_PATH}"}; + } + } # For example in AIX the shared objects/libraries from previous builds # linger quite a while in the shared dynalinker cache even when nobody @@ -1315,7 +1329,7 @@ sub _fixin_replace_shebang { if ($self->maybe_command($origcmd) && grep { $_ eq $origdir } @absdirs) { my ($odev, $oino) = stat $origcmd; my ($idev, $iino) = stat $interpreter; - if ($odev == $idev && $oino == $iino) { + if ($odev == $idev && $oino eq $iino) { warn "$origcmd is the same as $interpreter, leaving alone" if $Verbose; $interpreter = $origcmd; @@ -2183,7 +2197,7 @@ Add MM_Unix_VERSION. sub init_platform { my($self) = shift; - $self->{MM_Unix_VERSION} = $VERSION; + $self->{MM_Unix_VERSION} = our $VERSION; $self->{PERL_MALLOC_DEF} = '-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc '. '-Dfree=Perl_mfree -Drealloc=Perl_realloc '. '-Dcalloc=Perl_calloc'; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_VMS.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_VMS.pm index 414ee4b20c..4ed4e26e72 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_VMS.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_VMS.pm @@ -16,7 +16,7 @@ BEGIN { use File::Basename; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require ExtUtils::MM_Any; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_VOS.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_VOS.pm index 72f472cca2..cdbd1afdd6 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_VOS.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_VOS.pm @@ -2,7 +2,7 @@ package ExtUtils::MM_VOS; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require ExtUtils::MM_Unix; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Win32.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Win32.pm index ab2e0b9b68..5d931b4e5a 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Win32.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Win32.pm @@ -27,7 +27,7 @@ use ExtUtils::MakeMaker qw(neatvalue _sprintf562); require ExtUtils::MM_Any; require ExtUtils::MM_Unix; our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; $ENV{EMXSHELL} = 'sh'; # to run `commands` diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Win95.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Win95.pm index e415beb2ae..e907fb1a39 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Win95.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Win95.pm @@ -3,7 +3,7 @@ package ExtUtils::MM_Win95; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require ExtUtils::MM_Win32; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MY.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MY.pm index 6640c33157..4b24422ee3 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MY.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MY.pm @@ -3,7 +3,7 @@ package ExtUtils::MY; use strict; require ExtUtils::MM; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; our @ISA = qw(ExtUtils::MM); @@ -30,7 +30,7 @@ ExtUtils::MY - ExtUtils::MakeMaker subclass for customization B<FOR INTERNAL USE ONLY> -ExtUtils::MY is a subclass of L<ExtUtils::MM>. Its provided in your +ExtUtils::MY is a subclass of L<ExtUtils::MM>. It is provided in your Makefile.PL for you to add and override MakeMaker functionality. It also provides a convenient alias via the MY class. diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm index b9b38368e0..e8c3808b38 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker.pm @@ -25,7 +25,7 @@ my %Recognized_Att_Keys; our %macro_fsentity; # whether a macro is a filesystem name our %macro_dep; # whether a macro is a dependency -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; # Emulate something resembling CVS $Revision$ @@ -393,7 +393,7 @@ sub full_setup { # we will use all these variables in the Makefile @Get_from_Config = qw( - ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld + ar cc cccdlflags ccdlflags cpprun dlext dlsrc exe_ext full_ar ld lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib sitelibexp sitearchexp so ); @@ -525,7 +525,10 @@ sub new { # simulate "use warnings FATAL => 'all'" for vintage perls die @_; }; - version->new( $perl_version )->numify; + my $v = version->new($perl_version); + # we care about parse issues, not numify warnings + no warnings; + $v->numify; }; $perl_version =~ tr/_//d if defined $perl_version; @@ -634,7 +637,7 @@ END if (%unsatisfied && $self->{PREREQ_FATAL}){ my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"} - sort { $a cmp $b } keys %unsatisfied; + sort { lc $a cmp lc $b } keys %unsatisfied; die <<"END"; MakeMaker FATAL: prerequisites not found. $failedprereqs @@ -720,7 +723,7 @@ END # RT#91540 PREREQ_FATAL not recognized on command line if (%unsatisfied && $self->{PREREQ_FATAL}){ my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"} - sort { $a cmp $b } keys %unsatisfied; + sort { lc $a cmp lc $b } keys %unsatisfied; die <<"END"; MakeMaker FATAL: prerequisites not found. $failedprereqs @@ -1151,19 +1154,20 @@ sub check_hints { } sub _run_hintfile { - my ($self, $hint_file) = @_; + our $self; + local($self) = shift; # make $self available to the hint file. + my($hint_file) = shift; local($@, $!); print "Processing hints file $hint_file\n" if $Verbose; - if(open(my $fh, '<', $hint_file)) { - my $hints_content = do { local $/; <$fh> }; - no strict; - eval $hints_content; - warn "Failed to run hint file $hint_file: $@" if $@; - } - else { - warn "Could not open $hint_file for read: $!"; + # Just in case the ./ isn't on the hint file, which File::Spec can + # often strip off, we bung the curdir into @INC + local @INC = (File::Spec->curdir, @INC); + my $ret = do $hint_file; + if( !defined $ret ) { + my $error = $@ || $!; + warn $error; } } @@ -1262,6 +1266,7 @@ sub write_file_via_tmp { die "write_file_via_tmp: 2nd arg must be ref" unless ref $contents; for my $chunk (@$contents) { my $to_write = $chunk; + $to_write = '' unless defined $to_write; utf8::encode $to_write if !$CAN_DECODE && "$]" > 5.008; print $fh "$to_write\n" or die "Can't write to MakeMaker.tmp: $!"; } @@ -1331,26 +1336,6 @@ sub neatvalue { return "{ ".join(', ',@m)." }"; } -sub _find_magic_vstring { - my $value = shift; - return $value if $UNDER_CORE; - my $tvalue = ''; - require B; - my $sv = B::svref_2object(\$value); - my $magic = ref($sv) eq 'B::PVMG' ? $sv->MAGIC : undef; - while ( $magic ) { - if ( $magic->TYPE eq 'V' ) { - $tvalue = $magic->PTR; - $tvalue =~ s/^v?(.+)$/v$1/; - last; - } - else { - $magic = $magic->MOREMAGIC; - } - } - return $tvalue; -} - sub selfdocument { my($self) = @_; my(@m); @@ -1836,7 +1821,11 @@ currently used by MakeMaker but may be handy in Makefile.PLs. =item CCFLAGS String that will be included in the compiler call command line between -the arguments INC and OPTIMIZE. +the arguments INC and OPTIMIZE. Note that setting this will overwrite its +default value (C<$Config::Config{ccflags}>); to preserve that, include +the default value directly, e.g.: + + CCFLAGS => "$Config::Config{ccflags} ..." =item CONFIG @@ -1846,6 +1835,7 @@ ar cc cccdlflags ccdlflags +cpprun dlext dlsrc ld @@ -2671,10 +2661,9 @@ instead. See above, or the L<ExtUtils::MakeMaker::FAQ> entry. =item POLLUTE -Release 5.005 grandfathered old global symbol names by providing preprocessor -macros for extension source compatibility. As of release 5.6, these -preprocessor definitions are not available by default. The POLLUTE flag -specifies that the old names should still be defined: +Prior to 5.6 various interpreter variables were available without a C<PL_> +prefix, eg. C<PL_undef> was available as C<undef>. As of release 5.6, these +are only defined if the POLLUTE flag is enabled: perl Makefile.PL POLLUTE=1 @@ -3293,7 +3282,7 @@ are generated when F<Makefile.PL> generates a F<Makefile> (if L<CPAN::Meta> is installed). Clients like L<CPAN> or L<CPANPLUS> will read these files to see what prerequisites must be fulfilled before building or testing the distribution. If you wish to shut this feature off, set the C<NO_MYMETA> -C<WriteMakeFile()> flag to true. +C<WriteMakefile()> flag to true. =head2 Disabling an extension diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Config.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Config.pm index 323b1575f7..abc9db1ade 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Config.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Config.pm @@ -3,7 +3,7 @@ package ExtUtils::MakeMaker::Config; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; use Config (); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/FAQ.pod b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/FAQ.pod index 4b0b237500..76dca18e89 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/FAQ.pod +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/FAQ.pod @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::FAQ; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; 1; @@ -129,7 +129,7 @@ Let's take the following test directory structure: t/bar/othertest.t t/bar/baz/anothertest.t -Now, inside of the C<WriteMakeFile()> function in your F<Makefile.PL>, specify +Now, inside of the C<WriteMakefile()> function in your F<Makefile.PL>, specify where your tests are located with the C<test> directive: test => {TESTS => 't/*.t t/*/*.t t/*/*/*.t'} @@ -536,8 +536,7 @@ And of course a very basic test: t/cool.t: -------- - use Test; - BEGIN { plan tests => 1 }; + use Test::More tests => 1; use Cool::Foo; use Cool::Bar; Cool::Foo::perl_rules(); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Locale.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Locale.pm index a842bb40d6..7a75411a7a 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Locale.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Locale.pm @@ -2,7 +2,7 @@ package ExtUtils::MakeMaker::Locale; use strict; use warnings; -our $VERSION = "7.62"; +our $VERSION = "7.70"; $VERSION =~ tr/_//d; use base 'Exporter'; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Tutorial.pod b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Tutorial.pod index eafccc9d10..9e545b37f9 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Tutorial.pod +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/Tutorial.pod @@ -1,6 +1,6 @@ package ExtUtils::MakeMaker::Tutorial; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; @@ -112,7 +112,7 @@ example: t/foo/subdir_test.t -To do this, you need to inform C<WriteMakeFile()> in your I<Makefile.PL> file +To do this, you need to inform C<WriteMakefile()> in your I<Makefile.PL> file in the following fashion: test => {TESTS => 't/*.t t/*/*.t'} diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/version.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/version.pm index 0208a1f932..59fb20e5ce 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/version.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MakeMaker/version.pm @@ -16,7 +16,7 @@ use warnings; use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv); -$VERSION = '7.62'; +$VERSION = '7.70'; $VERSION =~ tr/_//d; $CLASS = 'version'; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Miniperl.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Miniperl.pm index cdc1244f02..18627f8a5e 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Miniperl.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Miniperl.pm @@ -1,12 +1,11 @@ #!./perl -w package ExtUtils::Miniperl; use strict; -require Exporter; +use Exporter 'import'; use ExtUtils::Embed 1.31, qw(xsi_header xsi_protos xsi_body); -our @ISA = qw(Exporter); our @EXPORT = qw(writemain); -our $VERSION = '1.10'; +our $VERSION = '1.13'; # blead will run this with miniperl, hence we can't use autodie or File::Temp my $temp; @@ -100,9 +99,6 @@ main(int argc, char **argv, char **env) #ifndef NO_ENV_ARRAY_IN_MAIN PERL_UNUSED_ARG(env); #endif -#ifndef PERL_USE_SAFE_PUTENV - PL_use_safe_putenv = FALSE; -#endif /* PERL_USE_SAFE_PUTENV */ /* if user wants control of gprof profiling off by default */ /* noop unless Configure is given -Accflags=-DPERL_GPROF_CONTROL */ @@ -139,8 +135,29 @@ main(int argc, char **argv, char **env) PL_perl_destruct_level = 0; } PL_exit_flags |= PERL_EXIT_DESTRUCT_END; - if (!perl_parse(my_perl, xs_init, argc, argv, (char **)NULL)) + if (!perl_parse(my_perl, xs_init, argc, argv, (char **)NULL)) { + + /* perl_parse() may end up starting its own run loops, which + * might end up "leaking" PL_restartop from the parse phase into + * the run phase which then ends up confusing run_body(). This + * leakage shouldn't happen and if it does its a bug. + * + * Note we do not do this assert in perl_run() or perl_parse() + * as there are modules out there which explicitly set + * PL_restartop before calling perl_run() directly from XS code + * (Coro), and it is conceivable PL_restartop could be set prior + * to calling perl_parse() by XS code as well. + * + * What we want to check is that the top level perl_parse(), + * perl_run() pairing does not allow a leaking PL_restartop, as + * that indicates a bug in perl. By putting the assert here we + * can validate that Perl itself is operating correctly without + * risking breakage to XS code under DEBUGGING. - Yves + */ + assert(!PL_restartop); + perl_run(my_perl); + } #ifndef PERL_MICRO /* Unregister our signal handler before destroying my_perl */ @@ -155,19 +172,6 @@ main(int argc, char **argv, char **env) perl_free(my_perl); -#if defined(USE_ENVIRON_ARRAY) && defined(PERL_TRACK_MEMPOOL) && !defined(NO_ENV_ARRAY_IN_MAIN) - /* - * The old environment may have been freed by perl_free() - * when PERL_TRACK_MEMPOOL is defined, but without having - * been restored by perl_destruct() before (this is only - * done if destruct_level > 0). - * - * It is important to have a valid environment for atexit() - * routines that are eventually called. - */ - environ = env; -#endif - PERL_SYS_TERM(); exit(exitstatus); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Mkbootstrap.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Mkbootstrap.pm index 1f14ee9e76..9a490a60a9 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Mkbootstrap.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Mkbootstrap.pm @@ -3,7 +3,7 @@ package ExtUtils::Mkbootstrap; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; require Exporter; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Mksymlists.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Mksymlists.pm index 2a7c455e8e..ec074dca22 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Mksymlists.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Mksymlists.pm @@ -11,7 +11,7 @@ use Config; our @ISA = qw(Exporter); our @EXPORT = qw(&Mksymlists); -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; sub Mksymlists { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/PL2Bat.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/PL2Bat.pm index 070e186fec..6807417945 100755 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/PL2Bat.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/PL2Bat.pm @@ -1,5 +1,5 @@ package ExtUtils::PL2Bat; -$ExtUtils::PL2Bat::VERSION = '0.004'; +$ExtUtils::PL2Bat::VERSION = '0.005'; use strict; use warnings; @@ -122,7 +122,7 @@ ExtUtils::PL2Bat - Batch file creation to run perl scripts on Windows =head1 VERSION -version 0.004 +version 0.005 =head1 OVERVIEW diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Packlist.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Packlist.pm index 98d09e3d82..5fa93ff274 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Packlist.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Packlist.pm @@ -4,7 +4,7 @@ use strict; use Carp qw(); use Config; our $Relocations; -our $VERSION = '2.20'; +our $VERSION = '2.22'; $VERSION = eval $VERSION; # Used for generating filehandle globs. IO::File might not be available! diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS.pm index d2205acd5a..0721582250 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS.pm @@ -11,7 +11,7 @@ use Symbol; our $VERSION; BEGIN { - $VERSION = '3.43'; + $VERSION = '3.51'; require ExtUtils::ParseXS::Constants; ExtUtils::ParseXS::Constants->VERSION($VERSION); require ExtUtils::ParseXS::CountLines; ExtUtils::ParseXS::CountLines->VERSION($VERSION); require ExtUtils::ParseXS::Utilities; ExtUtils::ParseXS::Utilities->VERSION($VERSION); @@ -31,6 +31,7 @@ use ExtUtils::ParseXS::Utilities qw( analyze_preprocessor_statements set_cond Warn + WarnHint current_line_number blurt death @@ -47,7 +48,10 @@ our @EXPORT_OK = qw( ############################## # A number of "constants" - +our $DIE_ON_ERROR; +our $AUTHOR_WARNINGS; +$AUTHOR_WARNINGS = ($ENV{AUTHOR_WARNINGS} || 0) + unless defined $AUTHOR_WARNINGS; our ($C_group_rex, $C_arg); # Group in C (no support for comments or literals) $C_group_rex = qr/ [({\[] @@ -103,6 +107,8 @@ sub process_file { typemap => [], versioncheck => 1, FH => Symbol::gensym(), + die_on_error => $DIE_ON_ERROR, # if true we die() and not exit() after errors + author_warnings => $AUTHOR_WARNINGS, %options, ); $args{except} = $args{except} ? ' TRY' : ''; @@ -119,9 +125,9 @@ sub process_file { } @{ $self->{XSStack} } = ({type => 'none'}); $self->{InitFileCode} = [ @ExtUtils::ParseXS::Constants::InitFileCode ]; - $self->{Overload} = 0; # bool + $self->{Overloaded} = {}; # hashref of Package => Packid + $self->{Fallback} = {}; # hashref of Package => fallback setting $self->{errors} = 0; # count - $self->{Fallback} = '&PL_sv_undef'; # Most of the 1500 lines below uses these globals. We'll have to # clean this up sometime, probably. For now, we just pull them out @@ -133,6 +139,9 @@ sub process_file { $self->{WantLineNumbers} = $args{linenumbers}; $self->{IncludedFiles} = {}; + $self->{die_on_error} = $args{die_on_error}; + $self->{author_warnings} = $args{author_warnings}; + die "Missing required parameter 'filename'" unless $args{filename}; $self->{filepathname} = $args{filename}; ($self->{dir}, $self->{filename}) = @@ -301,6 +310,7 @@ EOM $self->{interface_macro_set} = 'XSINTERFACE_FUNC_SET'; $self->{ProtoThisXSUB} = $self->{WantPrototypes}; # states 0 (none), 1 (yes), 2 (empty prototype) $self->{ScopeThisXSUB} = 0; # bool + $self->{OverloadsThisXSUB} = {}; # overloaded operators (as hash keys, to de-dup) my $xsreturn = 0; @@ -626,7 +636,16 @@ EOF $self->print_section(); $self->death("PPCODE must be last thing") if @{ $self->{line} }; print "\tLEAVE;\n" if $self->{ScopeThisXSUB}; + print "#if defined(__HP_cc) || defined(__HP_aCC)\n", + "#pragma diag_suppress 2111\n", + "#endif\n" + if $^O eq "hpux"; print "\tPUTBACK;\n\treturn;\n"; + print "#if defined(__HP_cc) || defined(__HP_aCC)\n", + "#pragma diag_default 2111\n", + "#endif\n" + if $^O eq "hpux"; + } elsif ($self->check_keyword("CODE")) { my $consumed_code = $self->print_section(); @@ -690,10 +709,17 @@ EOF do_push => undef, } ) for grep $self->{in_out}->{$_} =~ /OUT$/, sort keys %{ $self->{in_out} }; - my $prepush_done; + my $outlist_count = @{ $outlist_ref }; + if ($outlist_count) { + my $ext = $outlist_count; + ++$ext if $self->{gotRETVAL} || $wantRETVAL; + print "\tXSprePUSH;"; + print "\tEXTEND(SP,$ext);\n"; + } # all OUTPUT done, so now push the return value on the stack if ($self->{gotRETVAL} && $self->{RETVAL_code}) { print "\t$self->{RETVAL_code}\n"; + print "\t++SP;\n" if $outlist_count; } elsif ($self->{gotRETVAL} || $wantRETVAL) { my $outputmap = $self->{typemap}->get_outputmap( ctype => $self->{ret_type} ); @@ -708,8 +734,9 @@ EOF ); if (not $trgt->{with_size} and $trgt->{type} eq 'p') { # sv_setpv # PUSHp corresponds to sv_setpvn. Treat sv_setpv directly - print "\tsv_setpv(TARG, $what); XSprePUSH; PUSHTARG;\n"; - $prepush_done = 1; + print "\tsv_setpv(TARG, $what);\n"; + print "\tXSprePUSH;\n" unless $outlist_count; + print "\tPUSHTARG;\n"; } else { my $tsize = $trgt->{what_size}; @@ -718,8 +745,8 @@ EOF qq("$tsize"), {var => $var, type => $self->{ret_type}} ); - print "\tXSprePUSH; PUSH$trgt->{type}($what$tsize);\n"; - $prepush_done = 1; + print "\tXSprePUSH;\n" unless $outlist_count; + print "\tPUSH$trgt->{type}($what$tsize);\n"; } } else { @@ -731,15 +758,13 @@ EOF do_setmagic => 0, do_push => undef, } ); + print "\t++SP;\n" if $outlist_count; } } $xsreturn = 1 if $self->{ret_type} ne "void"; my $num = $xsreturn; - my $c = @{ $outlist_ref }; - print "\tXSprePUSH;" if $c and not $prepush_done; - print "\tEXTEND(SP,$c);\n" if $c; - $xsreturn += $c; + $xsreturn += $outlist_count; $self->generate_output( { type => $self->{var_types}->{$_}, num => $num++, @@ -782,6 +807,10 @@ EOF # if (errbuf[0]) # Perl_croak(aTHX_ errbuf); EOF + print "#if defined(__HP_cc) || defined(__HP_aCC)\n", + "#pragma diag_suppress 2128\n", + "#endif\n" + if $^O eq "hpux"; if ($xsreturn) { print Q(<<"EOF") unless $PPCODE; @@ -793,6 +822,10 @@ EOF # XSRETURN_EMPTY; EOF } + print "#if defined(__HP_cc) || defined(__HP_aCC)\n", + "#pragma diag_default 2128\n", + "#endif\n" + if $^O eq "hpux"; print Q(<<"EOF"); #]] @@ -865,12 +898,20 @@ EOF push(@{ $self->{InitFileCode} }, " (void)$self->{newXS}(\"$self->{pname}\", XS_$self->{Full_func_name}$self->{file}$self->{proto});\n"); } + + for my $operator (sort keys %{ $self->{OverloadsThisXSUB} }) { + $self->{Overloaded}->{$self->{Package}} = $self->{Packid}; + my $overload = "$self->{Package}\::($operator"; + push(@{ $self->{InitFileCode} }, + " (void)$self->{newXS}(\"$overload\", XS_$self->{Full_func_name}$self->{file}$self->{proto});\n"); + } } # END 'PARAGRAPH' 'while' loop - if ($self->{Overload}) { # make it findable with fetchmethod + for my $package (sort keys %{ $self->{Overloaded} }) { # make them findable with fetchmethod + my $packid = $self->{Overloaded}->{$package}; print Q(<<"EOF"); -#XS_EUPXS(XS_$self->{Packid}_nil); /* prototype to pass -Wmissing-prototypes */ -#XS_EUPXS(XS_$self->{Packid}_nil) +#XS_EUPXS(XS_${packid}_nil); /* prototype to pass -Wmissing-prototypes */ +#XS_EUPXS(XS_${packid}_nil) #{ # dXSARGS; # PERL_UNUSED_VAR(items); @@ -878,11 +919,11 @@ EOF #} # EOF - unshift(@{ $self->{InitFileCode} }, <<"MAKE_FETCHMETHOD_WORK"); - /* Making a sub named "$self->{Package}::()" allows the package */ - /* to be findable via fetchmethod(), and causes */ - /* overload::Overloaded("$self->{Package}") to return true. */ - (void)$self->{newXS}("$self->{Package}::()", XS_$self->{Packid}_nil$self->{file}$self->{proto}); + unshift(@{ $self->{InitFileCode} }, Q(<<"MAKE_FETCHMETHOD_WORK")); +# /* Making a sub named "${package}::()" allows the package */ +# /* to be findable via fetchmethod(), and causes */ +# /* overload::Overloaded("$package") to return true. */ +# (void)newXS_deffile("${package}::()", XS_${packid}_nil); MAKE_FETCHMETHOD_WORK } @@ -890,7 +931,7 @@ MAKE_FETCHMETHOD_WORK print Q(<<"EOF"); ##ifdef __cplusplus -#extern "C" +#extern "C" { ##endif EOF @@ -953,19 +994,28 @@ EOF # EOF - print Q(<<"EOF") if ($self->{Overload}); + if (keys %{ $self->{Overloaded} }) { + # once if any overloads + print Q(<<"EOF"); # /* register the overloading (type 'A') magic */ ##if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */ # PL_amagic_generation++; ##endif +EOF + for my $package (sort keys %{ $self->{Overloaded} }) { + # once for each package with overloads + my $fallback = $self->{Fallback}->{$package} || "&PL_sv_undef"; + print Q(<<"EOF"); # /* The magic for overload gets a GV* via gv_fetchmeth as */ # /* mentioned above, and looks in the SV* slot of it for */ # /* the "fallback" status. */ # sv_setsv( -# get_sv( "$self->{Package}::()", TRUE ), -# $self->{Fallback} +# get_sv( "${package}::()", TRUE ), +# $fallback # ); EOF + } + } print @{ $self->{InitFileCode} }; @@ -992,6 +1042,9 @@ EOF ##endif #]] # +##ifdef __cplusplus +#} +##endif EOF warn("Please specify prototyping behavior for $self->{filename} (see perlxs manual)\n") @@ -1286,26 +1339,89 @@ sub get_aliases { my ($line) = @_; my ($orig) = $line; + # we use this later for symbolic aliases + my $fname = $self->{Packprefix} . $self->{func_name}; + # Parse alias definitions # format is - # alias = value alias = value ... - - while ($line =~ s/^\s*([\w:]+)\s*=\s*(\w+)\s*//) { - my ($alias, $value) = ($1, $2); + # alias = value Pack::alias = value ... + # or + # alias => other + # or + # alias => Pack::other + # or + # Pack::alias => Other::alias + + while ($line =~ s/^\s*([\w:]+)\s*=(>?)\s*([\w:]+)\s*//) { + my ($alias, $is_symbolic, $value) = ($1, $2, $3); my $orig_alias = $alias; + blurt( $self, "Error: In alias definition for '$alias' the value may not" + . " contain ':' unless it is symbolic.") + if !$is_symbolic and $value=~/:/; + # check for optional package definition in the alias $alias = $self->{Packprefix} . $alias if $alias !~ /::/; + if ($is_symbolic) { + my $orig_value = $value; + $value = $self->{Packprefix} . $value if $value !~ /::/; + if (defined $self->{XsubAliases}->{$value}) { + $value = $self->{XsubAliases}->{$value}; + } elsif ($value eq $fname) { + $value = 0; + } else { + blurt( $self, "Error: Unknown alias '$value' in symbolic definition for '$orig_alias'"); + } + } + # check for duplicate alias name & duplicate value - Warn( $self, "Warning: Ignoring duplicate alias '$orig_alias'") - if defined $self->{XsubAliases}->{$alias}; + my $prev_value = $self->{XsubAliases}->{$alias}; + if (defined $prev_value) { + if ($prev_value eq $value) { + Warn( $self, "Warning: Ignoring duplicate alias '$orig_alias'") + } else { + Warn( $self, "Warning: Conflicting duplicate alias '$orig_alias'" + . " changes definition from '$prev_value' to '$value'"); + delete $self->{XsubAliasValues}->{$prev_value}{$alias}; + } + } - Warn( $self, "Warning: Aliases '$orig_alias' and '$self->{XsubAliasValues}->{$value}' have identical values") - if $self->{XsubAliasValues}->{$value}; + # Check and see if this alias results in two aliases having the same + # value, we only check non-symbolic definitions as the whole point of + # symbolic definitions is to say we want to duplicate the value and + # it is NOT a mistake. + unless ($is_symbolic) { + my @keys= sort keys %{$self->{XsubAliasValues}->{$value}||{}}; + # deal with an alias of 0, which might not be in the XsubAlias dataset + # yet as 0 is the default for the base function ($fname) + push @keys, $fname + if $value eq "0" and !defined $self->{XsubAlias}{$fname}; + if (@keys and $self->{author_warnings}) { + # We do not warn about value collisions unless author_warnings + # are enabled. They aren't helpful to a module consumer, only + # the module author. + @keys= map { "'$_'" } + map { my $copy= $_; + $copy=~s/^$self->{Packprefix}//; + $copy + } @keys; + WarnHint( $self, + "Warning: Aliases '$orig_alias' and " + . join(", ", @keys) + . " have identical values of $value" + . ( $value eq "0" + ? " - the base function" + : "" ), + !$self->{XsubAliasValueClashHinted}++ + ? "If this is deliberate use a symbolic alias instead." + : undef + ); + } + } $self->{XsubAliases}->{$alias} = $value; - $self->{XsubAliasValues}->{$value} = $orig_alias; + $self->{XsubAliasValues}->{$value}{$alias}++; } blurt( $self, "Error: Cannot parse ALIAS definitions from '$orig'") @@ -1342,10 +1458,7 @@ sub OVERLOAD_handler { next unless /\S/; trim_whitespace($_); while ( s/^\s*([\w:"\\)\+\-\*\/\%\<\>\.\&\|\^\!\~\{\}\=]+)\s*//) { - $self->{Overload} = 1 unless $self->{Overload}; - my $overload = "$self->{Package}\::(".$1; - push(@{ $self->{InitFileCode} }, - " (void)$self->{newXS}(\"$overload\", XS_$self->{Full_func_name}$self->{file}$self->{proto});\n"); + $self->{OverloadsThisXSUB}->{$1} = 1; } } } @@ -1368,7 +1481,7 @@ sub FALLBACK_handler { # check for valid FALLBACK value $self->death("Error: FALLBACK: TRUE/FALSE/UNDEF") unless exists $map{$setting}; - $self->{Fallback} = $map{$setting}; + $self->{Fallback}->{$self->{Package}} = $map{$setting}; } @@ -1779,11 +1892,17 @@ sub fetch_para { $self->_process_module_xs_line($1, $2, $3); } + # count how many #ifdef levels we see in this paragraph + # decrementing when we see an endif. if we see an elsif + # or endif without a corresponding #ifdef then we dont + # consider it part of this paragraph. + my $if_level = 0; for (;;) { $self->_maybe_skip_pod; $self->_maybe_parse_typemap_block; + my $final; if ($self->{lastline} !~ /^\s*#/ # not a CPP directive # CPP directives: # ANSI: if ifdef ifndef elif else endif define undef @@ -1793,7 +1912,7 @@ sub fetch_para { # others: ident (gcc notes that some cpps have this one) || $self->{lastline} =~ /^\#[ \t]* (?: - (?:if|ifn?def|elif|else|endif| + (?:if|ifn?def|elif|else|endif|elifn?def| define|undef|pragma|error| warning|line\s+\d+|ident) \b @@ -1804,6 +1923,31 @@ sub fetch_para { ) { last if $self->{lastline} =~ /^\S/ && @{ $self->{line} } && $self->{line}->[-1] eq ""; + if ($self->{lastline}=~/^#[ \t]*(if|ifn?def|elif|else|endif|elifn?def)\b/) { + my $type = $1; # highest defined capture buffer, "if" for any if like condition + if ($type =~ /^if/) { + if (@{$self->{line}}) { + # increment level + $if_level++; + } else { + $final = 1; + } + } elsif ($type eq "endif") { + if ($if_level) { # are we in an if that was started in this paragraph? + $if_level--; # yep- so decrement to end this if block + } else { + $final = 1; + } + } elsif (!$if_level) { + # not in an #ifdef from this paragraph, thus + # this directive should not be part of this paragraph. + $final = 1; + } + } + if ($final and @{$self->{line}}) { + return 1; + } + push(@{ $self->{line} }, $self->{lastline}); push(@{ $self->{line_no} }, $self->{lastline_no}); } @@ -1817,6 +1961,9 @@ sub fetch_para { chomp $self->{lastline}; $self->{lastline} =~ s/^\s+$//; + if ($final) { + last; + } } # Nuke trailing "line" entries until there's one that's not empty @@ -2022,8 +2169,9 @@ sub generate_output { (my $ntype = $type) =~ s/\s*\*/Ptr/g; $ntype =~ s/\(\)//g; (my $subtype = $ntype) =~ s/(?:Array)?(?:Ptr)?$//; + $type =~ tr/:/_/ unless $self->{RetainCplusplusHierarchicalTypes}; - my $eval_vars = {%$argsref, subtype => $subtype, ntype => $ntype, arg => $arg}; + my $eval_vars = {%$argsref, subtype => $subtype, ntype => $ntype, arg => $arg, type => $type }; my $expr = $outputmap->cleaned_code; if ($expr =~ /DO_ARRAY_ELEM/) { my $subtypemap = $typemaps->get_typemap(ctype => $subtype); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS.pod b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS.pod index 80bf13fd07..093a3175fc 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS.pod +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS.pod @@ -19,6 +19,7 @@ ExtUtils::ParseXS - converts Perl XS code into C code linenumbers => 1, optimize => 1, prototypes => 1, + die_on_error => 0, ); # Legacy non-OO interface using a singleton: @@ -119,6 +120,15 @@ Default is true. I<Maintainer note:> I have no clue what this does. Strips function prefixes? +=item B<die_on_error> + +Normally ExtUtils::ParseXS will terminate the program with an C<exit(1)> after +printing the details of the exception to STDERR via (warn). This can be awkward +when it is used programmatically and not via xsubpp, so this option can be used +to cause it to die instead by providing a true value. When not provided this +defaults to the value of C<$ExtUtils::ParseXS::DIE_ON_ERROR> which in turn +defaults to false. + =back =item $pxs->report_error_count() diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Constants.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Constants.pm index d7668c4733..012ba557cb 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Constants.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Constants.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Symbol; -our $VERSION = '3.43'; +our $VERSION = '3.51'; =head1 NAME diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/CountLines.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/CountLines.pm index c592621e03..cca6e74c4a 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/CountLines.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/CountLines.pm @@ -1,7 +1,7 @@ package ExtUtils::ParseXS::CountLines; use strict; -our $VERSION = '3.43'; +our $VERSION = '3.51'; our $SECTION_END_MARKER; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Eval.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Eval.pm index c509531d2f..a7c3920e82 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Eval.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Eval.pm @@ -2,7 +2,7 @@ package ExtUtils::ParseXS::Eval; use strict; use warnings; -our $VERSION = '3.43'; +our $VERSION = '3.51'; =head1 NAME diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Utilities.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Utilities.pm index 6cc8a0e408..b2674b3605 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Utilities.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/ParseXS/Utilities.pm @@ -5,7 +5,7 @@ use Exporter; use File::Spec; use ExtUtils::ParseXS::Constants (); -our $VERSION = '3.43'; +our $VERSION = '3.51'; our (@ISA, @EXPORT_OK); @ISA = qw(Exporter); @@ -21,6 +21,7 @@ our (@ISA, @EXPORT_OK); analyze_preprocessor_statements set_cond Warn + WarnHint current_line_number blurt death @@ -654,18 +655,85 @@ sub current_line_number { =item * Purpose +Print warnings with line number details at the end. + =item * Arguments +List of text to output. + =item * Return Value +None. + =back =cut sub Warn { + my ($self)=shift; + $self->WarnHint(@_,undef); +} + +=head2 C<WarnHint()> + +=over 4 + +=item * Purpose + +Prints warning with line number details. The last argument is assumed +to be a hint string. + +=item * Arguments + +List of strings to warn, followed by one argument representing a hint. +If that argument is defined then it will be split on newlines and output +line by line after the main warning. + +=item * Return Value + +None. + +=back + +=cut + +sub WarnHint { + warn _MsgHint(@_); +} + +=head2 C<_MsgHint()> + +=over 4 + +=item * Purpose + +Constructs an exception message with line number details. The last argument is +assumed to be a hint string. + +=item * Arguments + +List of strings to warn, followed by one argument representing a hint. +If that argument is defined then it will be split on newlines and concatenated +line by line (parenthesized) after the main message. + +=item * Return Value + +The constructed string. + +=back + +=cut + + +sub _MsgHint { my $self = shift; + my $hint = pop; my $warn_line_number = $self->current_line_number(); - print STDERR "@_ in $self->{filename}, line $warn_line_number\n"; + my $ret = join("",@_) . " in $self->{filename}, line $warn_line_number\n"; + if ($hint) { + $ret .= " ($_)\n" for split /\n/, $hint; + } + return $ret; } =head2 C<blurt()> @@ -703,8 +771,13 @@ sub blurt { =cut sub death { - my $self = shift; - $self->Warn(@_); + my ($self) = (@_); + my $message = _MsgHint(@_,""); + if ($self->{die_on_error}) { + die $message; + } else { + warn $message; + } exit 1; } diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps.pm index 62a2b1b606..2a324a6459 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps.pm @@ -2,7 +2,7 @@ package ExtUtils::Typemaps; use 5.006001; use strict; use warnings; -our $VERSION = '3.43'; +our $VERSION = '3.51'; require ExtUtils::ParseXS; require ExtUtils::ParseXS::Constants; @@ -378,7 +378,7 @@ sub remove_inputmap { return $self->_remove($xstype, $self->{input_section}, $self->{input_lookup}); } -=head2 remove_inputmap +=head2 remove_outputmap Removes an C<OUTPUT> entry from the typemap. diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/Cmd.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/Cmd.pm index 5bddcc0569..73f8b710ca 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/Cmd.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/Cmd.pm @@ -2,7 +2,7 @@ package ExtUtils::Typemaps::Cmd; use 5.006001; use strict; use warnings; -our $VERSION = '3.43'; +our $VERSION = '3.51'; use ExtUtils::Typemaps; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/InputMap.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/InputMap.pm index fd2efc878d..5b18021377 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/InputMap.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/InputMap.pm @@ -2,7 +2,7 @@ package ExtUtils::Typemaps::InputMap; use 5.006001; use strict; use warnings; -our $VERSION = '3.43'; +our $VERSION = '3.51'; =head1 NAME diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/OutputMap.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/OutputMap.pm index d4210c5576..d5aacdb786 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/OutputMap.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/OutputMap.pm @@ -2,7 +2,7 @@ package ExtUtils::Typemaps::OutputMap; use 5.006001; use strict; use warnings; -our $VERSION = '3.43'; +our $VERSION = '3.51'; =head1 NAME diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/Type.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/Type.pm index 36d575339c..9970281bfc 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/Type.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/Typemaps/Type.pm @@ -4,7 +4,7 @@ use strict; use warnings; require ExtUtils::Typemaps; -our $VERSION = '3.43'; +our $VERSION = '3.51'; =head1 NAME diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/testlib.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/testlib.pm index 5826a12736..2de002827f 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/testlib.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/testlib.pm @@ -3,7 +3,7 @@ package ExtUtils::testlib; use strict; use warnings; -our $VERSION = '7.62'; +our $VERSION = '7.70'; $VERSION =~ tr/_//d; use Cwd; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/typemap b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/typemap index db700b75bf..a07e83f901 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/typemap +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/typemap @@ -217,38 +217,54 @@ T_REF_IV_REF IV tmp = SvIV((SV*)SvRV($arg)); $var = *INT2PTR($type *, tmp); } - else - Perl_croak_nocontext(\"%s: %s is not of type %s\", + else { + const char* refstr = SvROK($arg) ? \"\" : SvOK($arg) ? \"scalar \" : \"undef\"; + Perl_croak_nocontext(\"%s: Expected %s to be of type %s; got %s%\" SVf \" instead\", ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, - \"$var\", \"$ntype\") + \"$var\", \"$ntype\", + refstr, $arg + ); + } T_REF_IV_PTR if (sv_isa($arg, \"${ntype}\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = INT2PTR($type, tmp); } - else - Perl_croak_nocontext(\"%s: %s is not of type %s\", + else { + const char* refstr = SvROK($arg) ? \"\" : SvOK($arg) ? \"scalar \" : \"undef\"; + Perl_croak_nocontext(\"%s: Expected %s to be of type %s; got %s%\" SVf \" instead\", ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, - \"$var\", \"$ntype\") + \"$var\", \"$ntype\", + refstr, $arg + ); + } T_PTROBJ if (SvROK($arg) && sv_derived_from($arg, \"${ntype}\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = INT2PTR($type,tmp); } - else - Perl_croak_nocontext(\"%s: %s is not of type %s\", + else { + const char* refstr = SvROK($arg) ? \"\" : SvOK($arg) ? \"scalar \" : \"undef\"; + Perl_croak_nocontext(\"%s: Expected %s to be of type %s; got %s%\" SVf \" instead\", ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, - \"$var\", \"$ntype\") + \"$var\", \"$ntype\", + refstr, $arg + ); + } T_PTRDESC if (sv_isa($arg, \"${ntype}\")) { IV tmp = SvIV((SV*)SvRV($arg)); ${type}_desc = (\U${type}_DESC\E*) tmp; $var = ${type}_desc->ptr; } - else - Perl_croak_nocontext(\"%s: %s is not of type %s\", + else { + const char* refstr = SvROK($arg) ? \"\" : SvOK($arg) ? \"scalar \" : \"undef\"; + Perl_croak_nocontext(\"%s: Expected %s to be of type %s; got %s%\" SVf \" instead\", ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, - \"$var\", \"$ntype\") + \"$var\", \"$ntype\", + refstr, $arg + ); + } T_REFREF if (SvROK($arg)) { IV tmp = SvIV((SV*)SvRV($arg)); @@ -263,10 +279,14 @@ T_REFOBJ IV tmp = SvIV((SV*)SvRV($arg)); $var = *INT2PTR($type,tmp); } - else - Perl_croak_nocontext(\"%s: %s is not of type %s\", + else { + const char* refstr = SvROK($arg) ? \"\" : SvOK($arg) ? \"scalar \" : \"undef\"; + Perl_croak_nocontext(\"%s: Expected %s to be of type %s; got %s%\" SVf \" instead\", ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]}, - \"$var\", \"$ntype\") + \"$var\", \"$ntype\", + refstr, $arg + ); + } T_OPAQUE $var = *($type *)SvPV_nolen($arg) T_OPAQUEPTR @@ -295,23 +315,23 @@ T_OUT ############################################################################# OUTPUT T_SV - $arg = $var; + ${ "$var" eq "RETVAL" ? \"$arg = $var;" : \"sv_setsv_mg($arg, $var);" } T_SVREF $arg = newRV((SV*)$var); T_SVREF_REFCOUNT_FIXED - $arg = newRV_noinc((SV*)$var); + ${ "$var" eq "RETVAL" ? \"$arg = newRV_noinc((SV*)$var);" : \"sv_setrv_noinc($arg, (SV*)$var);" } T_AVREF $arg = newRV((SV*)$var); T_AVREF_REFCOUNT_FIXED - $arg = newRV_noinc((SV*)$var); + ${ "$var" eq "RETVAL" ? \"$arg = newRV_noinc((SV*)$var);" : \"sv_setrv_noinc($arg, (SV*)$var);" } T_HVREF $arg = newRV((SV*)$var); T_HVREF_REFCOUNT_FIXED - $arg = newRV_noinc((SV*)$var); + ${ "$var" eq "RETVAL" ? \"$arg = newRV_noinc((SV*)$var);" : \"sv_setrv_noinc($arg, (SV*)$var);" } T_CVREF $arg = newRV((SV*)$var); T_CVREF_REFCOUNT_FIXED - $arg = newRV_noinc((SV*)$var); + ${ "$var" eq "RETVAL" ? \"$arg = newRV_noinc((SV*)$var);" : \"sv_setrv_noinc($arg, (SV*)$var);" } T_IV sv_setiv($arg, (IV)$var); T_UV |