lang/perl: Upgraded to Perl 5.24.1
[feed/packages.git] / lang / perl / patches / 320-copy-pod-hack.patch
1 --- a/cpan/podlators/Makefile.PL
2 +++ b/cpan/podlators/Makefile.PL
3 @@ -18,6 +18,19 @@ use Config;
4 use ExtUtils::MakeMaker;
5 use File::Spec;
6
7 +foreach (glob('scripts/pod*.PL')) {
8 + # The various pod*.PL extractors change directory. Doing that with relative
9 + # paths in @INC breaks. It seems the lesser of two evils to copy (to avoid)
10 + # the chdir doing anything, than to attempt to convert lib paths to
11 + # absolute, and potentially run into problems with quoting special
12 + # characters in the path to our build dir (such as spaces)
13 + require File::Copy;
14 +
15 + my $temp = $_;
16 + $temp =~ s!scripts/!!;
17 + File::Copy::copy($_, $temp) or die "Can't copy $temp to $_: $!";
18 +}
19 +
20 # Generate full paths for scripts distributed in the bin directory. Appends
21 # the .com extension to scripts on VMS, unless they already have the .PL
22 # extension.
23 @@ -28,7 +41,7 @@ use File::Spec;
24 # (Scalar) Space-separated relative paths from top of distribution
25 sub scripts {
26 my (@scripts) = @_;
27 - my @paths = map { File::Spec->catfile('scripts', $_) } @scripts;
28 + my @paths = @scripts;
29 if ($^O eq 'VMS') {
30 @paths = map { m{ [.] PL \z }xms ? $_ : $_ . '.com' } @paths;
31 }
32 @@ -77,8 +90,8 @@ my %metadata = (
33
34 # Override the files that generate section 1 man pages.
35 MAN1PODS => {
36 - man1pod('scripts', 'pod2man.PL'),
37 - man1pod('scripts', 'pod2text.PL'),
38 + man1pod('.', 'pod2man.PL'),
39 + man1pod('.', 'pod2text.PL'),
40
41 # Perl core uses a separate copy in the top-level pod directory.
42 ($ENV{PERL_CORE} ? () : man1pod('pod', 'perlpodstyle.pod')),