Change 34276 by [EMAIL PROTECTED] on 2008/09/05 15:17:22
Integrate:
[ 34235]
Silence warnings when -destdir isn't set.
[ 34236]
Subject: [PATCH] Architecture-Independent Non-XS extenstions
From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Date: Thu, 28 Aug 2008 08:30:38 -0400
Affected files ...
... //depot/maint-5.10/perl/installperl#6 integrate
Differences ...
==== //depot/maint-5.10/perl/installperl#6 (xtext) ====
Index: perl/installperl
--- perl/installperl#5~33954~ 2008-05-30 17:29:21.000000000 -0700
+++ perl/installperl 2008-09-05 08:17:22.000000000 -0700
@@ -67,6 +67,11 @@
}
$otherperls = 1;
+# This little hack simplifies making the code after the comment "Fetch some
+# frequently-used items from %Config" warning free. With $opts{destdir} always
+# defined, it's also possible to make the s/\Q$opts{destdir}\E unconditional.
+
+$opts{destdir} = '';
# Consider refactoring this to use Getopt::Long once Getopt::Long's planned
# feature is implemented, to distinguish + and - options.
while (@ARGV) {
@@ -148,8 +153,13 @@
push(@scripts, map("$_.exe", @scripts));
}
+# Exclude nonxs extensions that are not architecture dependent
+my @nonxs = grep(!/^Errno$/, split(' ', $Config{'nonxs_ext'}));
+
find(sub {
- if ("$File::Find::dir/$_" =~ m{^ext\b(.*)/([^/]+)\.pm$}) {
+ if (($File::Find::name =~ m{^ext\b(.*)/([^/]+)\.pm$}) &&
+ ! grep { $File::Find::name =~ /^ext\/$_/ } @nonxs)
+ {
my($path, $modname) = ($1,$2);
# strip to optional "/lib", or remove trailing component
@@ -665,7 +675,7 @@
my($from,$to) = @_;
my $xto = $to;
- $xto =~ s/^\Q$opts{destdir}\E// if $opts{destdir};
+ $xto =~ s/^\Q$opts{destdir}\E//;
print $opts{verbose} ? " cp $from $xto\n" : " $xto\n"
unless $opts{silent};
print " creating new version of $xto\n"
@@ -750,7 +760,7 @@
unlink("$installarchlib/$name");
}
my $xname = "$installlib/$name";
- $xname =~ s/^\Q$opts{destdir}\E// if $opts{destdir};
+ $xname =~ s/^\Q$opts{destdir}\E//;
$packlist->{$xname} = { type => 'file' };
if ($force || compare($_, "$installlib/$name") || $opts{notify}) {
unlink("$installlib/$name");
@@ -797,7 +807,7 @@
my($from,$to)[EMAIL PROTECTED];
return 1 if (($^O eq 'VMS') && (-d $from));
my $xto = $to;
- $xto =~ s/^\Q$opts{destdir}\E// if $opts{destdir};
+ $xto =~ s/^\Q$opts{destdir}\E//;
my $perlpodbadsymlink;
if ($from =~ m!^pod/perl[\w-]+\.pod$! &&
-l $from &&
End of Patch.