You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.6 KiB

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