summaryrefslogtreecommitdiff
blob: c5708f54a2524ac1eccc246fd80097eb874f91f4 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
inherit eutils autotools

DESCRIPTION="Object-oriented Input System - A cross-platform C++ input handling library"
HOMEPAGE="http://www.wreckedgames.com/wiki/index.php/WreckedLibs:OIS"
SRC_URI="mirror://sourceforge/wgois/${PN}-${PV//./-}.tar.gz"

LICENSE="ZLIB"
SLOT="0"
KEYWORDS="~x86"
IUSE="examples nojoyevents"
S="${WORKDIR}/${PN}"

RDEPEND="x11-libs/libXaw
	x11-libs/libX11"

DEPEND="${RDEPEND}"

src_unpack() {
	unpack ${A}
	cd "${S}"
	eautoreconf
	sed -i -e 's:/usr/local:/usr:' demos/ogre/common/plugins.cfg || die "sed failed"
}

src_compile() {
	econf $(use_enable !nojoyevents joyevents) --disable-ogre || die "econf failed"

	emake || die "emake failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"

	if use examples ; then
		rm demos/Make* demos/ogre/Make*
		insinto /usr/share/doc/${PF}
		doins -r demos
		exeinto /usr/share/doc/${PF}/demos
		doexe demos/.libs/{FFConsoleTest,ConsoleApp}
	fi
}