summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2021-03-01 23:19:42 +0000
committerafresh1 <afresh1@openbsd.org>2021-03-01 23:19:42 +0000
commit56d68f1e19ff848c889ecfa71d3a06340ff64892 (patch)
tree272372e9e82dd675d06054187c7f04b32fe71acc /gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc
parentImport perl-5.32.1 (diff)
downloadwireguard-openbsd-56d68f1e19ff848c889ecfa71d3a06340ff64892.tar.xz
wireguard-openbsd-56d68f1e19ff848c889ecfa71d3a06340ff64892.zip
Fix merge issues, remove excess files - match perl-5.32.1 dist
OK sthen@
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc')
-rw-r--r--gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm18
1 files changed, 8 insertions, 10 deletions
diff --git a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm
index d8e42b1703b..bfcb5c40ee6 100644
--- a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm
+++ b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm
@@ -144,9 +144,7 @@ sub _get_podman_switches {
#
# See RT #77465
#
- # Then again, do *not* comment it out on OpenBSD:
- # mandoc handles UTF-8 input just fine.
- push @switches, 'utf8' => 1;
+ #push @switches, 'utf8' => 1;
$self->debug( "Pod::Man switches are [@switches]\n" );
@@ -211,6 +209,12 @@ sub _have_groff_with_utf8 {
$version ge $minimum_groff_version;
}
+sub _have_mandoc_with_utf8 {
+ my( $self ) = @_;
+
+ $self->_is_mandoc and not system 'mandoc -Tlocale -V > /dev/null 2>&1';
+ }
+
sub _collect_nroff_switches {
my( $self ) = shift;
@@ -223,10 +227,6 @@ sub _collect_nroff_switches {
push @render_switches, '-rLL=' . (int $c) . 'n' if $cols > 80;
}
- if( $self->_is_mandoc ) {
- push @render_switches, '-Owidth=' . $self->_get_columns;
- }
-
# I hear persistent reports that adding a -c switch to $render
# solves many people's problems. But I also hear that some mans
# don't have a -c switch, so that unconditionally adding it here
@@ -242,6 +242,7 @@ sub _get_device_switches {
if( $self->_is_nroff ) { qw() }
elsif( $self->_have_groff_with_utf8 ) { qw(-Kutf8 -Tutf8) }
elsif( $self->_is_ebcdic ) { qw(-Tcp1047) }
+ elsif( $self->_have_mandoc_with_utf8 ) { qw(-Tlocale) }
elsif( $self->_is_mandoc ) { qw() }
else { qw(-Tlatin1) }
}
@@ -357,9 +358,6 @@ sub _filter_through_nroff {
length $done
);
- # wait for it to exit
- waitpid( $pid, 0 );
-
if( $? ) {
$self->warn( "Error from pipe to $render!\n" );
$self->debug( 'Error: ' . do { local $/; <$err> } );