commit:     33e95ae60ebe998a9e446e2b8b8acc57c55e79dd
Author:     François Bissey <frp.bissey <AT> gmail <DOT> com>
AuthorDate: Mon Jun  5 21:13:25 2023 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Jun 20 00:01:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33e95ae6

sci-libs/ldl: add 3.0.3

Signed-off-by: François Bissey <frp.bissey <AT> gmail.com>
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-libs/ldl/Manifest         |  1 +
 sci-libs/ldl/ldl-3.0.3.ebuild | 62 +++++++++++++++++++++++++++++++++++++++++++
 sci-libs/ldl/metadata.xml     |  3 +++
 3 files changed, 66 insertions(+)

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>

Reply via email to