summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2020-06-03 21:24:39 +0200
committerSebastian Pipping <sping@gentoo.org>2020-06-03 21:26:14 +0200
commit050e7b001ab90246b213b01d6f7f708831a30fb2 (patch)
treeaa1d2a443f04f73ea8788ce9e01fc1274fb3ea32 /dev-libs
parentx11-apps/igt-gpu-tools: Fix USE flags dependency (diff)
downloadgentoo-050e7b001ab90246b213b01d6f7f708831a30fb2.tar.gz
gentoo-050e7b001ab90246b213b01d6f7f708831a30fb2.tar.bz2
gentoo-050e7b001ab90246b213b01d6f7f708831a30fb2.zip
dev-libs/libspnav: Support USE=-static-libs
Closes: https://bugs.gentoo.org/726978 Signed-off-by: Sebastian Pipping <sping@gentoo.org> Package-Manager: Portage-2.3.99, Repoman-2.3.22
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libspnav/libspnav-0.2.3-r1.ebuild52
1 files changed, 52 insertions, 0 deletions
diff --git a/dev-libs/libspnav/libspnav-0.2.3-r1.ebuild b/dev-libs/libspnav/libspnav-0.2.3-r1.ebuild
new file mode 100644
index 000000000000..49946c481da4
--- /dev/null
+++ b/dev-libs/libspnav/libspnav-0.2.3-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit multilib 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="mirror://sourceforge/project/${MY_PN}/${MY_PN}%20library%20%28SDK%29/${PN}%20${PV}/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="static-libs X"
+
+CDEPEND="X? ( x11-libs/libX11 )"
+RDEPEND="app-misc/spacenavd[X?]
+ ${CDEPEND}"
+DEPEND="${CDEPEND}"
+
+src_prepare() {
+ eapply "${FILESDIR}"/${P}-makefile.patch
+ eapply_user
+}
+
+src_configure() {
+ local args=(
+ --disable-opt
+ --disable-debug
+ $(use_enable X x11)
+ )
+ econf "${args[@]}"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+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
+}