# Copyright 2009 Maxime Coste # Based on ode-0.10.1.ebuild Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 SUMMARY="Open Dynamics Engine SDK" HOMEPAGE="http://ode.org/" DOWNLOADS="mirror://sourceforge/opende/${PNV}.tar.bz2" LICENCES="|| ( LGPL-2.1 BSD-3 )" SLOT="0" PLATFORMS="~amd64 ~x86" MYOPTIONS="debug doc double-precision examples gyroscopic double-precision [[ description = [ More precise calculations at the expense of speed ] ]]" DEPENDENCIES=" build: doc? ( app-doc/doxygen ) build+run: examples? ( virtual/opengl virtual/glu ) " src_prepare() { sed -i \ -e "s:\$.*/drawstuff/textures:/usr/share/doc/${PNVR}/examples:" \ drawstuff/src/Makefile.in \ ode/demo/Makefile.in \ || die "sed Makefile.in failed" } src_configure() { econf \ --enable-shared \ $(option_enable debug asserts) \ $(option_enable double-precision) \ $(option_enable examples demos) \ $(option_enable gyroscopic) \ $(option_with examples drawstuff X11) } src_compile() { emake if option doc ; then cd ode/doc doxygen Doxyfile || die "doxygen failed" fi } src_install() { default dodoc CHANGELOG.txt README.txt if option doc ; then insinto /usr/share/doc/${PNVR}/html doins -r docs/* fi if option examples; then cd ode/demo exeinto /usr/share/doc/${PNVR}/examples local f for f in *.c* ; do doexe .libs/${f%.*} done cd ../.. doexe drawstuff/dstest/dstest insinto /usr/share/doc/${PNVR}/examples doins ode/demo/*.{c,cpp,h} \ drawstuff/textures/*.ppm \ drawstuff/dstest/dstest.cpp \ drawstuff/src/{drawstuff.cpp,internal.h,x11.cpp} fi }