cgal-4.3.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. CMAKE_BUILD_TYPE=Release
  5. inherit multilib cmake-utils
  6. MY_P=CGAL-${PV}
  7. PID=32995
  8. DPID=33000
  9. DESCRIPTION="C++ library for geometric algorithms and data structures"
  10. HOMEPAGE="http://www.cgal.org/ https://gforge.inria.fr/projects/cgal/"
  11. SRC_URI="
  12. http://gforge.inria.fr/frs/download.php/${PID}/${MY_P}.tar.xz
  13. doc? ( http://gforge.inria.fr/frs/download.php/${DPID}/${MY_P}-doc_html.tar.xz )"
  14. LICENSE="LGPL-3 GPL-3 Boost-1.0"
  15. SLOT="0"
  16. KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
  17. IUSE="doc examples +gmp mpfi qt4"
  18. RDEPEND="
  19. dev-libs/boost
  20. dev-libs/mpfr:0
  21. sys-libs/zlib
  22. x11-libs/libX11
  23. virtual/glu
  24. virtual/opengl
  25. gmp? ( dev-libs/gmp[cxx] )
  26. qt4? (
  27. dev-qt/qtgui:4
  28. dev-qt/qtopengl:4
  29. )
  30. mpfi? ( sci-libs/mpfi )"
  31. DEPEND="${RDEPEND}
  32. app-arch/xz-utils
  33. virtual/pkgconfig"
  34. S="${WORKDIR}/${MY_P}"
  35. DOCS="AUTHORS CHANGES* README"
  36. src_prepare() {
  37. cmake-utils_src_prepare
  38. sed \
  39. -e '/install(FILES AUTHORS/d' \
  40. -i CMakeLists.txt || die
  41. }
  42. src_configure() {
  43. local mycmakeargs+=(
  44. -DCGAL_INSTALL_LIB_DIR=$(get_libdir)
  45. -DWITH_CGAL_Qt3=OFF
  46. -DWITH_LEDA=OFF
  47. $(cmake-utils_use_with gmp)
  48. $(cmake-utils_use_with gmp GMPXX)
  49. $(cmake-utils_use_with qt4 CGAL_Qt4)
  50. $(cmake-utils_use_with mpfi)
  51. )
  52. cmake-utils_src_configure
  53. }
  54. src_install() {
  55. use doc && HTML_DOCS=( "${WORKDIR}"/doc_html/. )
  56. cmake-utils_src_install
  57. if use examples; then
  58. insinto /usr/share/doc/${PF}
  59. doins -r examples demo
  60. fi
  61. }