Diff ldl-2.2.6 with a ldl-3.0.3

/usr/portage/sci-libs/ldl/ldl-3.0.3.ebuild 2023-10-09 14:52:35.080368491 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
inherit cmake-multilib
7

  
8
Sparse_PV="7.0.0"
9
Sparse_P="SuiteSparse-${Sparse_PV}"
6 10
DESCRIPTION="Simple but educational LDL^T matrix factorization algorithm"
7
HOMEPAGE="http://people.engr.tamu.edu/davis/suitesparse.html"
8
SRC_URI="http://202.36.178.9/sage/${P}.tar.bz2"
11
HOMEPAGE="https://people.engr.tamu.edu/davis/suitesparse.html"
12
SRC_URI="https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v${Sparse_PV}.tar.gz -> ${Sparse_P}.gh.tar.gz"
9 13

  
10 14
LICENSE="LGPL-2.1+"
11
SLOT="0"
12
KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
13
IUSE="doc static-libs"
14

  
15
BDEPEND="virtual/pkgconfig
16
	doc? ( virtual/latex-base )"
17
DEPEND="sci-libs/suitesparseconfig"
15
SLOT="0/3"
16
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
17
IUSE="doc test"
18
RESTRICT="!test? ( test )"
19

  
20
DEPEND=">=sci-libs/suitesparseconfig-${Sparse_PV}
21
	>=sci-libs/amd-3.0.3"
18 22
RDEPEND="${DEPEND}"
23
BDEPEND="doc? ( virtual/latex-base )"
24

  
25
S="${WORKDIR}/${Sparse_P}/${PN^^}"
26

  
27
multilib_src_configure() {
28
	local mycmakeargs=(
29
		-DNSTATIC=ON
30
		-DDEMO=$(usex test)
31
	)
32
	cmake_src_configure
33
}
34

  
35
multilib_src_test() {
36
	# Some programs assume that they can access the Matrix folder in ${S}
37
	ln -s "${S}/Matrix" || die "cannot link to the Matrix folder"
38
	# Run demo files
39
	local demofiles=(
40
		ldlsimple
41
		ldllsimple
42
		ldlmain
43
		ldllmain
44
		ldlamd
45
		ldllamd
46
	)
47
	for i in ${demofiles[@]}; do
48
		./"${i}" > "${i}.out" || die "failed to run test ${i}"
49
		diff "${S}/Demo/${i}.out" "${i}.out" || die "failed testing ${i}"
50
	done
51
}
19 52

  
20
src_configure() {
21
	econf \
22
		$(use_with doc) \
23
		$(use_enable static-libs static)
53
multilib_src_install() {
54
	if use doc; then
55
		pushd "${S}/Doc"
56
		rm -rf *.pdf
57
		emake
58
		popd
59
		DOCS="${S}/Doc/*.pdf"
60
	fi
61
	cmake_src_install
24 62
}
Thank you!