Explain perldoc how to handle MANWIDTH=tty in the environment, and stop

it from reporting tty being an invalid version.

With hat:	perl@
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2017-04-04 14:06:51 +00:00
parent 8b27ee4a62
commit fdfb149bb4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=437735
15 changed files with 107 additions and 5 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= perl
PORTREVISION= 1
PORTREVISION= 2
# XXX Remove second line, uncomment first
#DISTVERSION= ${PERL_VERSION}
DISTVERSION= ${GH_TAGNAME:C/^v//:C/-g[0-9a-f]*$//}

View File

@ -0,0 +1,11 @@
--- cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm.orig 2017-04-03 07:28:44 UTC
+++ cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm
@@ -108,6 +108,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;

View File

@ -0,0 +1,11 @@
--- cpan/Pod-Perldoc/lib/Pod/Perldoc/ToTerm.pm.orig 2017-04-03 07:28:44 UTC
+++ cpan/Pod-Perldoc/lib/Pod/Perldoc/ToTerm.pm
@@ -69,6 +69,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;

View File

@ -3,7 +3,7 @@
PORTNAME= perl
PORTVERSION= ${PERL_VERSION}
PORTREVISION= 15
PORTREVISION= 16
CATEGORIES= lang devel perl5
MASTER_SITES= CPAN/../../src/5.0
DIST_SUBDIR= perl

View File

@ -9,3 +9,12 @@
else { qw( groff nroff mandoc ) }
}
@@ -108,6 +108,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;

View File

@ -0,0 +1,11 @@
--- cpan/Pod-Perldoc/lib/Pod/Perldoc/ToTerm.pm.orig 2017-04-04 13:14:41 UTC
+++ cpan/Pod-Perldoc/lib/Pod/Perldoc/ToTerm.pm
@@ -41,6 +41,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;

View File

@ -3,7 +3,7 @@
PORTNAME= perl
DISTVERSION= ${PERL_VERSION}
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= lang devel perl5
MASTER_SITES= CPAN/../../src/5.0 CPAN/../by-authors/id/S/SH/SHAY
DIST_SUBDIR= perl

View File

@ -9,3 +9,12 @@
else { qw( groff nroff mandoc ) }
}
@@ -108,6 +108,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;

View File

@ -0,0 +1,11 @@
--- cpan/Pod-Perldoc/lib/Pod/Perldoc/ToTerm.pm.orig 2017-04-04 13:18:08 UTC
+++ cpan/Pod-Perldoc/lib/Pod/Perldoc/ToTerm.pm
@@ -41,6 +41,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;

View File

@ -3,7 +3,7 @@
PORTNAME= perl
DISTVERSION= ${PERL_VERSION}
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= lang devel perl5
MASTER_SITES= CPAN/../../src/5.0 CPAN/../by-authors/id/S/SH/SHAY
DIST_SUBDIR= perl

View File

@ -9,3 +9,12 @@
else { qw( groff nroff mandoc ) }
}
@@ -108,6 +108,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;

View File

@ -0,0 +1,11 @@
--- cpan/Pod-Perldoc/lib/Pod/Perldoc/ToTerm.pm.orig 2017-04-04 13:18:08 UTC
+++ cpan/Pod-Perldoc/lib/Pod/Perldoc/ToTerm.pm
@@ -41,6 +41,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;

View File

@ -3,7 +3,7 @@
PORTNAME= Pod-Perldoc
PORTVERSION= 3.25
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= textproc perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-

View File

@ -9,3 +9,12 @@
else { qw( groff nroff mandoc ) }
}
@@ -108,6 +108,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;

View File

@ -0,0 +1,11 @@
--- lib/Pod/Perldoc/ToTerm.pm.orig 2015-02-12 03:08:32 UTC
+++ lib/Pod/Perldoc/ToTerm.pm
@@ -41,6 +41,8 @@ sub _get_columns_from_manwidth {
return 0 unless defined $ENV{MANWIDTH};
+ if ($ENV{MANWIDTH} eq 'tty') { return 0; }
+
unless( $ENV{MANWIDTH} =~ m/\A\d+\z/ ) {
$self->warn( "Ignoring non-numeric MANWIDTH ($ENV{MANWIDTH})\n" );
return 0;