]> Pileus Git - ~andy/sunrise/blob - dev-games/opal/opal-0.4.0.ebuild
keyword orderings and nuke digests
[~andy/sunrise] / dev-games / opal / opal-0.4.0.ebuild
1 # Copyright 1999-2007 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 DEPEND="dev-util/scons
17         dev-games/ode"
18 RDEPEND="${DEPEND}"
19
20 S="${WORKDIR}/${P}-src"
21
22 src_compile() {
23         local myconf
24         if use double-precision; then
25                 myconf="double=true"
26         fi
27         if use debug ; then
28                 myconf="${myconf} debug=true"
29         fi
30
31         # the install flag just triggers moving around some files
32         scons ODE ${myconf} install
33
34         if use examples; then
35                 # fix examples
36                 sed -i \
37                         -e "s:ogre\/:OGRE\/:g" \
38                         samples/src/ExampleApplication.h \
39                         samples/src/ExampleFrameListener.h \
40                 || die "sed samples failed"
41                 #clean up some directories
42                 rm -r samples/playpen/{vc71,vc8}
43                 rm -r samples/simple/{vc71,vc8}
44         fi
45 }
46
47 src_install() {
48         dolib build/posix/release/libopal-ode.so
49         insinto /usr/include/opal
50         doins build/posix/release/include/opal/*
51
52         insinto /usr/$(get_libdir)/pkgconfig/
53         doins /usr/opal.pc
54
55         dodoc readme.txt
56
57         if use examples ; then
58                 insinto /usr/share/doc/${PF}/samples
59                 doins -r samples/* || die "copying examples failed"
60         fi
61 }