geogram-1.8.6.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2024 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit cmake toolchain-funcs
  5. DESCRIPTION="Geometric algorithms, includes a simple yet efficient Mesh data structure."
  6. HOMEPAGE="https://gforge.inria.fr/projects/geogram/"
  7. SRC_URI="https://github.com/BrunoLevy/${PN}/archive/v${PV/_*}.tar.gz -> ${PN}_${PV/_*}.tar.gz"
  8. KEYWORDS="~amd64 ~x86"
  9. SLOT="0"
  10. LICENSE="BSD"
  11. IUSE="debug doc exploragram graphics +fpg +hlbfgs lua +tetgen test +triangle +vorpaline"
  12. BDEPEND="
  13. doc? ( >=app-doc/doxygen-1.7.0 )
  14. lua? ( dev-lang/lua )
  15. >=dev-build/cmake-3.16
  16. virtual/pkgconfig
  17. "
  18. DEPEND="
  19. media-libs/glu:=
  20. media-libs/glfw:=
  21. "
  22. RDEPEND="${DEPEND}"
  23. RESTRICT="mirror"
  24. S=${WORKDIR}/${PN}-${PV/_*}
  25. src_prepare(){
  26. use doc || sed -e '/add_subdirectory(doc)/d' -i CMakeLists.txt
  27. cmake_src_prepare
  28. }
  29. src_configure() {
  30. CMAKE_BUILD_TYPE=$(usex debug RelWithDebInfo Release)
  31. CMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
  32. CMAKE_C_FLAGS="-fcommon"
  33. local mycmakeargs=(
  34. -DGEOGRAM_LIB_ONLY=$(usex test)
  35. -DGEOGRAM_USE_SYSTEM_GLFW3=ON
  36. -DVORPALINE_PLATFORM="Linux64-gcc-dynamic"
  37. -DGEOGRAM_WITH_LUA=$(usex lua ON OFF)
  38. -DGEOGRAM_WITH_EXPLORAGRAM=$(usex exploragram ON OFF)
  39. #-DGARGANTUA=$(usex gargantua ON OFF)
  40. -DGEOGRAM_WITH_GRAPHICS=$(usex graphics ON OFF)
  41. -DGEOGRAM_WITH_TETGEN=$(usex tetgen ON OFF)
  42. -DGEOGRAM_WITH_TRIANGLE=$(usex triangle ON OFF)
  43. -DGEOGRAM_WITH_HLBFGS=$(usex hlbfgs ON OFF)
  44. -DGEOGRAM_WITH_VORPALINE=$(usex vorpaline ON OFF)
  45. -DGEOGRAM_WITH_FPG=$(usex fpg ON OFF)
  46. -DGEOGRAM_WITH_LEGACY_NUMERICS=OFF
  47. )
  48. cmake_src_configure
  49. }
  50. src_compile() {
  51. cmake_src_compile
  52. use doc && cmake_src_compile doxigen
  53. }
  54. src_install() {
  55. cmake_src_install
  56. mv ${D}/usr/lib/ ${D}/usr/$(get_libdir) || die
  57. }