colamd-3.3.2.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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
  5. Sparse_PV="7.6.0"
  6. Sparse_P="SuiteSparse-${Sparse_PV}"
  7. DESCRIPTION="Column approximate minimum degree ordering algorithm"
  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="BSD"
  11. SLOT="0"
  12. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
  13. IUSE="debug doc static-libs test"
  14. RESTRICT="!test? ( test ) mirror"
  15. DEPEND=">=sci-libs/suitesparseconfig-${Sparse_PV}"
  16. REPEND="${DEPEND}"
  17. BDEPEND="
  18. virtual/pkgconfig
  19. doc? ( virtual/latex-base )
  20. "
  21. S="${WORKDIR}/${Sparse_P}/${PN^^}"
  22. multilib_src_configure() {
  23. CMAKE_BUILD_TYPE=$(usex debug RelWithDebInfo Release)
  24. local mycmakeargs=(
  25. -DBUILD_STATIC_LIBS=$(usex static-libs)
  26. -DSUITESPARSE_DEMOS=$(usex test)
  27. )
  28. cmake_src_configure
  29. }
  30. multilib_src_test() {
  31. # Run demo files
  32. ./colamd_example > colamd_example.out || die "failed to run test colamd_example"
  33. diff "${S}"/Demo/colamd_example.out colamd_example.out || die "failed testing colamd_example"
  34. ./colamd_l_example > colamd_l_example.out || die "failed to run test colamd_l_example"
  35. diff "${S}"/Demo/colamd_l_example.out colamd_l_example.out || die "failed testing colamd_l_example"
  36. }
  37. multilib_src_install_all() {
  38. use doc && einstalldocs
  39. use !static-libs && ( find "${ED}" -name "*.a" -delete || die )
  40. # strip .la files
  41. find "${ED}" -name '*.la' -delete || die
  42. }