summaryrefslogtreecommitdiff
blob: 38e14430db84f997c8210702aab73e6535c777e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3
inherit subversion

DESCRIPTION="Spacenavd is a free software replacement user-space driver (daemon), for 3Dconnexion's space-something 6dof input devices."
HOMEPAGE="http://spacenav.sourceforge.net/"
ESVN_REPO_URI="https://spacenav.svn.sourceforge.net/svnroot/spacenav/trunk"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"

src_configure() {
	pushd spacenavd
	sed -i "/CFLAGS =/s/$/ ${CFLAGS}/" Makefile.in
	sed -i "/DAEMON=/s/\/local\//\//" init_script
	econf --prefix="${D}/usr" || die "configure spacenavd failed"
	popd
	pushd spnavcfg
	sed -i "/CFLAGS =/s/$/ ${CFLAGS}/" Makefile.in
	econf --prefix="${D}/usr" || die "configure spnavcfg failed"
	popd
	pushd libspnav
	sed -i "/CFLAGS =/s/$/ ${CFLAGS}/" Makefile.in
	econf --prefix="${D}/usr" || die "configure libspnav failed"
	popd
}

src_compile() {
	pushd spacenavd
	emake || die "compiling spacenavd failed"
	popd
	pushd spnavcfg
	emake || die "compiling spnavcfg failed"
	popd
	pushd libspnav
	emake || die "compilinge libspnav failed"
	popd
}

src_install() {
	pushd spacenavd
	emake install || die "install failed"
	newinitd init_script ${PN}
	popd
	pushd spnavcfg
	emake install || die "installing spnavcfg failed"
	popd
	pushd libspnav
	emake install || die "installing libspnav failed"
	popd	
}