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/
Date: Wed, 03 Jun 2020 19:26:26
Message-Id: 1591212374.050e7b001ab90246b213b01d6f7f708831a30fb2.sping@gentoo
1 commit: 050e7b001ab90246b213b01d6f7f708831a30fb2
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 3 19:24:39 2020 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 3 19:26:14 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=050e7b00
7
8 dev-libs/libspnav: Support USE=-static-libs
9
10 Closes: https://bugs.gentoo.org/726978
11 Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
12 Package-Manager: Portage-2.3.99, Repoman-2.3.22
13
14 dev-libs/libspnav/libspnav-0.2.3-r1.ebuild | 52 ++++++++++++++++++++++++++++++
15 1 file changed, 52 insertions(+)
16
17 diff --git a/dev-libs/libspnav/libspnav-0.2.3-r1.ebuild b/dev-libs/libspnav/libspnav-0.2.3-r1.ebuild
18 new file mode 100644
19 index 00000000000..49946c481da
20 --- /dev/null
21 +++ b/dev-libs/libspnav/libspnav-0.2.3-r1.ebuild
22 @@ -0,0 +1,52 @@
23 +# Copyright 1999-2020 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI="7"
27 +
28 +inherit multilib toolchain-funcs
29 +
30 +MY_PN='spacenav'
31 +DESCRIPTION="libspnav is a replacement for the magellan library with a cleaner API"
32 +HOMEPAGE="http://spacenav.sourceforge.net/"
33 +SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}%20library%20%28SDK%29/${PN}%20${PV}/${P}.tar.gz"
34 +LICENSE="BSD"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~ppc64 ~x86"
37 +IUSE="static-libs X"
38 +
39 +CDEPEND="X? ( x11-libs/libX11 )"
40 +RDEPEND="app-misc/spacenavd[X?]
41 + ${CDEPEND}"
42 +DEPEND="${CDEPEND}"
43 +
44 +src_prepare() {
45 + eapply "${FILESDIR}"/${P}-makefile.patch
46 + eapply_user
47 +}
48 +
49 +src_configure() {
50 + local args=(
51 + --disable-opt
52 + --disable-debug
53 + $(use_enable X x11)
54 + )
55 + econf "${args[@]}"
56 +}
57 +
58 +src_compile() {
59 + emake CC="$(tc-getCC)"
60 +}
61 +
62 +src_install() {
63 + local args=(
64 + DESTDIR="${D}"
65 + libdir="$(get_libdir)"
66 + )
67 + emake "${args[@]}" install
68 +
69 + # The custom configure script does not support --disable-static
70 + # and conditionally patching $(lib_a) out of Makefile.in does not
71 + # seem like a very maintainable option, hence we delete the .a file
72 + # after "make install", instead.
73 + use static-libs || find "${D}" -type f -name \*.a -delete
74 +}