summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/lib')
-rw-r--r--contrib/perl5/lib/Cwd.pm123
-rw-r--r--contrib/perl5/lib/ExtUtils/Install.pm139
-rw-r--r--contrib/perl5/lib/ExtUtils/Liblist.pm87
-rw-r--r--contrib/perl5/lib/ExtUtils/MM_Unix.pm144
-rw-r--r--contrib/perl5/lib/ExtUtils/MakeMaker.pm165
-rw-r--r--contrib/perl5/lib/Sys/Hostname.pm6
6 files changed, 219 insertions, 445 deletions
diff --git a/contrib/perl5/lib/Cwd.pm b/contrib/perl5/lib/Cwd.pm
index 9c7b33d..9c078c6 100644
--- a/contrib/perl5/lib/Cwd.pm
+++ b/contrib/perl5/lib/Cwd.pm
@@ -1,9 +1,10 @@
+# $FreeBSD$
package Cwd;
require 5.000;
=head1 NAME
-Cwd - get pathname of current working directory
+getcwd - get pathname of current working directory
=head1 SYNOPSIS
@@ -14,9 +15,6 @@ Cwd - get pathname of current working directory
$dir = getcwd;
use Cwd;
- $dir = fastcwd;
-
- use Cwd;
$dir = fastgetcwd;
use Cwd 'chdir';
@@ -31,21 +29,16 @@ Cwd - get pathname of current working directory
=head1 DESCRIPTION
-This module provides functions for determining the pathname of the
-current working directory. By default, it exports the functions
-cwd(), getcwd(), fastcwd(), and fastgetcwd() into the caller's
-namespace. Each of these functions are called without arguments and
-return the absolute path of the current working directory. It is
-recommended that cwd (or another *cwd() function) be used in I<all>
-code to ensure portability.
-
-The cwd() is the most natural and safe form for the current
-architecture. For most systems it is identical to `pwd` (but without
-the trailing line terminator).
-
The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions
in Perl.
+The abs_path() function takes a single argument and returns the
+absolute pathname for that argument. It uses the same algorithm
+as getcwd(). (Actually, getcwd() is abs_path(".")) Symbolic links
+and relative-path components ("." and "..") are resolved to return
+the canonical pathname, just like realpath(3). Also callable as
+realpath().
+
The fastcwd() function looks the same as getcwd(), but runs faster.
It's also more dangerous because it might conceivably chdir() you out
of a directory that it can't chdir() you back into. If fastcwd
@@ -56,17 +49,16 @@ that it leaves you in the same directory that it started in. If it has
changed it will C<die> with the message "Unstable directory path,
current directory changed unexpectedly". That should never happen.
-The fastgetcwd() function is provided as a synonym for cwd().
+The fast_abs_path() function looks the same as abs_path(), but runs faster.
+And like fastcwd() is more dangerous.
-The abs_path() function takes a single argument and returns the
-absolute pathname for that argument. It uses the same algorithm as
-getcwd(). (Actually, getcwd() is abs_path(".")) Symbolic links and
-relative-path components ("." and "..") are resolved to return the
-canonical pathname, just like realpath(3). This function is also
-callable as realpath().
+The cwd() function looks the same as getcwd and fastgetcwd but is
+implemented using the most natural and safe form for the current
+architecture. For most systems it is identical to `pwd` (but without
+the trailing line terminator).
-The fast_abs_path() function looks the same as abs_path() but runs
-faster and, like fastcwd(), is more dangerous.
+It is recommended that cwd (or another *cwd() function) is used in
+I<all> code to ensure portability.
If you ask to override your chdir() built-in function, then your PWD
environment variable will be kept up to date. (See
@@ -75,42 +67,31 @@ kept up to date if all packages which use chdir import it from Cwd.
=cut
-use strict;
+## use strict;
use Carp;
-our $VERSION = '2.04';
+$VERSION = '2.02';
-use base qw/ Exporter /;
-our @EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
-our @EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
+require Exporter;
+@ISA = qw(Exporter);
+@EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
+@EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
# The 'natural and safe form' for UNIX (pwd may be setuid root)
sub _backtick_pwd {
- my $cwd = `pwd`;
- # `pwd` may fail e.g. if the disk is full
- chomp($cwd) if defined $cwd;
+ my $cwd;
+ chop($cwd = `/bin/pwd`);
$cwd;
}
# Since some ports may predefine cwd internally (e.g., NT)
# we take care not to override an existing definition for cwd().
-unless(defined &cwd) {
- # The pwd command is not available in some chroot(2)'ed environments
- if($^O eq 'MacOS' || grep { -x "$_/pwd" } split(':', $ENV{PATH})) {
- *cwd = \&_backtick_pwd;
- }
- else {
- *cwd = \&getcwd;
- }
-}
+*cwd = \&_backtick_pwd unless defined &cwd;
-# set a reasonable (and very safe) default for fastgetcwd, in case it
-# isn't redefined later (20001212 rspier)
-*fastgetcwd = \&cwd;
# By Brandon S. Allbery
#
@@ -176,7 +157,7 @@ sub fastcwd {
my $chdir_init = 0;
sub chdir_init {
- if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'dos' and $^O ne 'MSWin32') {
+ if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'dos') {
my($dd,$di) = stat('.');
my($pd,$pi) = stat($ENV{'PWD'});
if (!defined $dd or !defined $pd or $di != $pi or $dd != $pd) {
@@ -184,12 +165,10 @@ sub chdir_init {
}
}
else {
- my $wd = cwd();
- $wd = Win32::GetFullPathName($wd) if $^O eq 'MSWin32';
- $ENV{'PWD'} = $wd;
+ $ENV{'PWD'} = cwd();
}
# Strip an automounter prefix (where /tmp_mnt/foo/bar == /foo/bar)
- if ($^O ne 'MSWin32' and $ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|s) {
+ if ($ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|s) {
my($pd,$pi) = stat($2);
my($dd,$di) = stat($1);
if (defined $pd and defined $dd and $di == $pi and $dd == $pd) {
@@ -200,27 +179,11 @@ sub chdir_init {
}
sub chdir {
- my $newdir = @_ ? shift : ''; # allow for no arg (chdir to HOME dir)
- $newdir =~ s|///*|/|g unless $^O eq 'MSWin32';
+ my $newdir = shift || ''; # allow for no arg (chdir to HOME dir)
+ $newdir =~ s|///*|/|g;
chdir_init() unless $chdir_init;
- my $newpwd;
- if ($^O eq 'MSWin32') {
- # get the full path name *before* the chdir()
- $newpwd = Win32::GetFullPathName($newdir);
- }
-
return 0 unless CORE::chdir $newdir;
-
- if ($^O eq 'VMS') {
- return $ENV{'PWD'} = $ENV{'DEFAULT'}
- }
- elsif ($^O eq 'MacOS') {
- return $ENV{'PWD'} = cwd();
- }
- elsif ($^O eq 'MSWin32') {
- $ENV{'PWD'} = $newpwd;
- return 1;
- }
+ if ($^O eq 'VMS') { return $ENV{'PWD'} = $ENV{'DEFAULT'} }
if ($newdir =~ m#^/#s) {
$ENV{'PWD'} = $newdir;
@@ -301,7 +264,7 @@ sub abs_path
sub fast_abs_path {
my $cwd = getcwd();
- my $path = @_ ? shift : '.';
+ my $path = shift || '.';
CORE::chdir($path) || croak "Cannot chdir to $path:$!";
my $realpath = getcwd();
CORE::chdir($cwd) || croak "Cannot chdir back to $cwd:$!";
@@ -370,17 +333,12 @@ sub _qnx_cwd {
}
sub _qnx_abs_path {
- my $path = @_ ? shift : '.';
+ my $path = shift || '.';
my $realpath=`/usr/bin/fullpath -t $path`;
chop $realpath;
return $realpath;
}
-sub _epoc_cwd {
- $ENV{'PWD'} = EPOC::getcwd();
- return $ENV{'PWD'};
-}
-
{
no warnings; # assignments trigger 'subroutine redefined' warning
@@ -429,19 +387,6 @@ sub _epoc_cwd {
*fastcwd = \&cwd;
*abs_path = \&fast_abs_path;
}
- elsif ($^O eq 'epoc') {
- *cwd = \&_epoc_cwd;
- *getcwd = \&_epoc_cwd;
- *fastgetcwd = \&_epoc_cwd;
- *fastcwd = \&_epoc_cwd;
- *abs_path = \&fast_abs_path;
- }
- elsif ($^O eq 'MacOS') {
- *getcwd = \&cwd;
- *fastgetcwd = \&cwd;
- *fastcwd = \&cwd;
- *abs_path = \&fast_abs_path;
- }
}
# package main; eval join('',<DATA>) || die $@; # quick test
diff --git a/contrib/perl5/lib/ExtUtils/Install.pm b/contrib/perl5/lib/ExtUtils/Install.pm
index c496aa0..aa6c764 100644
--- a/contrib/perl5/lib/ExtUtils/Install.pm
+++ b/contrib/perl5/lib/ExtUtils/Install.pm
@@ -1,9 +1,11 @@
+# $FreeBSD$
package ExtUtils::Install;
use 5.005_64;
our(@ISA, @EXPORT, $VERSION);
$VERSION = substr q$Revision: 1.28 $, 10;
# $Date: 1998/01/25 07:08:24 $
+# $FreeBSD$
use Exporter;
use Carp ();
@@ -16,28 +18,6 @@ my $splitchar = $^O eq 'VMS' ? '|' : ($^O eq 'os2' || $^O eq 'dos') ? ';' : ':';
my @PERL_ENV_LIB = split $splitchar, defined $ENV{'PERL5LIB'} ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || '';
my $Inc_uninstall_warn_handler;
-# install relative to here
-
-my $INSTALL_ROOT = $ENV{PERL_INSTALL_ROOT};
-
-use File::Spec;
-
-sub install_rooted_file {
- if (defined $INSTALL_ROOT) {
- MY->catfile($INSTALL_ROOT, $_[0]);
- } else {
- $_[0];
- }
-}
-
-sub install_rooted_dir {
- if (defined $INSTALL_ROOT) {
- MY->catdir($INSTALL_ROOT, $_[0]);
- } else {
- $_[0];
- }
-}
-
#our(@EXPORT, @ISA, $Is_VMS);
#use strict;
@@ -77,9 +57,8 @@ sub install {
opendir DIR, $source_dir_or_file or next;
for (readdir DIR) {
next if $_ eq "." || $_ eq ".." || $_ eq ".exists";
- my $targetdir = install_rooted_dir($hash{$source_dir_or_file});
- if (-w $targetdir ||
- mkpath($targetdir)) {
+ if (-w $hash{$source_dir_or_file} ||
+ mkpath($hash{$source_dir_or_file})) {
last;
} else {
warn "Warning: You do not have permissions to " .
@@ -89,8 +68,7 @@ sub install {
}
closedir DIR;
}
- my $tmpfile = install_rooted_file($pack{"read"});
- $packlist->read($tmpfile) if (-f $tmpfile);
+ $packlist->read($pack{"read"}) if (-f $pack{"read"});
my $cwd = cwd();
my($source);
@@ -101,16 +79,17 @@ sub install {
#install locations. AFS users may call this a bug. We'll have
#to reconsider how to add the means to satisfy AFS users also.
+ # FreeBSD also doesn't like this (much). At install time, the
+ # ctime should change, even if the file does not.
+
#October 1997: we want to install .pm files into archlib if
#there are any files in arch. So we depend on having ./blib/arch
#hardcoded here.
-
- my $targetroot = install_rooted_dir($hash{$source});
-
+ my $targetroot = $hash{$source};
if ($source eq "blib/lib" and
exists $hash{"blib/arch"} and
directory_not_empty("blib/arch")) {
- $targetroot = install_rooted_dir($hash{"blib/arch"});
+ $targetroot = $hash{"blib/arch"};
print "Files found in blib/arch: installing files in blib/lib into architecture dependent library tree\n";
}
chdir($source) or next;
@@ -119,9 +98,8 @@ sub install {
$atime,$mtime,$ctime,$blksize,$blocks) = stat;
return unless -f _;
return if $_ eq ".exists";
- my $targetdir = MY->catdir($targetroot, $File::Find::dir);
- my $origfile = $_;
- my $targetfile = MY->catfile($targetdir, $_);
+ my $targetdir = MY->catdir($targetroot,$File::Find::dir);
+ my $targetfile = MY->catfile($targetdir,$_);
my $diff = 0;
if ( -f $targetfile && -s _ == $size) {
@@ -131,6 +109,8 @@ sub install {
print "$_ differs\n" if $verbose>1;
$diff++;
}
+ my $diff = 1; # Nasty, lowdown, rotten, scumsucking
+ # hack to make FreeBSD _really_ install.
if ($diff){
if (-f $targetfile){
@@ -156,16 +136,16 @@ sub install {
} else {
inc_uninstall($_,$File::Find::dir,$verbose,0); # nonono set to 0
}
- $packlist->{$origfile}++;
+ $packlist->{$targetfile}++;
}, ".");
chdir($cwd) or Carp::croak("Couldn't chdir to $cwd: $!");
}
if ($pack{'write'}) {
- $dir = install_rooted_dir(dirname($pack{'write'}));
+ $dir = dirname($pack{'write'});
mkpath($dir,0,0755);
print "Writing $pack{'write'}\n";
- $packlist->write(install_rooted_file($pack{'write'}));
+ $packlist->write($pack{'write'});
}
}
@@ -262,22 +242,8 @@ sub inc_uninstall {
}
}
-sub run_filter {
- my ($cmd, $src, $dest) = @_;
- local *SRC, *CMD;
- open(CMD, "|$cmd >$dest") || die "Cannot fork: $!";
- open(SRC, $src) || die "Cannot open $src: $!";
- my $buf;
- my $sz = 1024;
- while (my $len = sysread(SRC, $buf, $sz)) {
- syswrite(CMD, $buf, $len);
- }
- close SRC;
- close CMD or die "Filter command '$cmd' failed for $src";
-}
-
sub pm_to_blib {
- my($fromto,$autodir,$pm_filter) = @_;
+ my($fromto,$autodir) = @_;
use File::Basename qw(dirname);
use File::Copy qw(copy);
@@ -300,37 +266,23 @@ sub pm_to_blib {
mkpath($autodir,0,0755);
foreach (keys %$fromto) {
- my $dest = $fromto->{$_};
- next if -f $dest && -M $dest < -M $_;
-
- # When a pm_filter is defined, we need to pre-process the source first
- # to determine whether it has changed or not. Therefore, only perform
- # the comparison check when there's no filter to be ran.
- # -- RAM, 03/01/2001
-
- my $need_filtering = defined $pm_filter && length $pm_filter && /\.pm$/;
-
- if (!$need_filtering && 0 == compare($_,$dest)) {
- print "Skip $dest (unchanged)\n";
+ next if -f $fromto->{$_} && -M $fromto->{$_} < -M $_;
+ unless (compare($_,$fromto->{$_})){
+ print "Skip $fromto->{$_} (unchanged)\n";
next;
}
- if (-f $dest){
- forceunlink($dest);
+ if (-f $fromto->{$_}){
+ forceunlink($fromto->{$_});
} else {
- mkpath(dirname($dest),0,0755);
- }
- if ($need_filtering) {
- run_filter($pm_filter, $_, $dest);
- print "$pm_filter <$_ >$dest\n";
- } else {
- copy($_,$dest);
- print "cp $_ $dest\n";
+ mkpath(dirname($fromto->{$_}),0,0755);
}
+ copy($_,$fromto->{$_});
my($mode,$atime,$mtime) = (stat)[2,8,9];
- utime($atime,$mtime+$Is_VMS,$dest);
- chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$dest);
- next unless /\.pm$/;
- autosplit($dest,$autodir);
+ utime($atime,$mtime+$Is_VMS,$fromto->{$_});
+ chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$fromto->{$_});
+ print "cp $_ $fromto->{$_}\n";
+ next unless /\.pm\z/;
+ autosplit($fromto->{$_},$autodir);
}
}
@@ -344,20 +296,18 @@ sub add {
}
sub DESTROY {
- unless(defined $INSTALL_ROOT) {
- my $self = shift;
- my($file,$i,$plural);
- foreach $file (sort keys %$self) {
- $plural = @{$self->{$file}} > 1 ? "s" : "";
- print "## Differing version$plural of $file found. You might like to\n";
- for (0..$#{$self->{$file}}) {
- print "rm ", $self->{$file}[$_], "\n";
- $i++;
- }
- }
- $plural = $i>1 ? "all those files" : "this file";
- print "## Running 'make install UNINST=1' will unlink $plural for you.\n";
+ my $self = shift;
+ my($file,$i,$plural);
+ foreach $file (sort keys %$self) {
+ $plural = @{$self->{$file}} > 1 ? "s" : "";
+ print "## Differing version$plural of $file found. You might like to\n";
+ for (0..$#{$self->{$file}}) {
+ print "rm ", $self->{$file}[$_], "\n";
+ $i++;
}
+ }
+ $plural = $i>1 ? "all those files" : "this file";
+ print "## Running 'make install UNINST=1' will unlink $plural for you.\n";
}
1;
@@ -420,11 +370,6 @@ no-don't-really-do-it-now switch.
pm_to_blib() takes a hashref as the first argument and copies all keys
of the hash to the corresponding values efficiently. Filenames with
the extension pm are autosplit. Second argument is the autosplit
-directory. If third argument is not empty, it is taken as a filter command
-to be ran on each .pm file, the output of the command being what is finally
-copied, and the source for auto-splitting.
-
-You can have an environment variable PERL_INSTALL_ROOT set which will
-be prepended as a directory to each installed file (and directory).
+directory.
=cut
diff --git a/contrib/perl5/lib/ExtUtils/Liblist.pm b/contrib/perl5/lib/ExtUtils/Liblist.pm
index 5e2f91d..6da7395 100644
--- a/contrib/perl5/lib/ExtUtils/Liblist.pm
+++ b/contrib/perl5/lib/ExtUtils/Liblist.pm
@@ -1,30 +1,10 @@
+# $FreeBSD$
package ExtUtils::Liblist;
-@ISA = qw(ExtUtils::Liblist::Kid File::Spec);
-
-sub lsdir {
- shift;
- my $rex = qr/$_[1]/;
- opendir my $dir, $_[0];
- grep /$rex/, readdir $dir;
-}
-
-sub file_name_is_absolute {
- require File::Spec;
- shift;
- 'File::Spec'->file_name_is_absolute(@_);
-}
-
-
-package ExtUtils::Liblist::Kid;
-
-# This kid package is to be used by MakeMaker. It will not work if
-# $self is not a Makemaker.
-
use 5.005_64;
# Broken out of MakeMaker from version 4.11
-our $VERSION = substr q$Revision: 1.26 $, 10;
+our $VERSION = substr q$Revision: 1.25 $, 10;
use Config;
use Cwd 'cwd';
@@ -37,19 +17,19 @@ sub ext {
}
sub _unix_os2_ext {
- my($self,$potential_libs, $verbose, $give_libs) = @_;
- if ($^O =~ 'os2' and $Config{perllibs}) {
+ my($self,$potential_libs, $verbose) = @_;
+ if ($^O =~ 'os2' and $Config{libs}) {
# Dynamic libraries are not transitive, so we may need including
# the libraries linked against perl.dll again.
$potential_libs .= " " if $potential_libs;
- $potential_libs .= $Config{perllibs};
+ $potential_libs .= $Config{libs};
}
- return ("", "", "", "", ($give_libs ? [] : ())) unless $potential_libs;
+ return ("", "", "", "") unless $potential_libs;
warn "Potential libraries are '$potential_libs':\n" if $verbose;
my($so) = $Config{'so'};
- my($libs) = $Config{'perllibs'};
+ my($libs) = $Config{'libs'};
my $Config_libext = $Config{lib_ext} || ".a";
@@ -60,7 +40,6 @@ sub _unix_os2_ext {
my(@searchpath); # from "-L/path" entries in $potential_libs
my(@libpath) = split " ", $Config{'libpth'};
my(@ldloadlibs, @bsloadlibs, @extralibs, @ld_run_path, %ld_run_path_seen);
- my(@libs, %libs_seen);
my($fullname, $thislib, $thispth, @fullname);
my($pwd) = cwd(); # from Cwd.pm
my($found) = 0;
@@ -154,7 +133,6 @@ sub _unix_os2_ext {
warn "'-l$thislib' found at $fullname\n" if $verbose;
my($fullnamedir) = dirname($fullname);
push @ld_run_path, $fullnamedir unless $ld_run_path_seen{$fullnamedir}++;
- push @libs, $fullname unless $libs_seen{$fullname}++;
$found++;
$found_lib++;
@@ -202,29 +180,28 @@ sub _unix_os2_ext {
."No library found for -l$thislib\n"
unless $found_lib>0;
}
- return ('','','','', ($give_libs ? \@libs : ())) unless $found;
- ("@extralibs", "@bsloadlibs", "@ldloadlibs",join(":",@ld_run_path), ($give_libs ? \@libs : ()));
+ return ('','','','') unless $found;
+ ("@extralibs", "@bsloadlibs", "@ldloadlibs",join(":",@ld_run_path));
}
sub _win32_ext {
require Text::ParseWords;
- my($self, $potential_libs, $verbose, $give_libs) = @_;
+ my($self, $potential_libs, $verbose) = @_;
# If user did not supply a list, we punt.
# (caller should probably use the list in $Config{libs})
- return ("", "", "", "", ($give_libs ? [] : ())) unless $potential_libs;
+ return ("", "", "", "") unless $potential_libs;
my $cc = $Config{cc};
my $VC = 1 if $cc =~ /^cl/i;
my $BC = 1 if $cc =~ /^bcc/i;
my $GC = 1 if $cc =~ /^gcc/i;
my $so = $Config{'so'};
- my $libs = $Config{'perllibs'};
+ my $libs = $Config{'libs'};
my $libpth = $Config{'libpth'};
my $libext = $Config{'lib_ext'} || ".lib";
- my(@libs, %libs_seen);
if ($libs and $potential_libs !~ /:nodefault/i) {
# If Config.pm defines a set of default libs, we always
@@ -254,10 +231,6 @@ sub _win32_ext {
# add "$Config{installarchlib}/CORE" to default search path
push @libpath, "$Config{installarchlib}/CORE";
- if ($VC and exists $ENV{LIB} and $ENV{LIB}) {
- push @libpath, split /;/, $ENV{LIB};
- }
-
foreach (Text::ParseWords::quotewords('\s+', 0, $potential_libs)){
$thislib = $_;
@@ -322,7 +295,6 @@ sub _win32_ext {
$found++;
$found_lib++;
push(@extralibs, $fullname);
- push @libs, $fullname unless $libs_seen{$fullname}++;
last;
}
@@ -344,11 +316,10 @@ sub _win32_ext {
}
- return ('','','','', ($give_libs ? \@libs : ())) unless $found;
+ return ('','','','') unless $found;
# make sure paths with spaces are properly quoted
@extralibs = map { (/\s/ && !/^".*"$/) ? qq["$_"] : $_ } @extralibs;
- @libs = map { (/\s/ && !/^".*"$/) ? qq["$_"] : $_ } @libs;
$lib = join(' ',@extralibs);
# normalize back to backward slashes (to help braindead tools)
@@ -357,18 +328,18 @@ sub _win32_ext {
$lib =~ s,/,\\,g;
warn "Result: $lib\n" if $verbose;
- wantarray ? ($lib, '', $lib, '', ($give_libs ? \@libs : ())) : $lib;
+ wantarray ? ($lib, '', $lib, '') : $lib;
}
sub _vms_ext {
- my($self, $potential_libs,$verbose,$give_libs) = @_;
+ my($self, $potential_libs,$verbose) = @_;
my(@crtls,$crtlstr);
my($dbgqual) = $self->{OPTIMIZE} || $Config{'optimize'} ||
$self->{CCFLAS} || $Config{'ccflags'};
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
. 'PerlShr/Share' );
- push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
+ push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libs'});
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
# In general, we pass through the basic libraries from %Config unchanged.
# The one exception is that if we're building in the Perl source tree, and
@@ -391,7 +362,7 @@ sub _vms_ext {
unless ($potential_libs) {
warn "Result:\n\tEXTRALIBS: \n\tLDLOADLIBS: $crtlstr\n" if $verbose;
- return ('', '', $crtlstr, '', ($give_libs ? [] : ()));
+ return ('', '', $crtlstr, '');
}
my(@dirs,@libs,$dir,$lib,%found,@fndlibs,$ldlib);
@@ -400,7 +371,6 @@ sub _vms_ext {
# List of common Unix library names and there VMS equivalents
# (VMS equivalent of '' indicates that the library is automatially
# searched by the linker, and should be skipped here.)
- my(@flibs, %libs_seen);
my %libmap = ( 'm' => '', 'f77' => '', 'F77' => '', 'V77' => '', 'c' => '',
'malloc' => '', 'crypt' => '', 'resolv' => '', 'c_s' => '',
'socket' => '', 'X11' => 'DECW$XLIBSHR',
@@ -505,7 +475,6 @@ sub _vms_ext {
if ($cand eq 'VAXCCURSE') { unshift @{$found{$ctype}}, $cand; }
else { push @{$found{$ctype}}, $cand; }
warn "\tFound as $cand (really $test), type $ctype\n" if $verbose > 1;
- push @flibs, $name unless $libs_seen{$fullname}++;
next LIB;
}
}
@@ -520,7 +489,7 @@ sub _vms_ext {
$ldlib = $crtlstr ? "$lib $crtlstr" : $lib;
warn "Result:\n\tEXTRALIBS: $lib\n\tLDLOADLIBS: $ldlib\n" if $verbose;
- wantarray ? ($lib, '', $ldlib, '', ($give_libs ? \@flibs : ())) : $lib;
+ wantarray ? ($lib, '', $ldlib, '') : $lib;
}
1;
@@ -535,22 +504,20 @@ ExtUtils::Liblist - determine libraries to use and how to use them
C<require ExtUtils::Liblist;>
-C<ExtUtils::Liblist::ext($self, $potential_libs, $verbose, $need_names);>
+C<ExtUtils::Liblist::ext($self, $potential_libs, $verbose);>
=head1 DESCRIPTION
This utility takes a list of libraries in the form C<-llib1 -llib2
--llib3> and returns lines suitable for inclusion in an extension
+-llib3> and prints out lines suitable for inclusion in an extension
Makefile. Extra library paths may be included with the form
C<-L/another/path> this will affect the searches for all subsequent
libraries.
-It returns an array of four or five scalar values: EXTRALIBS,
-BSLOADLIBS, LDLOADLIBS, LD_RUN_PATH, and, optionally, a reference to
-the array of the filenames of actual libraries. Some of these don't
-mean anything unless on Unix. See the details about those platform
-specifics below. The list of the filenames is returned only if
-$need_names argument is true.
+It returns an array of four scalar values: EXTRALIBS, BSLOADLIBS,
+LDLOADLIBS, and LD_RUN_PATH. Some of these don't mean anything
+on VMS and Win32. See the details about those platform specifics
+below.
Dependent libraries can be linked in one of three ways:
@@ -658,7 +625,7 @@ Unix-OS/2 version in several respects:
=item *
If C<$potential_libs> is empty, the return value will be empty.
-Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
+Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
will be searched for in the directories specified in C<$potential_libs>,
C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
@@ -702,7 +669,7 @@ Entries in C<$potential_libs> beginning with a colon and followed by
alphanumeric characters are treated as flags. Unknown flags will be ignored.
An entry that matches C</:nodefault/i> disables the appending of default
-libraries found in C<$Config{perllibs}> (this should be only needed very rarely).
+libraries found in C<$Config{libs}> (this should be only needed very rarely).
An entry that matches C</:nosearch/i> disables all searching for
the libraries specified after it. Translation of C<-Lfoo> and
@@ -712,7 +679,7 @@ valid files or directories.
An entry that matches C</:search/i> reenables searching for
the libraries specified after it. You can put it at the end to
-enable searching for default libraries specified by C<$Config{perllibs}>.
+enable searching for default libraries specified by C<$Config{libs}>.
=item *
diff --git a/contrib/perl5/lib/ExtUtils/MM_Unix.pm b/contrib/perl5/lib/ExtUtils/MM_Unix.pm
index c11333d..891c533 100644
--- a/contrib/perl5/lib/ExtUtils/MM_Unix.pm
+++ b/contrib/perl5/lib/ExtUtils/MM_Unix.pm
@@ -1,3 +1,4 @@
+# $FreeBSD$
package ExtUtils::MM_Unix;
use Exporter ();
@@ -208,7 +209,6 @@ sub ExtUtils::MM_Unix::parse_version ;
sub ExtUtils::MM_Unix::pasthru ;
sub ExtUtils::MM_Unix::path ;
sub ExtUtils::MM_Unix::perl_archive;
-sub ExtUtils::MM_Unix::perl_archive_after;
sub ExtUtils::MM_Unix::perl_script ;
sub ExtUtils::MM_Unix::perldepend ;
sub ExtUtils::MM_Unix::pm_to_blib ;
@@ -306,8 +306,8 @@ sub cflags {
$libperl ||= $self->{LIBPERL_A} || "libperl$self->{LIB_EXT}" ;
$libperl =~ s/\.\$\(A\)$/$self->{LIB_EXT}/;
- @cflags{qw(cc ccflags optimize shellflags)}
- = @Config{qw(cc ccflags optimize shellflags)};
+ @cflags{qw(cc ccflags optimize large split shellflags)}
+ = @Config{qw(cc ccflags optimize large split shellflags)};
my($optdebug) = "";
$cflags{shellflags} ||= '';
@@ -342,12 +342,16 @@ sub cflags {
optimize=\"$cflags{optimize}\"
perltype=\"$cflags{perltype}\"
optdebug=\"$cflags{optdebug}\"
+ large=\"$cflags{large}\"
+ split=\"$cflags{'split'}\"
eval '$prog'
echo cc=\$cc
echo ccflags=\$ccflags
echo optimize=\$optimize
echo perltype=\$perltype
echo optdebug=\$optdebug
+ echo large=\$large
+ echo split=\$split
`;
my($line);
foreach $line (@o){
@@ -365,7 +369,7 @@ sub cflags {
$cflags{optimize} = $optdebug;
}
- for (qw(ccflags optimize perltype)) {
+ for (qw(ccflags optimize perltype large split)) {
$cflags{$_} =~ s/^\s+//;
$cflags{$_} =~ s/\s+/ /g;
$cflags{$_} =~ s/\s+$//;
@@ -408,6 +412,8 @@ sub cflags {
CCFLAGS = $self->{CCFLAGS}
OPTIMIZE = $self->{OPTIMIZE}
PERLTYPE = $self->{PERLTYPE}
+LARGE = $self->{LARGE}
+SPLIT = $self->{SPLIT}
MPOLLUTE = $pollute
};
@@ -452,7 +458,7 @@ EOT
push(@otherfiles, qw[./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all
perlmain.c mon.out core core.*perl.*.?
*perl.core so_locations pm_to_blib
- *$(OBJ_EXT) *$(LIB_EXT) perl.exe
+ *~ */*~ */*/*~ *$(OBJ_EXT) *$(LIB_EXT) perl.exe
$(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def
$(BASEEXT).exp
]);
@@ -478,7 +484,7 @@ sub const_cccmd {
return '' unless $self->needs_linking();
return $self->{CONST_CCCMD} =
q{CCCMD = $(CC) -c $(INC) $(CCFLAGS) $(OPTIMIZE) \\
- $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \\
+ $(PERLTYPE) $(LARGE) $(SPLIT) $(MPOLLUTE) $(DEFINE_VERSION) \\
$(XS_DEFINE_VERSION)};
}
@@ -581,7 +587,7 @@ MM_VERSION = $ExtUtils::MakeMaker::VERSION
for $tmp (qw/
FULLEXT BASEEXT PARENT_NAME DLBASE VERSION_FROM INC DEFINE OBJECT
- LDFROM LINKTYPE PM_FILTER
+ LDFROM LINKTYPE
/ ) {
next unless defined $self->{$tmp};
push @m, "$tmp = $self->{$tmp}\n";
@@ -675,10 +681,6 @@ EXPORT_LIST = $tmp
push @m, "
PERL_ARCHIVE = $tmp
";
- $tmp = $self->perl_archive_after;
- push @m, "
-PERL_ARCHIVE_AFTER = $tmp
-";
# push @m, q{
#INST_PM = }.join(" \\\n\t", sort values %{$self->{PM}}).q{
@@ -811,7 +813,7 @@ DIST_DEFAULT = $dist_default
=item dist_basics (o)
-Defines the targets distclean, distcheck, skipcheck, manifest, veryclean.
+Defines the targets distclean, distcheck, skipcheck, manifest.
=cut
@@ -839,11 +841,6 @@ manifest :
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=mkmanifest \\
-e mkmanifest
};
-
- push @m, q{
-veryclean : realclean
- $(RM_F) *~ *.orig */*~ */*.orig
-};
join "", @m;
}
@@ -1066,7 +1063,7 @@ ARMAYBE = '.$armaybe.'
OTHERLDFLAGS = '.$otherldflags.'
INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
+$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
');
if ($armaybe ne ':'){
$ldfrom = 'tmp$(LIB_EXT)';
@@ -1075,20 +1072,18 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists
}
$ldfrom = "-all $ldfrom -none" if ($^O eq 'dec_osf');
- # The IRIX linker doesn't use LD_RUN_PATH
- my $ldrun = qq{-rpath "$self->{LD_RUN_PATH}"}
- if ($^O eq 'irix' && $self->{LD_RUN_PATH});
+ # Brain dead solaris linker does not use LD_RUN_PATH?
+ # This fixes dynamic extensions which need shared libs
+ my $ldrun = '';
+ $ldrun = join ' ', map "-R$_", split /:/, $self->{LD_RUN_PATH}
+ if ($^O eq 'solaris');
- # For example in AIX the shared objects/libraries from previous builds
- # linger quite a while in the shared dynalinker cache even when nobody
- # is using them. This is painful if one for instance tries to restart
- # a failed build because the link command will fail unnecessarily 'cos
- # the shared object/library is 'busy'.
- push(@m,' $(RM_F) $@
-');
+ # The IRIX linker also doesn't use LD_RUN_PATH
+ $ldrun = qq{-rpath "$self->{LD_RUN_PATH}"}
+ if ($^O eq 'irix' && $self->{LD_RUN_PATH});
- push(@m,' LD_RUN_PATH="$(LD_RUN_PATH)" $(LD) '.$ldrun.' $(LDDLFLAGS) '.$ldfrom.
- ' $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST)');
+ push(@m,' $(LD) -o $@ '.$ldrun.' $(LDDLFLAGS) '.$ldfrom.
+ ' $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) $(EXPORT_LIST)');
push @m, '
$(CHMOD) $(PERM_RWX) $@
';
@@ -1153,9 +1148,9 @@ in these dirs:
@$dirs
";
}
- foreach $name (@$names){
- foreach $dir (@$dirs){
- next unless defined $dir; # $self->{PERL_SRC} may be undefined
+ foreach $dir (@$dirs){
+ next unless defined $dir; # $self->{PERL_SRC} may be undefined
+ foreach $name (@$names){
my ($abs, $val);
if ($self->file_name_is_absolute($name)) { # /foo/bar
$abs = $name;
@@ -1255,6 +1250,11 @@ eval 'exec $interpreter $arg -S \$0 \${1+"\$\@"}'
next;
}
my($dev,$ino,$mode) = stat FIXIN;
+ # If they override perm_rwx, we won't notice it during fixin,
+ # because fixin is run through a new instance of MakeMaker.
+ # That is why we must run another CHMOD later.
+ $mode = oct($self->perm_rwx) unless $dev;
+ chmod $mode, $file;
# Print out the new #! line (or equivalent).
local $\;
@@ -1262,15 +1262,7 @@ eval 'exec $interpreter $arg -S \$0 \${1+"\$\@"}'
print FIXOUT $shb, <FIXIN>;
close FIXIN;
close FIXOUT;
-
- # can't rename/chmod open files on some DOSISH platforms
-
- # If they override perm_rwx, we won't notice it during fixin,
- # because fixin is run through a new instance of MakeMaker.
- # That is why we must run another CHMOD later.
- $mode = oct($self->perm_rwx) unless $dev;
- chmod $mode, $file;
-
+ # can't rename open files on some DOSISH platforms
unless ( rename($file, "$file.bak") ) {
warn "Can't rename $file to $file.bak: $!";
next;
@@ -1285,7 +1277,6 @@ eval 'exec $interpreter $arg -S \$0 \${1+"\$\@"}'
}
unlink "$file.bak";
} continue {
- close(FIXIN) if fileno(FIXIN);
chmod oct($self->perm_rwx), $file or
die "Can't reset permissions for $file: $!\n";
system("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';;
@@ -1362,7 +1353,7 @@ sub htmlifypods {
if (defined $self->{PERL_SRC}) {
$pod2html_exe = $self->catfile($self->{PERL_SRC},'pod','pod2html');
} else {
- $pod2html_exe = $self->catfile($Config{scriptdirexp},'pod2html');
+ $pod2html_exe = $self->catfile($Config{bin},'pod2html');
}
unless ($pod2html_exe = $self->perl_script($pod2html_exe)) {
# No pod2html but some HTMLxxxPODS to be installed
@@ -1663,7 +1654,7 @@ sub init_main {
unless ($self->{PERL_SRC}){
my($dir);
- foreach $dir ($self->updir(),$self->catdir($self->updir(),$self->updir()),$self->catdir($self->updir(),$self->updir(),$self->updir()),$self->catdir($self->updir(),$self->updir(),$self->updir(),$self->updir())){
+ foreach $dir ($self->updir(),$self->catdir($self->updir(),$self->updir()),$self->catdir($self->updir(),$self->updir(),$self->updir())){
if (
-f $self->catfile($dir,"config.sh")
&&
@@ -1846,11 +1837,12 @@ usually solves this kind of problem.
# of /prefix/{lib,man}
$replace_prefix = qq[\$\(PREFIX\)];
+ $search_prefix = $self->catdir($configure_prefix,"local");
for $install_variable (qw/
INSTALLBIN
INSTALLSCRIPT
/) {
- $self->prefixify($install_variable,$configure_prefix,$replace_prefix);
+ $self->prefixify($install_variable,$search_prefix,$replace_prefix);
}
my $funkylibdir = $self->catdir($configure_prefix,"lib","perl5");
$funkylibdir = '' unless -d $funkylibdir;
@@ -2377,7 +2369,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
# The front matter of the linkcommand...
$linkcmd = join ' ', "\$(CC)",
- grep($_, @Config{qw(ldflags ccdlflags)});
+ grep($_, @Config{qw(large split ldflags ccdlflags)});
$linkcmd =~ s/\s+/ /g;
$linkcmd =~ s,(perl\.exp),\$(PERL_INC)/$1,;
@@ -2460,7 +2452,7 @@ MAP_PERLINC = @{$perlinc || []}
MAP_STATIC = ",
join(" \\\n\t", reverse sort keys %static), "
-MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
+MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
";
if (defined $libperl) {
@@ -2468,7 +2460,6 @@ MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
}
unless ($libperl && -f $lperl) { # Ilya's code...
my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
- $dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL};
$libperl ||= "libperl$self->{LIB_EXT}";
$libperl = "$dir/$libperl";
$lperl ||= "libperl$self->{LIB_EXT}";
@@ -2506,9 +2497,14 @@ MAP_LIBPERL = $libperl
# SUNOS ld does not take the full path to a shared library
my $llibperl = ($libperl)?'$(MAP_LIBPERL)':'-lperl';
+ # Brain dead solaris linker does not use LD_RUN_PATH?
+ # This fixes dynamic extensions which need shared libs
+ my $ldfrom = ($^O eq 'solaris')?
+ join(' ', map "-R$_", split /:/, $self->{LD_RUN_PATH}):'';
+
push @m, "
\$(MAP_TARGET) :: $tmp/perlmain\$(OBJ_EXT) \$(MAP_LIBPERL) \$(MAP_STATIC) \$(INST_ARCHAUTODIR)/extralibs.all
- \$(MAP_LINKCMD) -o \$\@ \$(OPTIMIZE) $tmp/perlmain\$(OBJ_EXT) \$(LDFROM) \$(MAP_STATIC) $llibperl `cat \$(INST_ARCHAUTODIR)/extralibs.all` \$(MAP_PRELIBS)
+ \$(MAP_LINKCMD) -o \$\@ \$(OPTIMIZE) $tmp/perlmain\$(OBJ_EXT) $ldfrom \$(MAP_STATIC) $llibperl `cat \$(INST_ARCHAUTODIR)/extralibs.all` \$(MAP_PRELIBS)
$self->{NOECHO}echo 'To install the new \"\$(MAP_TARGET)\" binary, call'
$self->{NOECHO}echo ' make -f $makefilename inst_perl MAP_TARGET=\$(MAP_TARGET)'
$self->{NOECHO}echo 'To remove the intermediate files say'
@@ -2612,7 +2608,7 @@ sub manifypods {
if (defined $self->{PERL_SRC}) {
$pod2man_exe = $self->catfile($self->{PERL_SRC},'pod','pod2man');
} else {
- $pod2man_exe = $self->catfile($Config{scriptdirexp},'pod2man');
+ $pod2man_exe = $self->catfile($Config{bin},'pod2man');
}
unless ($pod2man_exe = $self->perl_script($pod2man_exe)) {
# Maybe a build by uninstalled Perl?
@@ -3044,7 +3040,7 @@ sub pm_to_blib {
pm_to_blib: $(TO_INST_PM)
}.$self->{NOECHO}.q{$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
"-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
- -e "pm_to_blib({qw{$(PM_TO_BLIB)}},'}.$autodir.q{','$(PM_FILTER)')"
+ -e "pm_to_blib({qw{$(PM_TO_BLIB)}},'}.$autodir.q{')"
}.$self->{NOECHO}.q{$(TOUCH) $@
};
}
@@ -3116,7 +3112,6 @@ sub processPL {
my $list = ref($self->{PL_FILES}->{$plfile})
? $self->{PL_FILES}->{$plfile}
: [$self->{PL_FILES}->{$plfile}];
- my $target;
foreach $target (@$list) {
push @m, "
all :: $target
@@ -3156,22 +3151,8 @@ realclean purge :: clean
push(@m, " $self->{RM_F} \$(INST_DYNAMIC) \$(INST_BOOT)\n");
push(@m, " $self->{RM_F} \$(INST_STATIC)\n");
}
- # Issue a several little RM_F commands rather than risk creating a
- # very long command line (useful for extensions such as Encode
- # that have many files).
- if (keys %{$self->{PM}}) {
- my $line = "";
- foreach (values %{$self->{PM}}) {
- if (length($line) + length($_) > 80) {
- push @m, "\t$self->{RM_F} $line\n";
- $line = $_;
- }
- else {
- $line .= " $_";
- }
- }
- push @m, "\t$self->{RM_F} $line\n" if $line;
- }
+ push(@m, " $self->{RM_F} " . join(" ", values %{$self->{PM}}) . "\n")
+ if keys %{$self->{PM}};
my(@otherfiles) = ($self->{MAKEFILE},
"$self->{MAKEFILE}.old"); # Makefiles last
push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
@@ -3190,11 +3171,9 @@ form Foo/Bar and replaces the slash with C<::>. Returns the replacement.
sub replace_manpage_separator {
my($self,$man) = @_;
if ($^O eq 'uwin') {
- $man =~ s,/+,.,g;
- } elsif ($Is_Dos) {
- $man =~ s,/+,__,g;
+ $man =~ s,/+,.,g;
} else {
- $man =~ s,/+,::,g;
+ $man =~ s,/+,::,g;
}
$man;
}
@@ -3513,13 +3492,13 @@ WARN_IF_OLD_PACKLIST = $(PERL) -we 'exit unless -f $$ARGV[0];' \\
-e 'print "Please make sure the two installations are not conflicting\n";'
UNINST=0
-VERBINST=0
+VERBINST=1
MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \
-e "install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"
DOC_INSTALL = $(PERL) -e '$$\="\n\n";' \
--e 'print "=head2 ", scalar(localtime), ": C<", shift, ">", " L<", $$arg=shift, "|", $$arg, ">";' \
+-e 'print "=head2 ", scalar(localtime), ": C<", shift, ">", " L<", shift, ">";' \
-e 'print "=over 4";' \
-e 'while (defined($$key = shift) and defined($$val = shift)){print "=item *";print "C<$$key: $$val>";}' \
-e 'print "=back";'
@@ -3814,21 +3793,6 @@ sub perl_archive
return "";
}
-=item perl_archive_after
-
-This is an internal method that returns path to a library which
-should be put on the linker command line I<after> the external libraries
-to be linked to dynamic extensions. This may be needed if the linker
-is one-pass, and Perl includes some overrides for C RTL functions,
-such as malloc().
-
-=cut
-
-sub perl_archive_after
-{
- return "";
-}
-
=item export_list
This is internal method that returns name of a file that is
diff --git a/contrib/perl5/lib/ExtUtils/MakeMaker.pm b/contrib/perl5/lib/ExtUtils/MakeMaker.pm
index 8bf76c7..b29dcf6 100644
--- a/contrib/perl5/lib/ExtUtils/MakeMaker.pm
+++ b/contrib/perl5/lib/ExtUtils/MakeMaker.pm
@@ -1,3 +1,5 @@
+# $FreeBSD$
+
BEGIN {require 5.002;} # MakeMaker 5.17 was the last MakeMaker that was compatible with perl5.001m
package ExtUtils::MakeMaker;
@@ -44,7 +46,7 @@ use vars qw(
# default routine without having to know under what OS
# it's running.
#
-@MM::ISA = qw[ExtUtils::MM_Unix ExtUtils::Liblist::Kid ExtUtils::MakeMaker];
+@MM::ISA = qw[ExtUtils::MM_Unix ExtUtils::Liblist ExtUtils::MakeMaker];
#
# Setup dummy package:
@@ -60,7 +62,7 @@ use vars qw(
# "predeclare the package: we only load it via AUTOLOAD
# but we have already mentioned it in @ISA
-package ExtUtils::Liblist::Kid;
+package ExtUtils::Liblist;
package ExtUtils::MakeMaker;
#
@@ -82,7 +84,7 @@ if ($Is_OS2) {
require ExtUtils::MM_OS2;
}
if ($Is_Mac) {
- require ExtUtils::MM_MacOS;
+ require ExtUtils::MM_Mac;
}
if ($Is_Win32) {
require ExtUtils::MM_Win32;
@@ -189,7 +191,7 @@ sub full_setup {
AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE FULLPERL FUNCLIST H
- HTMLLIBPODS HTMLSCRIPTPODS IMPORTS
+ HTMLLIBPODS HTMLSCRIPTPOD IMPORTS
INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLHTMLPRIVLIBDIR
INSTALLHTMLSCRIPTDIR INSTALLHTMLSITELIBDIR INSTALLMAN1DIR
INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH
@@ -200,14 +202,10 @@ sub full_setup {
PERL_MALLOC_OK
NAME NEEDS_LINKING NOECHO NORECURS NO_VC OBJECT OPTIMIZE PERL PERLMAINCC
PERL_ARCHLIB PERL_LIB PERL_SRC PERM_RW PERM_RWX
- PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC
- PPM_INSTALL_SCRIPT PREFIX
+ PL_FILES PM PMLIBDIRS POLLUTE PPM_INSTALL_EXEC PPM_INSTALL_SCRIPT PREFIX
PREREQ_PM SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
tool_autosplit
-
- MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC
- MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED
/;
# IMPORTS is used under OS/2 and Win32
@@ -243,6 +241,7 @@ sub full_setup {
dir_target libscan makeaperl needs_linking perm_rw perm_rwx
subdir_x test_via_harness test_via_script
+
];
push @MM_Sections, qw[
@@ -286,7 +285,7 @@ sub full_setup {
INST_BIN 1 INST_EXE 1 INST_LIB 1 INST_ARCHLIB 1 INST_SCRIPT 1
MAP_TARGET 1 INST_HTMLLIBDIR 1 INST_HTMLSCRIPTDIR 1
- INST_MAN1DIR 1 INST_MAN3DIR 1 PERL_SRC 1 PERL 1 FULLPERL 1
+ INST_MAN1DIR 1 INST_MAN3DIR 1 PERL_SRC 1
);
@@ -985,39 +984,23 @@ be
perl Makefile.PL LIB=~/lib
This will install the module's architecture-independent files into
-~/lib, the architecture-dependent files into ~/lib/$archname.
+~/lib, the architecture-dependent files into ~/lib/$archname/auto.
Another way to specify many INSTALL directories with a single
parameter is PREFIX.
perl Makefile.PL PREFIX=~
-This will replace the string specified by C<$Config{prefix}> in all
-C<$Config{install*}> values.
+This will replace the string specified by $Config{prefix} in all
+$Config{install*} values.
Note, that in both cases the tilde expansion is done by MakeMaker, not
-by perl by default, nor by make.
-
-Conflicts between parameters LIB,
-PREFIX and the various INSTALL* arguments are resolved so that:
-
-=over 4
-
-=item *
-
-setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB,
-INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX);
-
-=item *
-
-without LIB, setting PREFIX replaces the initial C<$Config{prefix}>
-part of those INSTALL* arguments, even if the latter are explicitly
-set (but are set to still start with C<$Config{prefix}>).
-
-=back
+by perl by default, nor by make. Conflicts between parameters LIB,
+PREFIX and the various INSTALL* arguments are resolved so that
+XXX
If the user has superuser privileges, and is not working on AFS
-or relatives, then the defaults for
+(Andrew File System) or relatives, then the defaults for
INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLSCRIPT, etc. will be appropriate,
and this incantation will be the best:
@@ -1164,6 +1147,11 @@ or as NAME=VALUE pairs on the command line:
=over 2
+=item AUTHOR
+
+String containing name (and email address) of package author(s). Is used
+in PPD (Perl Package Description) files for PPM (Perl Package Manager).
+
=item ABSTRACT
One line description of the module. Will be included in PPD file.
@@ -1174,11 +1162,6 @@ Name of the file that contains the package description. MakeMaker looks
for a line in the POD matching /^($package\s-\s)(.*)/. This is typically
the first line in the "=head1 NAME" section. $2 becomes the abstract.
-=item AUTHOR
-
-String containing name (and email address) of package author(s). Is used
-in PPD (Perl Package Description) files for PPM (Perl Package Manager).
-
=item BINARY_LOCATION
Used when creating PPD files for binary packages. It can be set to a
@@ -1428,6 +1411,11 @@ to INSTALLBIN during 'make install'
Old name for INST_SCRIPT. Deprecated. Please use INST_SCRIPT if you
need to use it.
+=item INST_LIB
+
+Directory where we put library files of this extension while building
+it.
+
=item INST_HTMLLIBDIR
Directory to hold the man pages in HTML format at 'make' time
@@ -1436,11 +1424,6 @@ Directory to hold the man pages in HTML format at 'make' time
Directory to hold the man pages in HTML format at 'make' time
-=item INST_LIB
-
-Directory where we put library files of this extension while building
-it.
-
=item INST_MAN1DIR
Directory to hold the man pages at 'make' time
@@ -1456,6 +1439,34 @@ Directory, where executable files should be installed during
testing. make install will copy the files in INST_SCRIPT to
INSTALLSCRIPT.
+=item PERL_MALLOC_OK
+
+defaults to 0. Should be set to TRUE if the extension can work with
+the memory allocation routines substituted by the Perl malloc() subsystem.
+This should be applicable to most extensions with exceptions of those
+
+=over
+
+=item *
+
+with bugs in memory allocations which are caught by Perl's malloc();
+
+=item *
+
+which interact with the memory allocator in other ways than via
+malloc(), realloc(), free(), calloc(), sbrk() and brk();
+
+=item *
+
+which rely on special alignment which is not provided by Perl's malloc().
+
+=back
+
+B<NOTE.> Negligence to set this flag in I<any one> of loaded extension
+nullifies many advantages of Perl's malloc(), such as better usage of
+system resources, error detection, memory usage reporting, catchable failure
+of memory allocations, etc.
+
=item LDFROM
defaults to "$(OBJECT)" and is used in the ld command to specify
@@ -1464,12 +1475,8 @@ specify ld flags)
=item LIB
-LIB should only be set at C<perl Makefile.PL> time but is allowed as a
-MakeMaker argument. It has the effect of
+LIB can only be set at C<perl Makefile.PL> time. It has the effect of
setting both INSTALLPRIVLIB and INSTALLSITELIB to that value regardless any
-explicit setting of those arguments (or of PREFIX).
-INSTALLARCHLIB and INSTALLSITEARCH are set to the corresponding
-architecture subdirectory.
=item LIBPERL_A
@@ -1573,8 +1580,6 @@ List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long
string containing all object files, e.g. "tkpBind.o
tkpButton.o tkpCanvas.o"
-(Where BASEEXT is the last component of NAME, and OBJ_EXT is $Config{obj_ext}.)
-
=item OPTIMIZE
Defaults to C<-O>. Set it to C<-g> to turn debugging on. The flag is
@@ -1591,40 +1596,12 @@ to $(CC).
=item PERL_ARCHLIB
-Same as below, but for architecture dependent files.
+Same as above for architecture dependent files.
=item PERL_LIB
Directory containing the Perl library to use.
-=item PERL_MALLOC_OK
-
-defaults to 0. Should be set to TRUE if the extension can work with
-the memory allocation routines substituted by the Perl malloc() subsystem.
-This should be applicable to most extensions with exceptions of those
-
-=over 4
-
-=item *
-
-with bugs in memory allocations which are caught by Perl's malloc();
-
-=item *
-
-which interact with the memory allocator in other ways than via
-malloc(), realloc(), free(), calloc(), sbrk() and brk();
-
-=item *
-
-which rely on special alignment which is not provided by Perl's malloc().
-
-=back
-
-B<NOTE.> Negligence to set this flag in I<any one> of loaded extension
-nullifies many advantages of Perl's malloc(), such as better usage of
-system resources, error detection, memory usage reporting, catchable failure
-of memory allocations, etc.
-
=item PERL_SRC
Directory containing the Perl source code (use of this should be
@@ -1673,31 +1650,6 @@ they contain will be installed in the corresponding location in the
library. A libscan() method can be used to alter the behaviour.
Defining PM in the Makefile.PL will override PMLIBDIRS.
-(Where BASEEXT is the last component of NAME.)
-
-=item PM_FILTER
-
-A filter program, in the traditional Unix sense (input from stdin, output
-to stdout) that is passed on each .pm file during the build (in the
-pm_to_blib() phase). It is empty by default, meaning no filtering is done.
-
-Great care is necessary when defining the command if quoting needs to be
-done. For instance, you would need to say:
-
- {'PM_FILTER' => 'grep -v \\"^\\#\\"'}
-
-to remove all the leading coments on the fly during the build. The
-extra \\ are necessary, unfortunately, because this variable is interpolated
-within the context of a Perl program built on the command line, and double
-quotes are what is used with the -e switch to build that command line. The
-# is escaped for the Makefile, since what is going to be generated will then
-be:
-
- PM_FILTER = grep -v \"^\#\"
-
-Without the \\ before the #, we'd have the start of a Makefile comment,
-and the macro would be incorrectly defined.
-
=item POLLUTE
Release 5.005 grandfathered old global symbol names by providing preprocessor
@@ -1775,7 +1727,6 @@ MakeMaker object. The following lines will be parsed o.k.:
( $VERSION ) = '$Revision: 1.222 $ ' =~ /\$Revision:\s+([^\s]+)/;
$FOO::VERSION = '1.10';
*FOO::VERSION = \'1.11';
- our $VERSION = 1.2.3; # new for perl5.6.0
but these will fail:
@@ -1783,8 +1734,6 @@ but these will fail:
local $VERSION = '1.02';
local $FOO::VERSION = '1.30';
-(Putting C<my> or C<local> on the preceding line will work o.k.)
-
The file named in VERSION_FROM is not added as a dependency to
Makefile. This is not really correct, but it would be a major pain
during development to have to rewrite the Makefile for any smallish
@@ -1839,8 +1788,6 @@ part of the Makefile.
{ANY_TARGET => ANY_DEPENDECY, ...}
-(ANY_TARGET must not be given a double-colon rule by MakeMaker.)
-
=item dist
{TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz',
diff --git a/contrib/perl5/lib/Sys/Hostname.pm b/contrib/perl5/lib/Sys/Hostname.pm
index 95f9a99..f8e9095 100644
--- a/contrib/perl5/lib/Sys/Hostname.pm
+++ b/contrib/perl5/lib/Sys/Hostname.pm
@@ -93,14 +93,20 @@ sub hostname {
# method 3 - trusty old hostname command
|| eval {
+ $pathstack = $ENV{'PATH'};
+ $ENV{'PATH'} = "/bin:/usr/bin";
local $SIG{__DIE__};
$host = `(hostname) 2>/dev/null`; # bsdish
+ $ENV{'PATH'} = $pathstack;
}
# method 4 - sysV uname command (may truncate)
|| eval {
+ $pathstack = $ENV{'PATH'};
+ $ENV{'PATH'} = "/bin:/usr/bin";
local $SIG{__DIE__};
$host = `uname -n 2>/dev/null`; ## sysVish
+ $ENV{'PATH'} = $pathstack;
}
# method 5 - Apollo pre-SR10
OpenPOWER on IntegriCloud