summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/installperl
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2014-11-17 21:00:55 +0000
committerafresh1 <afresh1@openbsd.org>2014-11-17 21:00:55 +0000
commitdddc9066e829edd00a2b3a429552cbc19fbd9b34 (patch)
treed14117e6929581debe98dca1240327688194d64b /gnu/usr.bin/perl/installperl
parentFix merge conflicts, remove extra files, match upstream perl-5.20.1 (diff)
downloadwireguard-openbsd-dddc9066e829edd00a2b3a429552cbc19fbd9b34.tar.xz
wireguard-openbsd-dddc9066e829edd00a2b3a429552cbc19fbd9b34.zip
Apply local patches to perl-5.20.1
ok deraadt@ sthen@ espie@ miod@
Diffstat (limited to 'gnu/usr.bin/perl/installperl')
-rw-r--r--gnu/usr.bin/perl/installperl38
1 files changed, 28 insertions, 10 deletions
diff --git a/gnu/usr.bin/perl/installperl b/gnu/usr.bin/perl/installperl
index 5acc06a8216..e0335b7a63c 100644
--- a/gnu/usr.bin/perl/installperl
+++ b/gnu/usr.bin/perl/installperl
@@ -146,7 +146,7 @@ if ((-e "testcompile") && (defined($ENV{'COMPILE'}))) {
}
# Exclude nonxs extensions that are not architecture dependent
-my @nonxs = grep(!/^Errno$/, split(' ', $Config{'nonxs_ext'}));
+my @nonxs = grep(!/^(Errno|IO\/Compress)$/, split(' ', $Config{'nonxs_ext'}));
my @ext_dirs = qw(cpan dist ext);
foreach my $ext_dir (@ext_dirs) {
@@ -192,7 +192,7 @@ my $installprivlib = "$opts{destdir}$Config{installprivlib}";
my $installarchlib = "$opts{destdir}$Config{installarchlib}";
my $installsitelib = "$opts{destdir}$Config{installsitelib}";
my $installsitearch = "$opts{destdir}$Config{installsitearch}";
-my $installman1dir = "$opts{destdir}$Config{installman1dir}";
+my $installman1dir = "none";
my $man1ext = $Config{man1ext};
my $libperl = $Config{libperl};
# Shared library and dynamic loading suffixes.
@@ -246,9 +246,9 @@ else {
}
}
--f 't/rantests' || $Is_W32
- || warn "WARNING: You've never run 'make test' or",
- " some tests failed! (Installing anyway.)\n";
+#-f 't/rantests' || $Is_W32
+# || warn "WARNING: You've never run 'make test' or",
+# " some tests failed! (Installing anyway.)\n";
} #if (!$Is_NetWare)
# This will be used to store the packlist
@@ -274,6 +274,10 @@ if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin) {
$packlist->{"$Config{installbin}/$perldll"} = { type => 'file' };
} # if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin)
+# Get the install command and flags from the environment
+my @installcmd = $ENV{"INSTALL"} || "install";
+push(@installcmd, $ENV{"INSTALL_COPY"} || "-c");
+
# First we install the version-numbered executables.
if ($Is_VMS) {
@@ -297,10 +301,7 @@ if ($Is_VMS) {
}
elsif ($^O ne 'dos') {
if (!$Is_NetWare) {
- safe_unlink("$installbin/$perl_verbase$ver$exe_ext");
- copy("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext");
- strip("$installbin/$perl_verbase$ver$exe_ext");
- chmod(0755, "$installbin/$perl_verbase$ver$exe_ext");
+ install("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext", "0755");
}
else {
# If installing onto a NetWare server
@@ -372,7 +373,9 @@ elsif ($Is_Cygwin) { # On Cygwin symlink it to CORE to make Makefile happy
)
} else {
# [als] hard-coded 'libperl' name... not good!
- @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
+ #@corefiles = <*.h libperl*.* perl*$Config{lib_ext}>;
+ @corefiles = <*.h *.inc perl*$Config{lib_ext}>;
+ push(@corefiles,<libperl*.*>) unless defined($ENV{"NOLIBINSTALL"});
# AIX needs perl.exp installed as well.
push(@corefiles,'perl.exp') if $^O eq 'aix';
@@ -636,6 +639,21 @@ sub copy {
$packlist->{$xto} = { type => 'file' };
}
+sub install {
+ my($from,$to,$mode) = @_;
+
+ my $xto = $to;
+ my $cmd = join(' ', @installcmd);
+ $cmd .= " -m $mode" if $mode;
+ $cmd .= " -s" if $opts{strip};
+ $cmd .= " $from $to";
+ $xto =~ s/^\Q$opts{destdir}\E// if $opts{destdir};
+ print $opts{verbose} ? " install $from $xto\n" : " $xto\n" unless $opts{silent};
+ system($cmd);
+ warn "Couldn't $cmd\n" if $?;
+ $packlist->{$xto} = { type => 'file' };
+}
+
sub installlib {
my $dir = $File::Find::dir;
$dir =~ s!\Alib/?!!;