commit:     c2075d9f92611c4cbcb875bbf94cfbf75309c43a
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  7 23:06:46 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Nov  7 23:07:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2075d9f

sci-visualization/gnuplot: Fix build with USE=libcaca.

Compilation failed with USE="libcaca -ggi -wxwidgets -X".
Fixed in 5.4.0-r2 and patch backported to 5.2.8.

Closes: https://bugs.gentoo.org/690014
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 .../gnuplot/files/gnuplot-5.2.6-caca.patch         | 13 ------
 .../gnuplot/files/gnuplot-5.2.8-caca.patch         | 33 ++++++++++++++++
 .../gnuplot/files/gnuplot-5.4.0-caca.patch         | 46 ++++++++++++++++++++++
 sci-visualization/gnuplot/gnuplot-5.2.8.ebuild     |  2 +-
 .../gnuplot/gnuplot-5.4.0-r100.ebuild              |  1 +
 sci-visualization/gnuplot/gnuplot-5.4.0-r2.ebuild  |  1 +
 6 files changed, 82 insertions(+), 14 deletions(-)

diff --git a/sci-visualization/gnuplot/files/gnuplot-5.2.6-caca.patch 
b/sci-visualization/gnuplot/files/gnuplot-5.2.6-caca.patch
deleted file mode 100644
index 4441e4b8c03..00000000000
--- a/sci-visualization/gnuplot/files/gnuplot-5.2.6-caca.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.gentoo.org/690014
-https://sourceforge.net/p/gnuplot/mailman/message/34342174/
-
---- gnuplot-5.2.6-orig/configure.ac
-+++ gnuplot-5.2.6/configure.ac
-@@ -1224,6 +1224,7 @@
- if test "${enable_qt_ok}" = yes \
-   || test "${enable_wxwidgets_ok}" = yes \
-   || test "$GGI_SUPPORT" = yes \
-+  || test "$with_caca" = yes \
-   || test "$no_x" != yes; then
-     enable_mouse=yes;
- fi

diff --git a/sci-visualization/gnuplot/files/gnuplot-5.2.8-caca.patch 
b/sci-visualization/gnuplot/files/gnuplot-5.2.8-caca.patch
new file mode 100644
index 00000000000..2ce464f0449
--- /dev/null
+++ b/sci-visualization/gnuplot/files/gnuplot-5.2.8-caca.patch
@@ -0,0 +1,33 @@
+Patch backported from branch-5-4-stable.
+https://bugs.gentoo.org/690014
+
+--- gnuplot-5.2.8-orig/term/caca.trm
++++ gnuplot-5.2.8/term/caca.trm
+@@ -1909,8 +1909,11 @@
+       CACA_result loop = CACA_loop;
+       caca_event_t ev;
+       const int event_mask =
+-              CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE |  CACA_EVENT_QUIT |
+-              CACA_EVENT_MOUSE_MOTION | CACA_EVENT_MOUSE_PRESS | 
CACA_EVENT_MOUSE_RELEASE;
++              CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE |  CACA_EVENT_QUIT
++#ifdef USE_MOUSE
++              | CACA_EVENT_MOUSE_MOTION | CACA_EVENT_MOUSE_PRESS | 
CACA_EVENT_MOUSE_RELEASE
++#endif
++              ;
+       static int mx = 0, my = 0; /* current mouse position */
+       static unsigned long last_event_time = 0;
+ 
+@@ -2577,11 +2580,13 @@
+               }
+       }
+ 
++#ifdef USE_MOUSE
+       if (changed) {
+               /* Replot only if something changed. */
+               CACA_zoom_or_replot = TRUE;
+               process_event(GE_replot, 0, 0, 0, 0, 0);
+       }
++#endif
+ }
+ 
+ 

diff --git a/sci-visualization/gnuplot/files/gnuplot-5.4.0-caca.patch 
b/sci-visualization/gnuplot/files/gnuplot-5.4.0-caca.patch
new file mode 100644
index 00000000000..f92ac93ab01
--- /dev/null
+++ b/sci-visualization/gnuplot/files/gnuplot-5.4.0-caca.patch
@@ -0,0 +1,46 @@
+From f76d96206a7251d62dbbd3879bf0ad6dfe1ec486 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <u...@gentoo.org>
+Date: Sat, 7 Nov 2020 11:25:07 -0800
+Subject: [PATCH] Allow to build --with-caca but without mouse support
+
+EAM: slightly modified fix
+Bug #2351
+---
+ term/caca.trm | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/term/caca.trm b/term/caca.trm
+index cf7c0d7c6..58606e2d8 100644
+--- a/term/caca.trm
++++ b/term/caca.trm
+@@ -1913,8 +1913,11 @@ CACA_process_events(void)
+       CACA_result loop = CACA_loop;
+       caca_event_t ev;
+       const int event_mask =
+-              CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE |  CACA_EVENT_QUIT |
+-              CACA_EVENT_MOUSE_MOTION | CACA_EVENT_MOUSE_PRESS | 
CACA_EVENT_MOUSE_RELEASE;
++              CACA_EVENT_KEY_PRESS | CACA_EVENT_RESIZE |  CACA_EVENT_QUIT
++#ifdef USE_MOUSE
++              | CACA_EVENT_MOUSE_MOTION | CACA_EVENT_MOUSE_PRESS | 
CACA_EVENT_MOUSE_RELEASE
++#endif
++              ;
+       static int mx = 0, my = 0; /* current mouse position */
+       static unsigned long last_event_time = 0;
+ 
+@@ -2579,11 +2582,13 @@ CACA_modify_plots(unsigned int operations, int plotno)
+               }
+       }
+ 
++#ifdef USE_MOUSE
+       if (changed) {
+               /* Replot only if something changed. */
+               CACA_zoom_or_replot = TRUE;
+               exec_event(GE_replot, 0, 0, 0, 0, 0);
+       }
++#endif
+ }
+ 
+ 
+-- 
+2.29.2
+

diff --git a/sci-visualization/gnuplot/gnuplot-5.2.8.ebuild 
b/sci-visualization/gnuplot/gnuplot-5.2.8.ebuild
index 29dde10c36a..b741e27f842 100644
--- a/sci-visualization/gnuplot/gnuplot-5.2.8.ebuild
+++ b/sci-visualization/gnuplot/gnuplot-5.2.8.ebuild
@@ -74,7 +74,7 @@ src_prepare() {
        eapply "${FILESDIR}"/${PN}-5.0.1-fix-underlinking.patch
        eapply "${FILESDIR}"/${PN}-5.0.6-no-picins.patch
        eapply "${FILESDIR}"/${PN}-5.2.2-regis.patch
-       eapply "${FILESDIR}"/${PN}-5.2.6-caca.patch
+       eapply "${FILESDIR}"/${PN}-5.2.8-caca.patch
        eapply_user
 
        if [[ -z ${PV%%*9999} ]]; then

diff --git a/sci-visualization/gnuplot/gnuplot-5.4.0-r100.ebuild 
b/sci-visualization/gnuplot/gnuplot-5.4.0-r100.ebuild
index 0e0cdd80bfb..47013ca921d 100644
--- a/sci-visualization/gnuplot/gnuplot-5.4.0-r100.ebuild
+++ b/sci-visualization/gnuplot/gnuplot-5.4.0-r100.ebuild
@@ -78,6 +78,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-5.0.6-no-picins.patch
        "${FILESDIR}"/${P}-pkg-config.patch
        "${FILESDIR}"/${P}-no-mouse.patch
+       "${FILESDIR}"/${P}-caca.patch
 )
 
 pkg_setup() {

diff --git a/sci-visualization/gnuplot/gnuplot-5.4.0-r2.ebuild 
b/sci-visualization/gnuplot/gnuplot-5.4.0-r2.ebuild
index c064f8bbff5..a05cfa6234c 100644
--- a/sci-visualization/gnuplot/gnuplot-5.4.0-r2.ebuild
+++ b/sci-visualization/gnuplot/gnuplot-5.4.0-r2.ebuild
@@ -75,6 +75,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-5.0.6-no-picins.patch
        "${FILESDIR}"/${P}-pkg-config.patch
        "${FILESDIR}"/${P}-no-mouse.patch
+       "${FILESDIR}"/${P}-caca.patch
 )
 
 src_prepare() {

Reply via email to