summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-02-16 20:07:05 +0100
committerLars Wendler <polynomial-c@gentoo.org>2019-02-16 20:09:13 +0100
commitf78dc4749aa8c49ea035be184b705477939899c8 (patch)
treeccf952ab5c622de54072b1d390218142d4b9dbcd /sys-apps
parentmedia-libs/libshout: add missing slot operator for libressl dependency (diff)
downloadgentoo-f78dc4749aa8c49ea035be184b705477939899c8.tar.gz
gentoo-f78dc4749aa8c49ea035be184b705477939899c8.tar.bz2
gentoo-f78dc4749aa8c49ea035be184b705477939899c8.zip
sys-apps/less: Revbump to fix mouse issue.
Bug: https://bugs.gentoo.org/678102 Package-Manager: Portage-2.3.60, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/less/files/less-549-mouse_fix.patch51
-rw-r--r--sys-apps/less/less-549-r1.ebuild (renamed from sys-apps/less/less-549.ebuild)4
2 files changed, 55 insertions, 0 deletions
diff --git a/sys-apps/less/files/less-549-mouse_fix.patch b/sys-apps/less/files/less-549-mouse_fix.patch
new file mode 100644
index 000000000000..495073a32a49
--- /dev/null
+++ b/sys-apps/less/files/less-549-mouse_fix.patch
@@ -0,0 +1,51 @@
+From d5015d29f79e70fb70489616c0f2d0ff32e52898 Mon Sep 17 00:00:00 2001
+From: Mark Nudelman <markn@greenwoodsoftware.com>
+Date: Sat, 16 Feb 2019 07:20:42 -0800
+Subject: [PATCH] Don't emit mouse controls if --mouse is not set.
+
+---
+ screen.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/screen.c b/screen.c
+index 9a32685..b58fe26 100644
+--- a/screen.c
++++ b/screen.c
+@@ -1549,6 +1549,8 @@ win32_deinit_term(VOID_PARAM)
+ public void
+ init_mouse(VOID_PARAM)
+ {
++ if (!mousecap)
++ return;
+ #if !MSDOS_COMPILER
+ tputs(sc_s_mousecap, sc_height, putchr);
+ #else
+@@ -1565,6 +1567,8 @@ init_mouse(VOID_PARAM)
+ public void
+ deinit_mouse(VOID_PARAM)
+ {
++ if (!mousecap)
++ return;
+ #if !MSDOS_COMPILER
+ tputs(sc_e_mousecap, sc_height, putchr);
+ #else
+@@ -1587,8 +1591,7 @@ init(VOID_PARAM)
+ tputs(sc_init, sc_height, putchr);
+ if (!no_keypad)
+ tputs(sc_s_keypad, sc_height, putchr);
+- if (mousecap)
+- init_mouse();
++ init_mouse();
+ }
+ if (top_scroll)
+ {
+@@ -1626,8 +1629,7 @@ deinit(VOID_PARAM)
+ #if !MSDOS_COMPILER
+ if (!(quit_if_one_screen && one_screen))
+ {
+- if (mousecap)
+- deinit_mouse();
++ deinit_mouse();
+ if (!no_keypad)
+ tputs(sc_e_keypad, sc_height, putchr);
+ if (!no_init)
diff --git a/sys-apps/less/less-549.ebuild b/sys-apps/less/less-549-r1.ebuild
index f04887b62ff3..8eff7a5d6ea5 100644
--- a/sys-apps/less/less-549.ebuild
+++ b/sys-apps/less/less-549-r1.ebuild
@@ -17,6 +17,10 @@ DEPEND=">=app-misc/editor-wrapper-3
pcre? ( dev-libs/libpcre2 )"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${P}-mouse_fix.patch #678102
+)
+
src_configure() {
export ac_cv_lib_ncursesw_initscr=$(usex unicode)
export ac_cv_lib_ncurses_initscr=$(usex !unicode)