aboutsummaryrefslogtreecommitdiff
path: root/lang/perl/patches/320-copy-pod-hack.patch
diff options
context:
space:
mode:
authorMichail Frolov <frolovm@pobox.com>2017-05-03 15:26:08 -0400
committerMichail Frolov <frolovm@pobox.com>2017-05-10 14:46:25 -0400
commit571a810fd4745048e79b51e9bf06a9bf61d6f4e5 (patch)
tree183f3251452845d826ec849ae324a8f09860a453 /lang/perl/patches/320-copy-pod-hack.patch
parent340095b3d94706c6f85ff83b217fd86908457545 (diff)
lang/perl: Upgraded to Perl 5.24.1
Signed-off-by: Michail Frolov <frolovm@pobox.com>
Diffstat (limited to 'lang/perl/patches/320-copy-pod-hack.patch')
-rw-r--r--lang/perl/patches/320-copy-pod-hack.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/lang/perl/patches/320-copy-pod-hack.patch b/lang/perl/patches/320-copy-pod-hack.patch
new file mode 100644
index 000000000..9afb8a8ce
--- /dev/null
+++ b/lang/perl/patches/320-copy-pod-hack.patch
@@ -0,0 +1,42 @@
+--- a/cpan/podlators/Makefile.PL
++++ b/cpan/podlators/Makefile.PL
+@@ -18,6 +18,19 @@ use Config;
+ use ExtUtils::MakeMaker;
+ use File::Spec;
+
++foreach (glob('scripts/pod*.PL')) {
++ # The various pod*.PL extractors change directory. Doing that with relative
++ # paths in @INC breaks. It seems the lesser of two evils to copy (to avoid)
++ # the chdir doing anything, than to attempt to convert lib paths to
++ # absolute, and potentially run into problems with quoting special
++ # characters in the path to our build dir (such as spaces)
++ require File::Copy;
++
++ my $temp = $_;
++ $temp =~ s!scripts/!!;
++ File::Copy::copy($_, $temp) or die "Can't copy $temp to $_: $!";
++}
++
+ # Generate full paths for scripts distributed in the bin directory. Appends
+ # the .com extension to scripts on VMS, unless they already have the .PL
+ # extension.
+@@ -28,7 +41,7 @@ use File::Spec;
+ # (Scalar) Space-separated relative paths from top of distribution
+ sub scripts {
+ my (@scripts) = @_;
+- my @paths = map { File::Spec->catfile('scripts', $_) } @scripts;
++ my @paths = @scripts;
+ if ($^O eq 'VMS') {
+ @paths = map { m{ [.] PL \z }xms ? $_ : $_ . '.com' } @paths;
+ }
+@@ -77,8 +90,8 @@ my %metadata = (
+
+ # Override the files that generate section 1 man pages.
+ MAN1PODS => {
+- man1pod('scripts', 'pod2man.PL'),
+- man1pod('scripts', 'pod2text.PL'),
++ man1pod('.', 'pod2man.PL'),
++ man1pod('.', 'pod2text.PL'),
+
+ # Perl core uses a separate copy in the top-level pod directory.
+ ($ENV{PERL_CORE} ? () : man1pod('pod', 'perlpodstyle.pod')),