summaryrefslogtreecommitdiff
path: root/sci-libs/cholmod
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/cholmod')
-rw-r--r--sci-libs/cholmod/Manifest4
-rw-r--r--sci-libs/cholmod/cholmod-4.0.3.ebuild92
-rw-r--r--sci-libs/cholmod/metadata.xml12
3 files changed, 106 insertions, 2 deletions
diff --git a/sci-libs/cholmod/Manifest b/sci-libs/cholmod/Manifest
index 9f95e1086ef0..803b5f075c0f 100644
--- a/sci-libs/cholmod/Manifest
+++ b/sci-libs/cholmod/Manifest
@@ -1,5 +1,7 @@
+DIST SuiteSparse-7.0.0.gh.tar.gz 64884962 BLAKE2B 06c6cf54ffae188f5179e0cd45523700448d8999b44d6b1aeb3dfb99ccf34a570f6aff600988a144c68a4a2d8f41e32f7145e09349aed3bd889501ea031c8340 SHA512 50b1cd7bab6e4c063984162ed803fd13b69df7f67efe8ce7af15eace6b0ccd1669b6e57daa59511fd9531a847433cda49c1f52bfff234031af0d79e7fbd6423e
DIST cholmod-3.0.13.tar.bz2 696002 BLAKE2B 40a065fe1a3585897b3ca554a25fa80ffc68ac70798f2f803e34a231ec4f532d113a3d00ab7ab61f5eb02503a84e1459cdb7e96cb0b0d1dc6975ed3d533104fe SHA512 c6c80d099386bac27e385a1b8ee8941cd2fb4f2dcfcf302b4b17d6477ac9ee17ad8030aae9191f92576dfaeb521e2c98ec24e867281c2405e42f95580e14f0ab
DIST cholmod-3.0.14.tar.bz2 696981 BLAKE2B 855927c18833235b3f0835bfba455d83957b9161c0ee885c2d31d126f0f473067f55bcf2cfa163c72efb5de573589ffa54b484a8cf89bc44c9dbf64d43fda5d9 SHA512 f8c12fc3c8787be38bca6c6f84a8279c1380fbe4fabbfba754235fdb042d7050bfb7b5a21ea87ef59dbd5184d28e8cb7667966c38f5dcad78fe8d47111896a3c
EBUILD cholmod-3.0.13.ebuild 1628 BLAKE2B ec6482a2ccab266bdbbc6fa1a59a1a468ab2794ec4ae25dd6e24347600a6878c9e9eddb4ccfdf6b43932d40a49ead6760235bacc682d4a6b844b519c574d6b46 SHA512 a0e1c08a3c65e8d8f15f003f27235e5323a707471d429f4106185d677ede8e7767db0cf3e13bc07405f76e5c62a57739cee51e7862f4515b6525cfa5b5ea5172
EBUILD cholmod-3.0.14.ebuild 1623 BLAKE2B 87870b0b3a5d02d5bda9315509763a7caba965a91e68cc983640a0fee18dde096eba74eef9c21861ba5fcf4cd997b0a1ac8ceaa0367d0079a57463d17ceddd30 SHA512 055502fe859af8d844d56d7387421b211b2a5a977c380b4e49ee5cf70c7fa9fdc1e2fccb63c913f1b981073c906eb9f9966f4a5cccbf90b2578514c48f08cf10
-MISC metadata.xml 808 BLAKE2B fb5a3c0c876e6dac5f4efbff1c22597f8749132a00c52594711d5a660be2522b66b664db2c3f5928c1678c6bf8fbdb5e369c687089197f32db229990c22248d2 SHA512 da085c315c54f7e8110efe130b152c87dad1508b91686da13ea16ef902b0e3d355deb0c414e341bd12b030065cea637843c321b779a07e7341266bde439a565b
+EBUILD cholmod-4.0.3.ebuild 2974 BLAKE2B c77f759479103097bd494ecabf35b64543b9edeb42e1c3a0a98effddfeb1498909e0d7d52ee245bca29abee718accc220970f27500dc11105f75fa6ba58e4c89 SHA512 40dce0c939a3b16205b336482ec621118600f6ed34e83a897dc1b53a1c655c9f3147e5f532d3a50bfbcc44fd457f6dc78c5770ae2e8056c38715459412d6b35b
+MISC metadata.xml 1110 BLAKE2B 50621ae9e1269f396a32aff8e7b1c94ce65808efd15a2a353cece3fc7db7c50e3e5c3f427df890cb73d9c3d5fa8b41cf268d1cac84a8af792a2ffa1a869c9c8a SHA512 a20d04f8d9370b4df5d19f1f6393f57ab1812b7ace62682a5006ef69849ba0d587c9447237cdf072988a8ce890265ce0ed2d384eb35a466f752723d7ba3770f7
diff --git a/sci-libs/cholmod/cholmod-4.0.3.ebuild b/sci-libs/cholmod/cholmod-4.0.3.ebuild
new file mode 100644
index 000000000000..4ab1d6076859
--- /dev/null
+++ b/sci-libs/cholmod/cholmod-4.0.3.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib toolchain-funcs
+
+Sparse_PV="7.0.0"
+Sparse_P="SuiteSparse-${Sparse_PV}"
+DESCRIPTION="Sparse Cholesky factorization and update/downdate library"
+HOMEPAGE="https://people.engr.tamu.edu/davis/suitesparse.html"
+SRC_URI="https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v${Sparse_PV}.tar.gz -> ${Sparse_P}.gh.tar.gz"
+
+LICENSE="LGPL-2.1+ modify? ( GPL-2+ ) matrixops? ( GPL-2+ )"
+SLOT="0/4"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+cholesky cuda doc openmp +matrixops +modify +partition +supernodal test"
+RESTRICT="!test? ( test )"
+
+DEPEND=">=sci-libs/suitesparseconfig-${Sparse_PV}
+ >=sci-libs/amd-3.0.3
+ >=sci-libs/colamd-3.0.3
+ supernodal? ( virtual/lapack )
+ partition? (
+ >=sci-libs/camd-3.0.3
+ >=sci-libs/ccolamd-3.0.3
+ )
+ cuda? (
+ dev-util/nvidia-cuda-toolkit
+ x11-drivers/nvidia-drivers
+ )"
+RDEPEND="${DEPEND}"
+BDEPEND="doc? ( virtual/latex-base )"
+
+REQUIRED_USE="supernodal? ( cholesky )
+ modify? ( cholesky )
+ test? ( cholesky matrixops supernodal )"
+
+S="${WORKDIR}/${Sparse_P}/${PN^^}"
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+multilib_src_configure() {
+ # Not that "N" prefixed options are negative options
+ # so they need to be turned OFF if you want that option.
+ # Fortran is turned off as it is only used to compile (untested) demo programs.
+ local mycmakeargs=(
+ -DNSTATIC=ON
+ -DENABLE_CUDA=$(usex cuda)
+ -DNOPENMP=$(usex openmp OFF ON)
+ -DNFORTRAN=ON
+ -DNCHOLESKY=$(usex cholesky OFF ON)
+ -DNMATRIXOPS=$(usex matrixops OFF ON)
+ -DNMODIFY=$(usex modify OFF ON)
+ -DNPARTITION=$(usex partition OFF ON)
+ -DNSUPERNODAL=$(usex supernodal OFF ON)
+ -DDEMO=$(usex test)
+ )
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ # Run demo files
+ ./cholmod_demo < "${S}"/Demo/Matrix/bcsstk01.tri || die "failed testing"
+ ./cholmod_l_demo < "${S}"/Demo/Matrix/bcsstk01.tri || die "failed testing"
+ ./cholmod_demo < "${S}"/Demo/Matrix/lp_afiro.tri || die "failed testing"
+ ./cholmod_l_demo < "${S}"/Demo/Matrix/lp_afiro.tri || die "failed testing"
+ ./cholmod_demo < "${S}"/Demo/Matrix/can___24.mtx || die "failed testing"
+ ./cholmod_l_demo < "${S}"/Demo/Matrix/can___24.mtx || die "failed testing"
+ ./cholmod_demo < "${S}"/Demo/Matrix/c.tri || die "failed testing"
+ ./cholmod_l_demo < "${S}"/Demo/Matrix/c.tri || die "failed testing"
+ ./cholmod_simple < "${S}"/Demo/Matrix/c.tri || die "failed testing"
+ ./cholmod_simple < "${S}"/Demo/Matrix/can___24.mtx || die "failed testing"
+ ./cholmod_simple < "${S}"/Demo/Matrix/bcsstk01.tri || die "failed testing"
+}
+
+multilib_src_install() {
+ if use doc; then
+ pushd "${S}/Doc"
+ rm -rf *.pdf
+ emake
+ popd
+ DOCS="${S}/Doc/*.pdf"
+ fi
+ cmake_src_install
+}
diff --git a/sci-libs/cholmod/metadata.xml b/sci-libs/cholmod/metadata.xml
index 9ba80d3ef6cc..4b106db7f098 100644
--- a/sci-libs/cholmod/metadata.xml
+++ b/sci-libs/cholmod/metadata.xml
@@ -7,6 +7,9 @@
</maintainer>
<use>
<flag name="cuda">Use nvidia cuda toolkit for speeding up computations</flag>
+ <flag name="cholesky">
+ Enable sparse Cholesky factorisation
+ </flag>
<flag name="matrixops">
Support basic sparse and dense matrix operations (add, multiply,
scale, et cetera)
@@ -17,7 +20,14 @@
</flag>
<flag name="partition">
Enable graph partitioning and graph-partition-based orderings
- through <pkg>sci-libs/metis</pkg> or <pkg>sci-libs/parmetis</pkg>
+ through <pkg>sci-libs/metis</pkg> (using a bundled fork in 4.0.0+)
+ or <pkg>sci-libs/parmetis</pkg>
+ </flag>
+ <flag name="supernodal">
+ supernodal cholesky factorisation
</flag>
</use>
+ <upstream>
+ <remote-id type="github">DrTimothyAldenDavis/SuiteSparse</remote-id>
+ </upstream>
</pkgmetadata>