Diff spqr-2.0.9-r3 with a spqr-3.0.3

/usr/portage/sci-libs/spqr/spqr-3.0.3.ebuild 2023-10-09 14:52:35.096368491 +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 toolchain-funcs
7

  
8
Sparse_PV="7.0.0"
9
Sparse_P="SuiteSparse-${Sparse_PV}"
6 10
DESCRIPTION="Multithreaded multifrontal sparse QR factorization library"
7 11
HOMEPAGE="https://people.engr.tamu.edu/davis/suitesparse.html"
8
SRC_URI="http://202.36.178.9/sage/${P}.tar.bz2"
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="GPL-2+"
11
SLOT="0"
12
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~loong ~ppc ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
13
IUSE="doc partition tbb"
14

  
15
BDEPEND="virtual/pkgconfig
16
	doc? ( virtual/latex-base )"
17
# We require the cholmod supernodal module that is enabled with
18
# USE=lapack, and cholmod has to have partition support if spqr is going
19
# to have it (the ./configure script for spqr checks this). Note that
20
# spqr links to metis directly, too.
21
DEPEND="
22
	virtual/lapack
23
	=sci-libs/cholmod-3*[lapack,partition?]
24
	partition? ( >=sci-libs/metis-5.1.0 )
25
	tbb? ( <dev-cpp/tbb-2021:= )"
15
SLOT="0/3"
16
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
17
IUSE="doc openmp test"
18
RESTRICT="!test? ( test )"
19

  
20
DEPEND=">=sci-libs/suitesparseconfig-${Sparse_PV}
21
	>=sci-libs/amd-3.0.3
22
	>=sci-libs/colamd-3.0.3
23
	>=sci-libs/cholmod-4.0.3
24
	virtual/blas"
26 25
RDEPEND="${DEPEND}"
26
BDEPEND="doc? ( virtual/latex-base )"
27

  
28
S="${WORKDIR}/${Sparse_P}/${PN^^}"
29

  
30
pkg_pretend() {
31
	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
32
}
27 33

  
28
src_configure() {
29
	econf \
30
		--disable-static \
31
		$(use_with doc) \
32
		$(use_with partition) \
33
		$(use_with tbb)
34
pkg_setup() {
35
	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
34 36
}
35 37

  
36
src_install() {
37
	default
38
multilib_src_configure() {
39
	local mycmakeargs=(
40
		-DNSTATIC=ON
41
		-DNOPENMP=$(usex openmp OFF ON)
42
		-DDEMO=$(usex test)
43
	)
44
	cmake_src_configure
45
}
46

  
47
multilib_src_test() {
48
	# Run demo files
49
	./qrsimple  < "${S}"/Matrix/ash219.mtx || die "failed testing"
50
	./qrsimplec < "${S}"/Matrix/ash219.mtx || die "failed testing"
51
	./qrsimple  < "${S}"/Matrix/west0067.mtx || die "failed testing"
52
	./qrsimplec < "${S}"/Matrix/west0067.mtx || die "failed testing"
53
	./qrdemo < "${S}"/Matrix/a2.mtx || die "failed testing"
54
	./qrdemo < "${S}"/Matrix/r2.mtx || die "failed testing"
55
	./qrdemo < "${S}"/Matrix/a04.mtx || die "failed testing"
56
	./qrdemo < "${S}"/Matrix/a2.mtx || die "failed testing"
57
	./qrdemo < "${S}"/Matrix/west0067.mtx || die "failed testing"
58
	./qrdemo < "${S}"/Matrix/c2.mtx || die "failed testing"
59
	./qrdemo < "${S}"/Matrix/a0.mtx || die "failed testing"
60
	./qrdemo < "${S}"/Matrix/lfat5b.mtx || die "failed testing"
61
	./qrdemo < "${S}"/Matrix/bfwa62.mtx || die "failed testing"
62
	./qrdemo < "${S}"/Matrix/LFAT5.mtx || die "failed testing"
63
	./qrdemo < "${S}"/Matrix/b1_ss.mtx || die "failed testing"
64
	./qrdemo < "${S}"/Matrix/bcspwr01.mtx || die "failed testing"
65
	./qrdemo < "${S}"/Matrix/lpi_galenet.mtx || die "failed testing"
66
	./qrdemo < "${S}"/Matrix/lpi_itest6.mtx || die "failed testing"
67
	./qrdemo < "${S}"/Matrix/ash219.mtx || die "failed testing"
68
	./qrdemo < "${S}"/Matrix/a4.mtx || die "failed testing"
69
	./qrdemo < "${S}"/Matrix/s32.mtx || die "failed testing"
70
	./qrdemo < "${S}"/Matrix/c32.mtx || die "failed testing"
71
	./qrdemo < "${S}"/Matrix/lp_share1b.mtx || die "failed testing"
72
	./qrdemo < "${S}"/Matrix/a1.mtx || die "failed testing"
73
	./qrdemo < "${S}"/Matrix/GD06_theory.mtx || die "failed testing"
74
	./qrdemo < "${S}"/Matrix/GD01_b.mtx || die "failed testing"
75
	./qrdemo < "${S}"/Matrix/Tina_AskCal_perm.mtx || die "failed testing"
76
	./qrdemo < "${S}"/Matrix/Tina_AskCal.mtx || die "failed testing"
77
	./qrdemo < "${S}"/Matrix/GD98_a.mtx || die "failed testing"
78
	./qrdemo < "${S}"/Matrix/Ragusa16.mtx || die "failed testing"
79
	./qrdemo < "${S}"/Matrix/young1c.mtx || die "failed testing"
80
	./qrdemo < "${S}"/Matrix/lp_e226_transposed.mtx || die "failed testing"
81
	./qrdemoc < "${S}"/Matrix/a2.mtx || die "failed testing"
82
	./qrdemoc < "${S}"/Matrix/r2.mtx || die "failed testing"
83
	./qrdemoc < "${S}"/Matrix/a04.mtx || die "failed testing"
84
	./qrdemoc < "${S}"/Matrix/a2.mtx || die "failed testing"
85
	./qrdemoc < "${S}"/Matrix/west0067.mtx || die "failed testing"
86
	./qrdemoc < "${S}"/Matrix/c2.mtx || die "failed testing"
87
	./qrdemoc < "${S}"/Matrix/a0.mtx || die "failed testing"
88
	./qrdemoc < "${S}"/Matrix/lfat5b.mtx || die "failed testing"
89
	./qrdemoc < "${S}"/Matrix/bfwa62.mtx || die "failed testing"
90
	./qrdemoc < "${S}"/Matrix/LFAT5.mtx || die "failed testing"
91
	./qrdemoc < "${S}"/Matrix/b1_ss.mtx || die "failed testing"
92
	./qrdemoc < "${S}"/Matrix/bcspwr01.mtx || die "failed testing"
93
	./qrdemoc < "${S}"/Matrix/lpi_galenet.mtx || die "failed testing"
94
	./qrdemoc < "${S}"/Matrix/lpi_itest6.mtx || die "failed testing"
95
	./qrdemoc < "${S}"/Matrix/ash219.mtx || die "failed testing"
96
	./qrdemoc < "${S}"/Matrix/a4.mtx || die "failed testing"
97
	./qrdemoc < "${S}"/Matrix/s32.mtx || die "failed testing"
98
	./qrdemoc < "${S}"/Matrix/c32.mtx || die "failed testing"
99
	./qrdemoc < "${S}"/Matrix/lp_share1b.mtx || die "failed testing"
100
	./qrdemoc < "${S}"/Matrix/a1.mtx || die "failed testing"
101
	./qrdemoc < "${S}"/Matrix/GD06_theory.mtx || die "failed testing"
102
	./qrdemoc < "${S}"/Matrix/GD01_b.mtx || die "failed testing"
103
	./qrdemoc < "${S}"/Matrix/Tina_AskCal_perm.mtx || die "failed testing"
104
	./qrdemoc < "${S}"/Matrix/Tina_AskCal.mtx || die "failed testing"
105
	./qrdemoc < "${S}"/Matrix/GD98_a.mtx || die "failed testing"
106
	./qrdemoc < "${S}"/Matrix/Ragusa16.mtx || die "failed testing"
107
	./qrdemoc < "${S}"/Matrix/young1c.mtx || die "failed testing"
108
	./qrdemoc < "${S}"/Matrix/lp_e226_transposed.mtx || die "failed testing"
109
}
38 110

  
39
	# no static archives
40
	find "${D}" -name '*.la' -delete || die
111
multilib_src_install() {
112
	if use doc; then
113
		pushd "${S}/Doc"
114
		emake clean
115
		rm -rf *.pdf
116
		emake
117
		popd
118
		DOCS="${S}/Doc/*.pdf"
119
	fi
120
	cmake_src_install
41 121
}
Thank you!