]> Pileus Git - ~andy/sunrise/blob - dev-libs/libwiimote/libwiimote-0.4.ebuild
504f87b42e7fb3452ba026040be2d998eab402d0
[~andy/sunrise] / dev-libs / libwiimote / libwiimote-0.4.ebuild
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils autotools
6
7 DESCRIPTION="Library to connect to the Nintendo Wii remote"
8 HOMEPAGE="http://libwiimote.sourceforge.net"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="examples force tilt"
15
16 RDEPEND="net-wireless/bluez-libs
17                 net-wireless/bluez-utils"
18 DEPEND="${RDEPEND}
19                 dev-util/pkgconfig"
20
21 src_unpack() {
22         unpack ${A}
23         cd "${S}"
24         epatch "${FILESDIR}/${PN}-amd64.patch"
25         epatch "${FILESDIR}/${PN}-as-needed.patch"
26
27         use "tilt" || sed -i -e "s:-D_ENABLE_TILT::" config.mk.in
28         use "force" || sed -i -e "s:-D_ENABLE_FORCE::" config.mk.in
29
30         eautoreconf
31 }
32
33 src_compile() {
34         econf \
35                 $(use_enable force) \
36                 $(use_enable tilt)
37
38         emake || die "emake failed"
39 }
40
41 src_install() {
42         emake DESTDIR="${D}" install || die "emake install failed"
43         dodoc AUTHORS NEWS README TODO
44
45         if use examples; then
46                 docinto examples
47                 dodoc test/test?.c
48         fi
49 }