diff options
author | Norbert Preining <norbert@preining.info> | 2024-03-15 03:06:35 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-03-15 03:06:35 +0000 |
commit | 12679ab7d3c2a210f4123163671b532b8b55d5f9 (patch) | |
tree | 0060d13467186ad977f4e73488ee20dd6c0017ab /systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Unix.pm | |
parent | 62170822e034fdd3f81de7274835d0d3b0467100 (diff) |
CTAN sync 202403150306
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Unix.pm')
-rw-r--r-- | systems/texlive/tlnet/tlpkg/tlperl/lib/ExtUtils/MM_Unix.pm | 38 |
1 files changed, 26 insertions, 12 deletions
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'; |