void-packages/srcpkgs/perl/patches/perldoc-less-R.diff
Juan RP 05f5b6e455 perl: update to 5.20.2 and make the soname versioned (#871).
- Merged some patches from Gentoo for misc fixes/tweaks and versioned soname.
- Update common/shlibs with libperl.so.5.20 soname.
2015-02-15 13:49:17 +01:00

30 lines
1.2 KiB
Diff

From 6ec80ea3574a990f02aebbeed5cf051b96cb939d Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Sat, 23 Aug 2014 18:46:43 -0700
Subject: Tell the 'less' pager to allow terminal escape sequences
The 'ToTerm' backend generates terminal escape sequences that
the 'less' pager does not display by default. The "-R" option
controls this, so pass it in the LESS environment variable
to avoid disturbing other pager invocations.
Bug-Debian: https://bugs.debian.org/758689
Patch-Name: debian/perldoc-less-R.diff
---
cpan/Pod-Perldoc/lib/Pod/Perldoc.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm b/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm
index 6ddd21d..1089f5b 100644
--- cpan/Pod-Perldoc/lib/Pod/Perldoc.pm
+++ cpan/Pod-Perldoc/lib/Pod/Perldoc.pm
@@ -1892,6 +1892,9 @@ sub page { # apply a pager to the output file
if ($self->is_vms) {
last if system("$pager $output") == 0;
} else {
+ # fix visible escape codes in ToTerm output
+ # https://bugs.debian.org/758689
+ local $ENV{LESS} = defined $ENV{LESS} ? "$ENV{LESS} -R" : "-R";
last if system("$pager \"$output\"") == 0;
}
}