commit:     31c6fb11eb6a7cc7b167fea4071468d622de6856
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  2 17:17:30 2022 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sat Apr  2 17:19:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31c6fb11

dev-libs/libspnav: Fix USE=-X compile for 1.0

Closes: https://bugs.gentoo.org/836612
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
Package-Manager: Portage-3.0.30, Repoman-3.0.3

 .../files/libspnav-1.0-no-xorg-compile.patch       | 45 ++++++++++++++++++++++
 dev-libs/libspnav/libspnav-1.0.ebuild              |  4 ++
 2 files changed, 49 insertions(+)

diff --git a/dev-libs/libspnav/files/libspnav-1.0-no-xorg-compile.patch 
b/dev-libs/libspnav/files/libspnav-1.0-no-xorg-compile.patch
new file mode 100644
index 000000000000..87cf1d676282
--- /dev/null
+++ b/dev-libs/libspnav/files/libspnav-1.0-no-xorg-compile.patch
@@ -0,0 +1,45 @@
+From 12cff951bb9ee24bab2f09793d3e3917b8649f36 Mon Sep 17 00:00:00 2001
+From: John Tsiombikas <nucl...@member.fsf.org>
+Date: Sat, 2 Apr 2022 01:17:41 +0300
+Subject: [PATCH] fix no-x11 build: some new functions were erroneously
+ declared inside the USE_X11 conditional block.
+
+---
+ src/spnav.c | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/src/spnav.c b/src/spnav.c
+index a444fb2..41fd559 100644
+--- a/src/spnav.c
++++ b/src/spnav.c
+@@ -50,14 +50,6 @@ OF SUCH DAMAGE.
+ static Window get_daemon_window(Display *dpy);
+ static int catch_badwin(Display *dpy, XErrorEvent *err);
+ 
+-static int read_event(int s, spnav_event *event);
+-static int proc_event(int *data, spnav_event *event);
+-
+-static void flush_resp(void);
+-static int wait_resp(void *buf, int sz, int timeout_ms);
+-static int request(int req, struct reqresp *rr, int timeout_ms);
+-static int request_str(int req, char *buf, int bufsz, int timeout_ms);
+-
+ 
+ static Display *dpy;
+ static Window app_win;
+@@ -73,6 +65,15 @@ enum {
+ #define IS_OPEN               (sock != -1)
+ #endif
+ 
++static int read_event(int s, spnav_event *event);
++static int proc_event(int *data, spnav_event *event);
++
++static void flush_resp(void);
++static int wait_resp(void *buf, int sz, int timeout_ms);
++static int request(int req, struct reqresp *rr, int timeout_ms);
++static int request_str(int req, char *buf, int bufsz, int timeout_ms);
++
++
+ struct event_node {
+       spnav_event event;
+       struct event_node *next;

diff --git a/dev-libs/libspnav/libspnav-1.0.ebuild 
b/dev-libs/libspnav/libspnav-1.0.ebuild
index c4af54f4d64b..c0aa5dfe1b28 100644
--- a/dev-libs/libspnav/libspnav-1.0.ebuild
+++ b/dev-libs/libspnav/libspnav-1.0.ebuild
@@ -19,6 +19,10 @@ RDEPEND="app-misc/spacenavd[X?]
        ${CDEPEND}"
 DEPEND="${CDEPEND}"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-no-xorg-compile.patch
+)
+
 src_configure() {
        local args=(
                --disable-opt

Reply via email to