]> Pileus Git - ~andy/sunrise/blob - dev-games/opal/opal-0.4.0.ebuild
net-misc/wolman: Fix qt deps
[~andy/sunrise] / dev-games / opal / opal-0.4.0.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit multilib
6
7 DESCRIPTION="high-level interface for low-level physics engines"
8 HOMEPAGE="http://opal.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip"
10
11 LICENSE="|| ( BSD LGPL-2.1 )"
12 SLOT="0"
13 KEYWORDS="~x86"
14 IUSE="debug double-precision examples"
15
16 RDEPEND="dev-games/ode"
17 DEPEND="${RDEPEND}
18         app-arch/unzip
19         dev-util/scons"
20
21 S="${WORKDIR}/${P}-src"
22
23 src_compile() {
24         local myconf
25         if use double-precision; then
26                 myconf="double=true"
27         fi
28         if use debug ; then
29                 myconf="${myconf} debug=true"
30         fi
31
32         # the install flag just triggers moving around some files
33         scons ODE ${myconf} install
34
35         if use examples; then
36                 # fix examples
37                 sed -i \
38                         -e "s:ogre\/:OGRE\/:g" \
39                         samples/src/ExampleApplication.h \
40                         samples/src/ExampleFrameListener.h \
41                 || die "sed samples failed"
42                 #clean up some directories
43                 rm -r samples/playpen/{vc71,vc8}
44                 rm -r samples/simple/{vc71,vc8}
45         fi
46 }
47
48 src_install() {
49         dolib build/posix/release/libopal-ode.so
50         insinto /usr/include/opal
51         doins build/posix/release/include/opal/*
52
53         insinto /usr/$(get_libdir)/pkgconfig/
54         doins /usr/opal.pc
55
56         dodoc readme.txt
57
58         if use examples ; then
59                 insinto /usr/share/doc/${PF}/samples
60                 doins -r samples/* || die "copying examples failed"
61         fi
62 }