summaryrefslogtreecommitdiff
path: root/dev-libs/libspnav
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
commite68d405c5d712af4387159df07e226217bdda049 (patch)
tree009ab0f3d427f0813e62930d71802cb054c07e30 /dev-libs/libspnav
parent401101f9c8077911929d3f2b60a37098460a5d89 (diff)
gentoo resync : 06.04.2022
Diffstat (limited to 'dev-libs/libspnav')
-rw-r--r--dev-libs/libspnav/Manifest3
-rw-r--r--dev-libs/libspnav/files/libspnav-1.0-no-xorg-compile.patch45
-rw-r--r--dev-libs/libspnav/libspnav-1.0.ebuild57
3 files changed, 105 insertions, 0 deletions
diff --git a/dev-libs/libspnav/Manifest b/dev-libs/libspnav/Manifest
index 888572ddef4a..87523ed8695a 100644
--- a/dev-libs/libspnav/Manifest
+++ b/dev-libs/libspnav/Manifest
@@ -1,7 +1,10 @@
AUX libspnav-0.2.3-makefile.patch 1329 BLAKE2B 8eccfcfa539703437326b4800597dc7b6074d7bda0246c27a819114969a6906901b6063a11cdf8dd29148cbf9ecef5d5301f842355b86600b3077b34d61cd6d0 SHA512 8cdc05d5b0d4aa16de59752d0ce204dd0db1df63554c53c2e0b9ea04a7a1b32a0fded8ba4f9f5fc94456f6d4b7b87213284f88944931903986f4df81784cc64f
+AUX libspnav-1.0-no-xorg-compile.patch 1473 BLAKE2B 09848c7ec4e76d8a434b05a98728bcc3be652ddb65dfd2c290ce2dada50841b8ebe90cc127f3b63097e9edc8436086553e7a740d68e19faed836d688417dd416 SHA512 09528ae037ef05c02af1027b81896d7692b46703abfbe9708d4ad858f1deaa8d8891d7b8b7dd655117e64780a85c41a77385f4b5db2a67b5258041c4d1b35e95
DIST libspnav-0.2.3.tar.gz 11985 BLAKE2B 134a0c3f7c9a7ef7c4f68910e0266880958e2b74e253b75237b0fa8d3e482bcd1f42e715b85f0ffca3a62103530e854090818564d9c241bfc55de039cc4883ee SHA512 b2c452d979d455fc99bfdc172c8a2408a6e8dc40acc52964fa64f4d75a8ee77dda12e5e212c0c4e07a0a24d055f16f85bb6ce6287e24e6bd0665de457e37e6a7
DIST libspnav-0.3.tar.gz 12386 BLAKE2B 6598e0eb3cb41c9e13f0cb62715cd199d2fff0903d8f62726fa82227f2aa49f4dc41083929cbdde18974dfb08c23947158b465bb552c12ea8c9f9fd754962c2b SHA512 1bd61c1ccda37af9b3eaeda6d8f269777f7d13b1c3d3ed4d194b917199bd232d79c9513bcdae6fce6c298ad8460c095a98e3cfd98ee76e1852fc0e93e478c252
+DIST libspnav-1.0.tar.gz 31578 BLAKE2B 535cdf588b4b1de8f37f9239a48df10e755d004fbe6b5f3771b00bb2f9a8b36e7db30297a8a99ac689d890c08c728303af3d71c60c299574bf02476aa5724b11 SHA512 ae36ea51dbca7d5ba31d82ffaa46bad2bd877f5f7c077d2e711747427f6d60a000ab0c827ae6523ba6a275dbad205eea8c20520fe2575a6fa6b554ea8b5e0eaa
EBUILD libspnav-0.2.3-r1.ebuild 1228 BLAKE2B 3ebb19e747735af2df2a4bd7e7f484ef45f2dc787fbea11085fc14728e9b3fa3127275e11c3195f208775678163caa6e53aa4ebe16044164f1cbfa296b7bc451 SHA512 d81c66fb8cb2651f44824f2d2a739e146aa700b83672dc4d5ea935f20fd6487fe6e06582faaa4798ae1f7a77854de02552d7155deb08bfef0976a922dc668ba8
EBUILD libspnav-0.2.3.ebuild 902 BLAKE2B 2ad55473d8968bdb60f8524277cbb63f9f396e981a7f4325af10f2c89b827e3f732325b1cfb0723dc4f8ff8e3bc1817561cd025e37c6f7c71a178a4ce3c12c24 SHA512 673f746c05b2c3ef44452f9206b4dbbd03c28203e952228902972f380c71e8d437f58e83ad42546876dff5362c9ec041eb8bf35f28a5bbb1aca4f50ecfa92093
EBUILD libspnav-0.3.ebuild 1211 BLAKE2B 2217b4a605a93d11c9664ef1f60f3829cc335163c031e8786a02d83d5ba2411e801745d9a443c075e636ae4202d18f9321b294a644dda35ecdafa0d6c75a172e SHA512 bcd9c916186729183d0f37a4997f7f1f3640f7c4c8e3aed181badcb1f209de2697b27e48e104801a51c5e112caecaf34fb4714e00a6ad92087e19f86fe4fc9d3
+EBUILD libspnav-1.0.ebuild 1266 BLAKE2B cce3280bf16efec11288f11f143cea93dc0dbbaa4604a6dfe5c6984639cb59f1c624fdff2efe6d4151c82c6919ee17d82338ec995c07c3647b727efef86a01ae SHA512 a2b7670dc558eea8c88a34069c129c10de926af49d04b8a48c6961dc64fad5139648c3677bc6e4c18d36adf5cf21bf368506675a4f72bec123286d377e60588b
MISC metadata.xml 812 BLAKE2B ced6d51e37b17056923b89e2bbe6eba4a8224690d97826db96693c01b3c97442997a61a36f020114a65191ac9a6d2cc99098f42ca65882dbec955ee44168bd77 SHA512 55fd9c851ddce1d70eb22d30af4f8d185d3fb3dd037d4739d698ba79202ec9a4e7389f29f4fc763cd24304fec26bc1e5607ed15e0c8c37a458d4c6b9da0b05f2
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 <nuclear@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
new file mode 100644
index 000000000000..c0aa5dfe1b28
--- /dev/null
+++ b/dev-libs/libspnav/libspnav-1.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit toolchain-funcs
+
+MY_PN='spacenav'
+DESCRIPTION="libspnav is a replacement for the magellan library with a cleaner API"
+HOMEPAGE="http://spacenav.sourceforge.net/"
+SRC_URI="https://github.com/FreeSpacenav/libspnav/releases/download/v${PV}/libspnav-${PV}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="static-libs X"
+
+CDEPEND="X? ( x11-libs/libX11 )"
+RDEPEND="app-misc/spacenavd[X?]
+ ${CDEPEND}"
+DEPEND="${CDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-xorg-compile.patch
+)
+
+src_configure() {
+ local args=(
+ --disable-opt
+ --disable-debug
+ $(use_enable X x11)
+ )
+ econf "${args[@]}"
+}
+
+src_compile() {
+ local args=(
+ AR="$(tc-getAR)"
+ CC="$(tc-getCC)"
+ incpaths=-I.
+ libpaths=
+ )
+ emake "${args[@]}"
+}
+
+src_install() {
+ local args=(
+ DESTDIR="${D}"
+ libdir="$(get_libdir)"
+ )
+ emake "${args[@]}" install
+
+ # The custom configure script does not support --disable-static
+ # and conditionally patching $(lib_a) out of Makefile.in does not
+ # seem like a very maintainable option, hence we delete the .a file
+ # after "make install", instead.
+ use static-libs || find "${D}" -type f -name \*.a -delete
+}