umfpack-6.3.2.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright 1999-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit cmake-multilib toolchain-funcs
  5. Sparse_PV="7.6.0"
  6. Sparse_P="SuiteSparse-${Sparse_PV}"
  7. DESCRIPTION="Unsymmetric multifrontal sparse LU factorization library"
  8. HOMEPAGE="https://people.engr.tamu.edu/davis/suitesparse.html"
  9. SRC_URI="https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v${Sparse_PV}.tar.gz -> ${Sparse_P}.gh.tar.gz"
  10. LICENSE="GPL-2+"
  11. SLOT="0/6"
  12. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
  13. IUSE="debug doc +cholmod openmp static-libs test"
  14. RESTRICT="!test? ( test )"
  15. DEPEND=">=sci-libs/suitesparseconfig-${Sparse_PV}
  16. >=sci-libs/amd-3.3.1
  17. cholmod? ( >=sci-libs/cholmod-5.2.0:=[openmp?] )
  18. virtual/blas"
  19. RDEPEND="${DEPEND}"
  20. BDEPEND="doc? ( virtual/latex-base )"
  21. S="${WORKDIR}/${Sparse_P}/${PN^^}"
  22. pkg_pretend() {
  23. [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
  24. }
  25. pkg_setup() {
  26. [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
  27. }
  28. multilib_src_configure() {
  29. # Fortran is only used to compile additional demo programs that can be tested.
  30. local mycmakeargs=(
  31. -DBUILD_STATIC_LIBS=$(usex static-libs)
  32. -DUMFPACK_USE_CHOLMOD=$(usex cholmod)
  33. -DSUITESPARSE_DEMOS=$(usex test)
  34. )
  35. cmake_src_configure
  36. }
  37. multilib_src_test() {
  38. # Run simple demo first
  39. # Other demo files have issues making them unsuitable for testing
  40. ./umfpack_simple || die "failed testing umfpack_simple"
  41. }
  42. multilib_src_install() {
  43. if use doc; then
  44. pushd "${S}/Doc"
  45. rm -rf *.pdf
  46. emake
  47. popd
  48. DOCS="${S}/Doc/*.pdf"
  49. fi
  50. cmake_src_install
  51. }
  52. multilib_src_install_all() {
  53. use doc && einstalldocs
  54. use !static-libs && ( find "${ED}" -name "*.a" -delete || die )
  55. # strip .la files
  56. find "${ED}" -name '*.la' -delete || die
  57. }