cholmod-2.1.2.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools-utils multilib toolchain-funcs
  5. DESCRIPTION="Sparse Cholesky factorization and update/downdate library"
  6. HOMEPAGE="http://www.cise.ufl.edu/research/sparse/cholmod/"
  7. SRC_URI="https://dev.gentoo.org/~bicatali/distfiles/${P}.tar.bz2"
  8. LICENSE="minimal? ( LGPL-2.1 ) !minimal? ( GPL-2 )"
  9. SLOT="0"
  10. KEYWORDS="~alpha amd64 ~arm hppa ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
  11. IUSE="cuda doc lapack metis minimal static-libs"
  12. RDEPEND="
  13. >=sci-libs/amd-2.3
  14. >=sci-libs/colamd-2.8
  15. cuda? ( x11-drivers/nvidia-drivers dev-util/nvidia-cuda-toolkit )
  16. lapack? ( virtual/lapack )
  17. metis? (
  18. >=sci-libs/camd-2.3
  19. >=sci-libs/ccolamd-2.8
  20. || ( sci-libs/metis sci-libs/parmetis ) )"
  21. DEPEND="${RDEPEND}
  22. virtual/pkgconfig
  23. doc? ( virtual/latex-base )"
  24. src_prepare() {
  25. # bug #399483 does not build with parmetis-3.2
  26. has_version "=sci-libs/parmetis-3.2*" && \
  27. epatch "${FILESDIR}"/${PN}-1.7.4-parmetis32.patch
  28. }
  29. src_configure() {
  30. local lapack_libs=no
  31. local blas_libs=no
  32. if use lapack; then
  33. blas_libs=$($(tc-getPKG_CONFIG) --libs blas)
  34. lapack_libs=$($(tc-getPKG_CONFIG) --libs lapack)
  35. fi
  36. local myeconfargs=(
  37. --with-blas="${blas_libs}"
  38. --with-lapack="${lapack_libs}"
  39. $(use_with doc)
  40. $(use_with !minimal modify)
  41. $(use_with !minimal matrixops)
  42. $(use_with !minimal partition)
  43. $(use_with metis camd)
  44. $(use_with metis partition)
  45. $(use_with lapack supernodal)
  46. )
  47. if use cuda; then
  48. myeconfargs+=(
  49. --with-cuda
  50. --with-cublas-libs="-L${EPREFIX}/opt/cuda/$(get_libdir) -lcublas"
  51. --with-cublas-cflags="-I${EPREFIX}/opt/cuda/include"
  52. )
  53. fi
  54. autotools-utils_src_configure
  55. }