cgal-4.8-r1.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils flag-o-matic
  5. MY_P=CGAL-${PV}
  6. DESCRIPTION="C++ library for geometric algorithms and data structures"
  7. HOMEPAGE="http://www.cgal.org/"
  8. SRC_URI="
  9. https://github.com/CGAL/cgal/releases/download/releases%2F${MY_P}/${MY_P}.tar.xz -> ${P}.tar.xz
  10. doc? ( https://github.com/CGAL/cgal/releases/download/releases%2F${MY_P}/${MY_P}-doc_html.tar.xz -> ${P}-doc_html-1.tar.xz )"
  11. LICENSE="LGPL-3 GPL-3 Boost-1.0"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  14. IUSE="doc examples +gmp mpfi ntl qt5"
  15. RDEPEND="
  16. >=dev-cpp/eigen-3.1
  17. dev-libs/boost:=
  18. dev-libs/mpfr:0
  19. sys-libs/zlib
  20. x11-libs/libX11
  21. virtual/glu
  22. virtual/opengl
  23. gmp? ( dev-libs/gmp[cxx] )
  24. qt5? (
  25. dev-qt/qtcore:5
  26. dev-qt/qtgui:5
  27. dev-qt/qtopengl:5
  28. dev-qt/qtsvg:5
  29. dev-qt/qtwidgets:5
  30. )
  31. mpfi? ( sci-libs/mpfi )
  32. ntl? ( dev-libs/ntl )"
  33. DEPEND="${RDEPEND}
  34. app-arch/xz-utils
  35. virtual/pkgconfig"
  36. S="${WORKDIR}/${MY_P}"
  37. PATCHES=(
  38. "${FILESDIR}/${PN}-4.7-fix-buildsystem.patch"
  39. )
  40. src_prepare() {
  41. cmake-utils_src_prepare
  42. # modules provided by dev-util/cmake and dev-cpp/eigen
  43. rm cmake/modules/Find{Eigen3,GLEW,OpenGL}.cmake || die
  44. sed \
  45. -e '/install(FILES AUTHORS/d' \
  46. -i CMakeLists.txt || die
  47. # use C++11 threads instead of boost::thread
  48. append-cxxflags -std=c++11
  49. }
  50. src_configure() {
  51. local mycmakeargs=(
  52. -DCGAL_INSTALL_LIB_DIR=$(get_libdir)
  53. -DWITH_CGAL_Qt3=OFF
  54. -DWITH_LEDA=OFF
  55. -DWITH_Eigen3=ON
  56. -DWITH_ZLIB=ON
  57. -DWITH_GMP="$(usex gmp)"
  58. -DWITH_GMPXX="$(usex gmp)"
  59. -DWITH_CGAL_Qt5="$(usex qt5)"
  60. -DWITH_MPFI="$(usex mpfi)"
  61. -DWITH_NTL="$(usex ntl)"
  62. )
  63. cmake-utils_src_configure
  64. }
  65. src_install() {
  66. cmake-utils_src_install
  67. if use examples; then
  68. dodoc -r examples demo
  69. fi
  70. if use doc; then
  71. docinto html/
  72. dodoc -r "${WORKDIR}"/doc_html/*
  73. fi
  74. }