eigen-2.0.17.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit cmake-utils
  5. DESCRIPTION="C++ template library for linear algebra"
  6. HOMEPAGE="http://eigen.tuxfamily.org/"
  7. SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
  8. LICENSE="GPL-3"
  9. KEYWORDS="alpha amd64 ~arm ~hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
  10. SLOT="2"
  11. IUSE="debug doc examples"
  12. COMMON_DEPEND="
  13. examples? (
  14. dev-qt/qtgui:4
  15. dev-qt/qtopengl:4
  16. )"
  17. DEPEND="${COMMON_DEPEND}
  18. doc? ( app-doc/doxygen )"
  19. RDEPEND="${COMMON_DEPEND}
  20. !dev-cpp/eigen:0"
  21. MAKEOPTS+=" -j1"
  22. # bugs 426236, 455460, 467288
  23. RESTRICT="test"
  24. src_unpack() {
  25. unpack ${A}
  26. mv ${PN}* ${P} || die
  27. }
  28. src_configure() {
  29. # benchmarks (BTL) brings up damn load of external deps including fortran
  30. # compiler
  31. # library hangs up complete compilation proccess, test later
  32. mycmakeargs=(
  33. -DEIGEN_BUILD_LIB=OFF
  34. -DEIGEN_BUILD_BTL=OFF
  35. -DEIGEN_BUILD_PKGCONFIG=ON
  36. $(cmake-utils_use examples EIGEN_BUILD_DEMOS)
  37. )
  38. cmake-utils_src_configure
  39. }
  40. src_compile() {
  41. cmake-utils_src_compile
  42. if use doc; then
  43. cd "${CMAKE_BUILD_DIR}"
  44. emake doc
  45. fi
  46. }
  47. src_install() {
  48. cmake-utils_src_install
  49. if use doc; then
  50. cd "${CMAKE_BUILD_DIR}"/doc
  51. dohtml -r html/*
  52. fi
  53. if use examples; then
  54. cd "${CMAKE_BUILD_DIR}"/demos
  55. dobin mandelbrot/mandelbrot opengl/quaternion_demo
  56. fi
  57. }
  58. src_test() {
  59. mycmakeargs=(
  60. -DEIGEN_BUILD_TESTS=ON
  61. -DEIGEN_TEST_NO_FORTRAN=ON
  62. )
  63. cmake-utils_src_configure
  64. cmake-utils_src_compile
  65. cmake-utils_src_test
  66. }