Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libspnav/files/, dev-libs/libspnav/
Date: Sat, 02 Apr 2022 17:20:41
Message-Id: 1648919949.31c6fb11eb6a7cc7b167fea4071468d622de6856.sping@gentoo
1 commit: 31c6fb11eb6a7cc7b167fea4071468d622de6856
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 2 17:17:30 2022 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 2 17:19:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31c6fb11
7
8 dev-libs/libspnav: Fix USE=-X compile for 1.0
9
10 Closes: https://bugs.gentoo.org/836612
11 Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
12 Package-Manager: Portage-3.0.30, Repoman-3.0.3
13
14 .../files/libspnav-1.0-no-xorg-compile.patch | 45 ++++++++++++++++++++++
15 dev-libs/libspnav/libspnav-1.0.ebuild | 4 ++
16 2 files changed, 49 insertions(+)
17
18 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
19 new file mode 100644
20 index 000000000000..87cf1d676282
21 --- /dev/null
22 +++ b/dev-libs/libspnav/files/libspnav-1.0-no-xorg-compile.patch
23 @@ -0,0 +1,45 @@
24 +From 12cff951bb9ee24bab2f09793d3e3917b8649f36 Mon Sep 17 00:00:00 2001
25 +From: John Tsiombikas <nuclear@××××××××××.org>
26 +Date: Sat, 2 Apr 2022 01:17:41 +0300
27 +Subject: [PATCH] fix no-x11 build: some new functions were erroneously
28 + declared inside the USE_X11 conditional block.
29 +
30 +---
31 + src/spnav.c | 17 +++++++++--------
32 + 1 file changed, 9 insertions(+), 8 deletions(-)
33 +
34 +diff --git a/src/spnav.c b/src/spnav.c
35 +index a444fb2..41fd559 100644
36 +--- a/src/spnav.c
37 ++++ b/src/spnav.c
38 +@@ -50,14 +50,6 @@ OF SUCH DAMAGE.
39 + static Window get_daemon_window(Display *dpy);
40 + static int catch_badwin(Display *dpy, XErrorEvent *err);
41 +
42 +-static int read_event(int s, spnav_event *event);
43 +-static int proc_event(int *data, spnav_event *event);
44 +-
45 +-static void flush_resp(void);
46 +-static int wait_resp(void *buf, int sz, int timeout_ms);
47 +-static int request(int req, struct reqresp *rr, int timeout_ms);
48 +-static int request_str(int req, char *buf, int bufsz, int timeout_ms);
49 +-
50 +
51 + static Display *dpy;
52 + static Window app_win;
53 +@@ -73,6 +65,15 @@ enum {
54 + #define IS_OPEN (sock != -1)
55 + #endif
56 +
57 ++static int read_event(int s, spnav_event *event);
58 ++static int proc_event(int *data, spnav_event *event);
59 ++
60 ++static void flush_resp(void);
61 ++static int wait_resp(void *buf, int sz, int timeout_ms);
62 ++static int request(int req, struct reqresp *rr, int timeout_ms);
63 ++static int request_str(int req, char *buf, int bufsz, int timeout_ms);
64 ++
65 ++
66 + struct event_node {
67 + spnav_event event;
68 + struct event_node *next;
69
70 diff --git a/dev-libs/libspnav/libspnav-1.0.ebuild b/dev-libs/libspnav/libspnav-1.0.ebuild
71 index c4af54f4d64b..c0aa5dfe1b28 100644
72 --- a/dev-libs/libspnav/libspnav-1.0.ebuild
73 +++ b/dev-libs/libspnav/libspnav-1.0.ebuild
74 @@ -19,6 +19,10 @@ RDEPEND="app-misc/spacenavd[X?]
75 ${CDEPEND}"
76 DEPEND="${CDEPEND}"
77
78 +PATCHES=(
79 + "${FILESDIR}"/${P}-no-xorg-compile.patch
80 +)
81 +
82 src_configure() {
83 local args=(
84 --disable-opt