ode-0.11.1.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. DESCRIPTION="Open Dynamics Engine SDK"
  6. HOMEPAGE="http://ode.org/"
  7. SRC_URI="mirror://sourceforge/opende/${P}.tar.bz2"
  8. LICENSE="|| ( LGPL-2.1 BSD )"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc ppc64 ~sparc x86 ~x86-fbsd"
  11. IUSE="debug doc double-precision examples gyroscopic static-libs"
  12. RDEPEND="examples? (
  13. virtual/opengl
  14. )"
  15. DEPEND="${RDEPEND}
  16. doc? ( app-doc/doxygen )"
  17. src_prepare() {
  18. sed -i \
  19. -e "s:\$.*/drawstuff/textures:/usr/share/doc/${PF}/examples:" \
  20. drawstuff/src/Makefile.in \
  21. ode/demo/Makefile.in || die
  22. }
  23. src_configure() {
  24. # use bash (bug #335760)
  25. CONFIG_SHELL=/bin/bash \
  26. econf \
  27. --enable-shared \
  28. $(use_enable static-libs static) \
  29. $(use_enable debug asserts) \
  30. $(use_enable double-precision) \
  31. $(use_enable examples demos) \
  32. $(use_enable gyroscopic) \
  33. $(use_with examples drawstuff X11)
  34. }
  35. src_compile() {
  36. emake
  37. if use doc ; then
  38. cd ode/doc
  39. doxygen Doxyfile || die
  40. fi
  41. }
  42. src_install() {
  43. DOCS="CHANGELOG.txt README.txt" \
  44. default
  45. prune_libtool_files
  46. if use doc ; then
  47. dohtml docs/*
  48. fi
  49. if use examples; then
  50. cd ode/demo
  51. exeinto /usr/share/doc/${PF}/examples
  52. local f
  53. for f in *.c* ; do
  54. doexe .libs/${f%.*}
  55. done
  56. cd ../..
  57. doexe drawstuff/dstest/dstest
  58. insinto /usr/share/doc/${PF}/examples
  59. doins ode/demo/*.{c,cpp,h} \
  60. drawstuff/textures/*.ppm \
  61. drawstuff/dstest/dstest.cpp \
  62. drawstuff/src/{drawstuff.cpp,internal.h,x11.cpp}
  63. fi
  64. }