summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-13 20:54:54 +0100
committerSam James <sam@gentoo.org>2022-10-13 20:54:59 +0100
commitc668a56d7831a5fd719670df83ac86b5ae44b718 (patch)
tree2bf9d90dac629e5ba67da223d493fc57178e474d /www-client/elinks
parentwww-client/elinks: fix lua pkg_setup (diff)
downloadgentoo-c668a56d7831a5fd719670df83ac86b5ae44b718.tar.gz
gentoo-c668a56d7831a5fd719670df83ac86b5ae44b718.tar.bz2
gentoo-c668a56d7831a5fd719670df83ac86b5ae44b718.zip
www-client/elinks: fix build w/ USE=-mouse
Closes: https://bugs.gentoo.org/876953 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'www-client/elinks')
-rw-r--r--www-client/elinks/elinks-0.15.1-r1.ebuild4
-rw-r--r--www-client/elinks/files/elinks-0.15.1-no-mouse-build.patch40
2 files changed, 44 insertions, 0 deletions
diff --git a/www-client/elinks/elinks-0.15.1-r1.ebuild b/www-client/elinks/elinks-0.15.1-r1.ebuild
index 20caa1f92b40..655204af0f0f 100644
--- a/www-client/elinks/elinks-0.15.1-r1.ebuild
+++ b/www-client/elinks/elinks-0.15.1-r1.ebuild
@@ -59,6 +59,10 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}"/${P}-no-mouse-build.patch
+)
+
pkg_setup() {
use lua && lua-single_pkg_setup
diff --git a/www-client/elinks/files/elinks-0.15.1-no-mouse-build.patch b/www-client/elinks/files/elinks-0.15.1-no-mouse-build.patch
new file mode 100644
index 000000000000..cee5bdac4a83
--- /dev/null
+++ b/www-client/elinks/files/elinks-0.15.1-no-mouse-build.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/876953
+https://github.com/rkd77/elinks/issues/189
+https://github.com/rkd77/elinks/commit/d229ebe89cb2a5e08e9d0af98faaa59ba2089fb3
+
+From d229ebe89cb2a5e08e9d0af98faaa59ba2089fb3 Mon Sep 17 00:00:00 2001
+From: Witold Filipczyk <witekfl@poczta.onet.pl>
+Date: Fri, 9 Sep 2022 11:30:21 +0200
+Subject: [PATCH] [options] Do not compile-in mouse related functions when
+ mouse support is disabled. Refs #189
+
+--- a/src/config/options.c
++++ b/src/config/options.c
+@@ -896,6 +896,7 @@ change_hook_ui_double_esc(struct session *ses, struct option *current, struct op
+ return 0;
+ }
+
++#ifdef CONFIG_MOUSE
+ static int
+ change_hook_ui_mouse_disable(struct session *ses, struct option *current, struct option *changed)
+ {
+@@ -911,7 +912,7 @@ change_hook_ui_mouse_disable(struct session *ses, struct option *current, struct
+ }
+ return 0;
+ }
+-
++#endif
+
+ /** Make option templates visible or invisible in the option manager.
+ * This is called once on startup, and then each time the value of the
+@@ -988,7 +989,9 @@ static const struct change_hook_info change_hooks[] = {
+ { "ui.colors", change_hook_ui_colors },
+ { "ui.double_esc", change_hook_ui_double_esc },
+ { "ui.language", change_hook_language },
++#ifdef CONFIG_MOUSE
+ { "ui.mouse_disable", change_hook_ui_mouse_disable },
++#endif
+ { "ui", change_hook_ui },
+ { NULL, NULL },
+ };
+