summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-libs/ldl/Manifest1
-rw-r--r--sci-libs/ldl/ldl-3.0.3.ebuild62
-rw-r--r--sci-libs/ldl/metadata.xml3
3 files changed, 66 insertions, 0 deletions
diff --git a/sci-libs/ldl/Manifest b/sci-libs/ldl/Manifest
index f8c366affa12..e7ab12f27e1c 100644
--- a/sci-libs/ldl/Manifest
+++ b/sci-libs/ldl/Manifest
@@ -1 +1,2 @@
+DIST SuiteSparse-7.0.0.gh.tar.gz 64884962 BLAKE2B 06c6cf54ffae188f5179e0cd45523700448d8999b44d6b1aeb3dfb99ccf34a570f6aff600988a144c68a4a2d8f41e32f7145e09349aed3bd889501ea031c8340 SHA512 50b1cd7bab6e4c063984162ed803fd13b69df7f67efe8ce7af15eace6b0ccd1669b6e57daa59511fd9531a847433cda49c1f52bfff234031af0d79e7fbd6423e
DIST ldl-2.2.6.tar.bz2 342923 BLAKE2B 7acf1a82824de013fe9a7742fb2d5c44c86de96e95d1d7408106d4af420dc3655ab7533eb80592b52523245c7545bc246bf129712547ff6eba856a807c78b6ad SHA512 266c9e62c474a6a9b2d7f74aa580e313fbe4b322197236ba6fbbab6d1756348cf146c1d807ea6d8d0e5941cedc48298e8437aaf386dd6c433dcaf41a9d0b7371
diff --git a/sci-libs/ldl/ldl-3.0.3.ebuild b/sci-libs/ldl/ldl-3.0.3.ebuild
new file mode 100644
index 000000000000..942db5737628
--- /dev/null
+++ b/sci-libs/ldl/ldl-3.0.3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+Sparse_PV="7.0.0"
+Sparse_P="SuiteSparse-${Sparse_PV}"
+DESCRIPTION="Simple but educational LDL^T matrix factorization algorithm"
+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+"
+SLOT="0/3"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+DEPEND=">=sci-libs/suitesparseconfig-${Sparse_PV}
+ >=sci-libs/amd-3.0.3"
+RDEPEND="${DEPEND}"
+BDEPEND="doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/${Sparse_P}/${PN^^}"
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DNSTATIC=ON
+ -DDEMO=$(usex test)
+ )
+ cmake_src_configure
+}
+
+multilib_src_test() {
+ # Some programs assume that they can access the Matrix folder in ${S}
+ ln -s "${S}/Matrix"
+ # Run demo files
+ local demofiles=(
+ ldlsimple
+ ldllsimple
+ ldlmain
+ ldllmain
+ ldlamd
+ ldllamd
+ )
+ for i in ${demofiles}; do
+ ./"${i}" > "${i}.out"
+ diff "${S}/Demo/${i}.out" "${i}.out" || die "failed testing ${i}"
+ done
+}
+
+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/ldl/metadata.xml b/sci-libs/ldl/metadata.xml
index e6396c0864b0..c450822b982c 100644
--- a/sci-libs/ldl/metadata.xml
+++ b/sci-libs/ldl/metadata.xml
@@ -16,4 +16,7 @@
consists of a total of only 49 lines of code. The package is written
in C, and includes a MATLAB interface.
</longdescription>
+ <upstream>
+ <remote-id type="github">DrTimothyAldenDavis/SuiteSparse</remote-id>
+ </upstream>
</pkgmetadata>