-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,19 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | |||
<pkgmetadata> | |||
<herd>games</herd> | |||
<maintainer> | |||
<email>doctorwhoguy@gmail.com</email> | |||
<name>Patrick McMunn</name> | |||
</maintainer> | |||
<longdescription> | |||
ODE is a free, industrial quality library for simulating articulated rigid body | |||
dynamics - for example ground vehicles, legged creatures, and moving objects in | |||
VR environments. It is fast, flexible, robust and platform independent, with | |||
advanced joints, contact with friction, and built-in collision detection. | |||
</longdescription> | |||
<use> | |||
<flag name="double-precision">more precise calculations at the expense of speed</flag> | |||
<flag name="gyroscopic">enable gyroscopic term (may cause instability)</flag> | |||
</use> | |||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,82 @@ | |||
# Copyright 1999-2012 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Header: $ | |||
|
|||
EAPI=2 | |||
|
|||
inherit autotools subversion | |||
|
|||
DESCRIPTION="Open Dynamics Engine SDK" | |||
HOMEPAGE="http://ode.org/" | |||
SRC_URI="" | |||
ESVN_REPO_URI="https://opende.svn.sourceforge.net/svnroot/opende/trunk" | |||
|
|||
LICENSE="|| ( LGPL-2.1 BSD )" | |||
SLOT="0" | |||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" | |||
IUSE="debug doc double-precision examples gyroscopic static-libs" | |||
|
|||
RDEPEND="examples? ( | |||
virtual/opengl | |||
)" | |||
DEPEND="${RDEPEND} | |||
doc? ( app-doc/doxygen )" | |||
|
|||
src_prepare() { | |||
eautoreconf | |||
sed -i \ | |||
-e "s:\$.*/drawstuff/textures:/usr/share/doc/${PF}/examples:" \ | |||
drawstuff/src/Makefile.in \ | |||
ode/demo/Makefile.in \ | |||
|| die "sed Makefile.in failed" | |||
} | |||
|
|||
src_configure() { | |||
# use bash (bug #335760) | |||
CONFIG_SHELL=/bin/bash \ | |||
econf \ | |||
--disable-dependency-tracking \ | |||
--enable-shared \ | |||
$(use_enable static-libs static) \ | |||
$(use_enable debug asserts) \ | |||
$(use_enable double-precision) \ | |||
$(use_enable examples demos) \ | |||
$(use_enable gyroscopic) \ | |||
$(use_with examples drawstuff X11) | |||
} | |||
|
|||
src_compile() { | |||
emake || die "emake failed" | |||
if use doc ; then | |||
cd ode/doc | |||
doxygen Doxyfile || die "doxygen failed" | |||
fi | |||
} | |||
|
|||
src_install() { | |||
emake DESTDIR="${D}" install || die "emake install failed" | |||
dodoc CHANGELOG.txt README.txt | |||
if ! use static-libs ; then | |||
find "${D}" -type f -name '*.la' -exec rm {} + \ | |||
|| die "la removal failed" | |||
fi | |||
if use doc ; then | |||
dohtml docs/* || die "dohtml failed" | |||
fi | |||
if use examples; then | |||
cd ode/demo | |||
exeinto /usr/share/doc/${PF}/examples | |||
local f | |||
for f in *.c* ; do | |||
doexe .libs/${f%.*} || die "doexe ${f%.*} failed" | |||
done | |||
cd ../.. | |||
doexe drawstuff/dstest/dstest | |||
insinto /usr/share/doc/${PF}/examples | |||
doins ode/demo/*.{c,cpp,h} \ | |||
drawstuff/textures/*.ppm \ | |||
drawstuff/dstest/dstest.cpp \ | |||
drawstuff/src/{drawstuff.cpp,internal.h,x11.cpp} \ | |||
|| die "doins failed" | |||
fi | |||
} |