bullet-2.83.4.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils cmake-utils
  5. DESCRIPTION="Continuous Collision Detection and Physics Library"
  6. HOMEPAGE="http://www.bulletphysics.com/"
  7. SRC_URI="https://github.com/bulletphysics/bullet3/archive/${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="ZLIB"
  9. SLOT="0/${PV}"
  10. KEYWORDS="amd64 ~ppc64 x86 ~amd64-linux ~x86-linux"
  11. IUSE="+bullet3 doc double-precision examples extras"
  12. RDEPEND="
  13. virtual/opengl
  14. media-libs/freeglut"
  15. DEPEND="${RDEPEND}
  16. doc? ( app-doc/doxygen[dot] )"
  17. PATCHES=( "${FILESDIR}"/${PN}-2.78-soversion.patch )
  18. S="${WORKDIR}/${PN}3-${PV}"
  19. src_prepare() {
  20. # allow to generate docs
  21. sed -i -e 's/GENERATE_HTMLHELP.*//g' Doxyfile || die
  22. }
  23. src_configure() {
  24. local mycmakeargs=(
  25. -DBUILD_SHARED_LIBS=ON
  26. -DBUILD_CPU_DEMOS=OFF
  27. -DBUILD_OPENGL3_DEMOS=OFF
  28. -DBUILD_BULLET2_DEMOS=OFF
  29. -DUSE_GRAPHICAL_BENCHMARK=OFF
  30. -DINSTALL_LIBS=ON
  31. -DINSTALL_EXTRA_LIBS=ON
  32. $(cmake-utils_use_build bullet3 BULLET3)
  33. $(cmake-utils_use_build extras EXTRAS)
  34. $(cmake-utils_use_use double-precision DOUBLE_PRECISION)
  35. )
  36. cmake-utils_src_configure
  37. }
  38. src_compile() {
  39. cmake-utils_src_compile
  40. if use doc; then
  41. doxygen || die
  42. fi
  43. }
  44. src_install() {
  45. cmake-utils_src_install
  46. use doc && dodoc docs/*.pdf && dohtml -r html/*
  47. if use examples; then
  48. insinto /usr/share/doc/${PF}/examples
  49. doins -r Extras examples
  50. fi
  51. }