| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-misc/cwiid/cwiid-20110107-r1.ebuild,v 1.4 2012/08/14 23:25:36 hasufell Exp $
|
| 4 |
|
| 5 |
EAPI="3"
|
| 6 |
|
| 7 |
if [[ ${PV} == "9999" ]]; then
|
| 8 |
EGIT_REPO_URI="git://github.com/abstrakraft/cwiid.git"
|
| 9 |
SRC_URI=""
|
| 10 |
KEYWORDS=""
|
| 11 |
inherit git
|
| 12 |
else
|
| 13 |
# git archive --prefix=cwiid-$(date +%Y%m%d)/ \
|
| 14 |
# --format=tar HEAD | bzip2 > cwiid-$(date +%Y%m%d).tar.bz2
|
| 15 |
SRC_URI="http://dev.gentoo.org/~lxnay/cwiid/cwiid-${PV}.tar.bz2"
|
| 16 |
KEYWORDS="~x86 ~amd64"
|
| 17 |
fi
|
| 18 |
|
| 19 |
inherit eutils linux-mod autotools
|
| 20 |
|
| 21 |
DESCRIPTION="Library, input driver, and utilities for the Nintendo Wiimote"
|
| 22 |
HOMEPAGE="http://abstrakraft.org/cwiid"
|
| 23 |
|
| 24 |
LICENSE="GPL-2"
|
| 25 |
SLOT="0"
|
| 26 |
IUSE="python"
|
| 27 |
|
| 28 |
DEPEND="virtual/awk
|
| 29 |
sys-apps/sed
|
| 30 |
sys-devel/bison
|
| 31 |
>=sys-devel/flex-2.5.35
|
| 32 |
virtual/pkgconfig"
|
| 33 |
|
| 34 |
RDEPEND="net-wireless/bluez
|
| 35 |
x11-libs/gtk+:2
|
| 36 |
python? ( >=dev-lang/python-2.4 )"
|
| 37 |
|
| 38 |
pkg_setup() {
|
| 39 |
CONFIG_CHECK="BT_L2CAP INPUT_UINPUT"
|
| 40 |
linux-mod_pkg_setup
|
| 41 |
}
|
| 42 |
|
| 43 |
src_unpack() {
|
| 44 |
if [[ ${PV} == "9999" ]]; then
|
| 45 |
git_src_unpack
|
| 46 |
else
|
| 47 |
unpack ${A}
|
| 48 |
fi
|
| 49 |
}
|
| 50 |
|
| 51 |
src_prepare() {
|
| 52 |
# Fix broken build system
|
| 53 |
sed -i "s:--disable-ldconfig:--without-ldconfig:g" "${S}"/configure.ac || die
|
| 54 |
sed -i "s:enable_ldconfig:with_ldconfig:g" "${S}"/configure.ac || die
|
| 55 |
epatch "${FILESDIR}"/${P}-underlinking.patch
|
| 56 |
eautoreconf
|
| 57 |
}
|
| 58 |
src_configure() {
|
| 59 |
econf $(use_with python) --without-ldconfig || die "configure failed"
|
| 60 |
}
|
| 61 |
|
| 62 |
src_compile() {
|
| 63 |
emake || die "emake failed"
|
| 64 |
}
|
| 65 |
|
| 66 |
src_install() {
|
| 67 |
emake DESTDIR="${D}" install || die "emake install failed"
|
| 68 |
dodoc AUTHORS ChangeLog NEWS README
|
| 69 |
insinto /lib/udev/rules.d
|
| 70 |
doins "${FILESDIR}/60-${PN}.rules"
|
| 71 |
}
|