0cde20cb7aa1c32f963cb2800fe4487693d0b0da
[gentoo.git] / dev-libs / libspnav / libspnav-0.2.3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="7"
5
6 inherit multilib toolchain-funcs
7
8 MY_PN='spacenav'
9 DESCRIPTION="libspnav is a replacement for the magellan library with a cleaner API"
10 HOMEPAGE="http://spacenav.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}%20library%20%28SDK%29/${PN}%20${PV}/${P}.tar.gz"
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="~amd64 ~ppc64 ~x86"
15 IUSE="X"
16
17 CDEPEND="X? ( x11-libs/libX11 )"
18 RDEPEND="app-misc/spacenavd[X?]
19         ${CDEPEND}"
20 DEPEND="${CDEPEND}"
21
22 src_prepare() {
23         eapply "${FILESDIR}"/${P}-makefile.patch
24         eapply_user
25 }
26
27 src_configure() {
28         local args=(
29                 --disable-opt
30                 --disable-debug
31                 $(use_enable X x11)
32         )
33         econf "${args[@]}"
34 }
35
36 src_compile() {
37         emake CC="$(tc-getCC)"
38 }
39
40 src_install() {
41         local args=(
42                 DESTDIR="${D}"
43                 libdir="$(get_libdir)"
44         )
45         emake "${args[@]}" install
46 }