cxsparse-4.3.1.ebuild 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Copyright 1999-2023 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="Extended sparse matrix package"
  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="LGPL-2.1"
  11. SLOT="0/4"
  12. KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
  13. IUSE="debug doc static-libs test"
  14. RESTRICT="!test? ( test )"
  15. DEPEND=">=sci-libs/suitesparseconfig-${Sparse_PV}"
  16. RDEPEND="${DEPEND}"
  17. S="${WORKDIR}/${Sparse_P}/CXSparse"
  18. multilib_src_configure() {
  19. CMAKE_BUILD_TYPE=$(usex debug RelWithDebInfo Release)
  20. local mycmakeargs=(
  21. -DBUILD_STATIC_LIBS=$(usex static-libs)
  22. -DSUITESPARSE_DEMOS=$(usex test)
  23. )
  24. cmake_src_configure
  25. }
  26. multilib_src_test() {
  27. # Programs assume that they can access the Matrix folder in ${S}
  28. ln -s "${S}/Matrix" || die "cannot link to the Matrix folder"
  29. # Run demo files
  30. ./cs_idemo < Matrix/t2 || die "failed testing"
  31. ./cs_ldemo < Matrix/t2 || die "failed testing"
  32. ./cs_demo1 < Matrix/t1 || die "failed testing"
  33. ./cs_demo2 < Matrix/t1 || die "failed testing"
  34. ./cs_demo2 < Matrix/fs_183_1 || die "failed testing"
  35. ./cs_demo2 < Matrix/west0067 || die "failed testing"
  36. ./cs_demo2 < Matrix/lp_afiro || die "failed testing"
  37. ./cs_demo2 < Matrix/ash219 || die "failed testing"
  38. ./cs_demo2 < Matrix/mbeacxc || die "failed testing"
  39. ./cs_demo2 < Matrix/bcsstk01 || die "failed testing"
  40. ./cs_demo3 < Matrix/bcsstk01 || die "failed testing"
  41. ./cs_demo2 < Matrix/bcsstk16 || die "failed testing"
  42. ./cs_demo3 < Matrix/bcsstk16 || die "failed testing"
  43. ./cs_di_demo1 < Matrix/t1 || die "failed testing"
  44. ./cs_di_demo2 < Matrix/t1 || die "failed testing"
  45. ./cs_di_demo2 < Matrix/fs_183_1 || die "failed testing"
  46. ./cs_di_demo2 < Matrix/west0067 || die "failed testing"
  47. ./cs_di_demo2 < Matrix/lp_afiro || die "failed testing"
  48. ./cs_di_demo2 < Matrix/ash219 || die "failed testing"
  49. ./cs_di_demo2 < Matrix/mbeacxc || die "failed testing"
  50. ./cs_di_demo2 < Matrix/bcsstk01 || die "failed testing"
  51. ./cs_di_demo3 < Matrix/bcsstk01 || die "failed testing"
  52. ./cs_di_demo2 < Matrix/bcsstk16 || die "failed testing"
  53. ./cs_di_demo3 < Matrix/bcsstk16 || die "failed testing"
  54. ./cs_dl_demo1 < Matrix/t1 || die "failed testing"
  55. ./cs_dl_demo2 < Matrix/t1 || die "failed testing"
  56. ./cs_dl_demo2 < Matrix/fs_183_1 || die "failed testing"
  57. ./cs_dl_demo2 < Matrix/west0067 || die "failed testing"
  58. ./cs_dl_demo2 < Matrix/lp_afiro || die "failed testing"
  59. ./cs_dl_demo2 < Matrix/ash219 || die "failed testing"
  60. ./cs_dl_demo2 < Matrix/mbeacxc || die "failed testing"
  61. ./cs_dl_demo2 < Matrix/bcsstk01 || die "failed testing"
  62. ./cs_dl_demo3 < Matrix/bcsstk01 || die "failed testing"
  63. ./cs_dl_demo2 < Matrix/bcsstk16 || die "failed testing"
  64. ./cs_dl_demo3 < Matrix/bcsstk16 || die "failed testing"
  65. ./cs_ci_demo1 < Matrix/t2 || die "failed testing"
  66. ./cs_ci_demo2 < Matrix/t2 || die "failed testing"
  67. ./cs_ci_demo2 < Matrix/t3 || die "failed testing"
  68. ./cs_ci_demo2 < Matrix/t4 || die "failed testing"
  69. ./cs_ci_demo2 < Matrix/c_west0067 || die "failed testing"
  70. ./cs_ci_demo2 < Matrix/c_mbeacxc || die "failed testing"
  71. ./cs_ci_demo2 < Matrix/young1c || die "failed testing"
  72. ./cs_ci_demo2 < Matrix/qc324 || die "failed testing"
  73. ./cs_ci_demo2 < Matrix/neumann || die "failed testing"
  74. ./cs_ci_demo2 < Matrix/c4 || die "failed testing"
  75. ./cs_ci_demo3 < Matrix/c4 || die "failed testing"
  76. ./cs_ci_demo2 < Matrix/mhd1280b || die "failed testing"
  77. ./cs_ci_demo3 < Matrix/mhd1280b || die "failed testing"
  78. ./cs_cl_demo1 < Matrix/t2 || die "failed testing"
  79. ./cs_cl_demo2 < Matrix/t2 || die "failed testing"
  80. ./cs_cl_demo2 < Matrix/t3 || die "failed testing"
  81. ./cs_cl_demo2 < Matrix/t4 || die "failed testing"
  82. ./cs_cl_demo2 < Matrix/c_west0067 || die "failed testing"
  83. ./cs_cl_demo2 < Matrix/c_mbeacxc || die "failed testing"
  84. ./cs_cl_demo2 < Matrix/young1c || die "failed testing"
  85. ./cs_cl_demo2 < Matrix/qc324 || die "failed testing"
  86. ./cs_cl_demo2 < Matrix/neumann || die "failed testing"
  87. ./cs_cl_demo2 < Matrix/c4 || die "failed testing"
  88. ./cs_cl_demo3 < Matrix/c4 || die "failed testing"
  89. ./cs_cl_demo2 < Matrix/mhd1280b || die "failed testing"
  90. ./cs_cl_demo3 < Matrix/mhd1280b || die "failed testing"
  91. }
  92. multilib_src_install() {
  93. if use doc; then
  94. pushd "${S}/Doc"
  95. emake clean
  96. rm -rf *.pdf
  97. emake
  98. popd
  99. DOCS="${S}/Doc/*.pdf"
  100. fi
  101. cmake_src_install
  102. }
  103. multilib_src_install_all() {
  104. use doc && einstalldocs
  105. use !static-libs && ( find "${ED}" -name "*.a" -delete || die )
  106. # strip .la files
  107. find "${ED}" -name '*.la' -delete || die
  108. }