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