summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAndrew Fresh <afresh1@cvs.openbsd.org>2019-07-06 22:13:24 +0000
committerAndrew Fresh <afresh1@cvs.openbsd.org>2019-07-06 22:13:24 +0000
commitfb1e773134ae883a3d9344562b321530b4214225 (patch)
treed00d3a55d4ca0f4a5f7357513afc65b295243e73 /gnu
parentb4c9344b9b3214b7161c492faebc678effcc90f6 (diff)
Fix Makemaker manpage section detection
This patch sets the section in perl manpages to "3p" instead of "3" which should be less confusing as you do find them in section 3p on OpenBSD. Initial idea and OK espie@, makes sense to schwarze@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm21
1 files changed, 19 insertions, 2 deletions
diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
index 1a3893c30b6..fc08a612466 100644
--- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
+++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
@@ -1088,8 +1088,9 @@ manifypods : pure_all config $dependencies
END
my @man_cmds;
- foreach my $section (qw(1 3)) {
- my $pods = $self->{"MAN${section}PODS"};
+ foreach my $num (qw(1 3)) {
+ my $pods = $self->{"MAN${num}PODS"};
+ my $section = $self->{"MAN${num}SECTION"};
my $p2m = sprintf <<'CMD', $section, $] > 5.008 ? " -u" : "";
$(NOECHO) $(POD2MAN) --section=%s --perm_rw=$(PERM_RW)%s
CMD
@@ -2178,6 +2179,22 @@ sub init_INSTALL_from_PREFIX {
if $Verbose >= 2;
}
+ # logic similar to picking man${num}ext in perl's Configure script
+ foreach my $num (1,3) {
+ my $mandir
+ = $self->{ 'INSTALL' . uc $self->{INSTALLDIRS} . "MAN${num}DIR" };
+ my $section = $num;
+
+ foreach ($num, "${num}p", "${num}pm", qw< l n o C L >, "L$num") {
+ if ( $mandir =~ /$_$/ ) {
+ $section = $_;
+ last;
+ }
+ }
+
+ $self->{"MAN${num}SECTION"} = $section;
+ }
+
# Generate these if they weren't figured out.
$self->{VENDORARCHEXP} ||= $self->{INSTALLVENDORARCH};
$self->{VENDORLIBEXP} ||= $self->{INSTALLVENDORLIB};