mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-01 08:21:08 +08:00
43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
--- a/cpan/podlators/Makefile.PL
|
|
+++ b/cpan/podlators/Makefile.PL
|
|
@@ -39,6 +39,19 @@ sub dist_version {
|
|
die "$0: cannot find version in lib/Pod/Man.pm\n";
|
|
}
|
|
|
|
+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.
|
|
@@ -49,7 +62,7 @@ sub dist_version {
|
|
# (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;
|
|
}
|
|
@@ -101,8 +114,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')),
|