Skip to content

Commit 9f22cba

Browse files
committed
sci-libs/suitesparse: bump to version 5.3.0
With update to 5.3.0 the package no longer comes in several shared packages, but in a single package containing the complete suite of sparse matrix packages. Package-Manager: Portage-2.3.51, Repoman-2.3.12 Manifest-Sign-Key: 0x2E246A4E715AA683 Signed-off-by: Bernd Waibel <[email protected]>
1 parent 70a091d commit 9f22cba

File tree

5 files changed

+199
-0
lines changed

5 files changed

+199
-0
lines changed

sci-libs/suitesparse/Manifest

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
AUX suitesparse-5.3.0-Makefile.patch 480 BLAKE2B d4bc333e6a8baa5684076f3a579ba58de446549f68a87df53a77286ef550a68fdfb9e3a874facb6174ccbe8ec2dd625ac5dc814ac90f973b54261bf0be6e4d6a SHA512 75d454965e8390d656784a015f826becd273279c21e01afe10e4801b26301613a787f3beb46cf7f172840db4d1253d57b2bf5f72ca03c8bed2ae77ce68302ec4
2+
AUX suitesparse-5.3.0-config.patch 531 BLAKE2B d8f627b4f4278f0d934fb1800ced683139bf47354e8f1c221f9bd6ea380223c8065df0a802bc2f757d3a24bf04c67b523a1601757a6da5d899b8d2f64446ac5a SHA512 ba45ad732f301d9da6783dc6519ac63cb4693b4a1dfed8f35496097f5e7dd10579cc29e5a4ef0b4f2cbbdfe7ce0a6943ff733fa6873d5268869a8a8013d21628
3+
DIST suitesparse-5.3.0.tar.gz 50500894 BLAKE2B 6af9fd39052a55a6f07dbac2e9199455747e61ab08be3e65ec5bb9cf2d0b42dd240edd9abfba560217232482b59ee74be3911de1b4bdf5e16dce77b719282e9e SHA512 a7ac655c5454c8270a52ece802946893f02d12c1bfb10546e24cd8355e59b733961526e9d702cd649b90b47bb325ace5110f70054db3754c732bc3ec1fa42cf9
4+
EBUILD suitesparse-5.3.0.ebuild 3742 BLAKE2B 3a2833e684b5c4b1a34300fb345759c000adf07f5bab2bda47c502498a3aed3aae6108fa48f96895a2028826cdb7ba92cf4f7b365ab31e03f6d89ddb542f9085 SHA512 9f3deb190b9a53807b386310e18ee9300cb24d27f2f4231cb0d8daf5473730dbf13ed8e78f2bd6d87bdfde6f7333d7d3f4399e040e05bad6bd719ec3fd4a0d91
5+
MISC metadata.xml 1757 BLAKE2B 2b30c60c28f4b0b13ecaf3d80780577bb0f348ec5a33e661cd68f689408d3f6cbc3bbfc7817d4461abe9a8a2cd11c473a743a4d61cf5bc90b5de69ad4f9c5900 SHA512 0f549dbfdaabd44879af5af31db2f741b44f27797a4a22237091c175d5ff31f0d11f57d4db05d1650da166747ef51efcc449784b59c8e222979b41646390363c
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/Makefile b/Makefile
2+
index 6a2ddc6..174322f 100644
3+
--- a/Makefile
4+
+++ b/Makefile
5+
@@ -13,7 +13,7 @@ include SuiteSparse_config/SuiteSparse_config.mk
6+
go: metis
7+
( cd SuiteSparse_config && $(MAKE) )
8+
( cd GraphBLAS && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' )
9+
- ( cd Mongoose && $(MAKE) CMAKE_OPTIONS='$(CMAKE_OPTIONS)' )
10+
+ ( cd Mongoose && $(MAKE) library CMAKE_OPTIONS='$(CMAKE_OPTIONS)' )
11+
( cd AMD && $(MAKE) )
12+
( cd BTF && $(MAKE) )
13+
( cd CAMD && $(MAKE) )
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/SuiteSparse_config/SuiteSparse_config.mk b/SuiteSparse_config/SuiteSparse_config.mk
2+
index f991b7a..1fbb7e9 100644
3+
--- a/SuiteSparse_config/SuiteSparse_config.mk
4+
+++ b/SuiteSparse_config/SuiteSparse_config.mk
5+
@@ -348,7 +348,7 @@ SUITESPARSE_VERSION = 5.3.0
6+
7+
ifeq ($(UNAME),Linux)
8+
# add the realtime library, librt, and SuiteSparse/lib
9+
- LDLIBS += -lrt -Wl,-rpath=$(INSTALL_LIB)
10+
+ LDLIBS += -lrt
11+
endif
12+
13+
#---------------------------------------------------------------------------

sci-libs/suitesparse/metadata.xml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3+
<pkgmetadata>
4+
<maintainer type="project">
5+
<email>[email protected]</email>
6+
<name>Gentoo Science Project</name>
7+
</maintainer>
8+
<longdescription lang="en">
9+
<!-- FIXME: rework this -->
10+
SuiteSparse is a suite of sparse matrix libraries from University of
11+
Florida Computer Science Department. Currently, this includes:
12+
* AMD: symmetric approximate minimum degree
13+
* BTF: permutation to block triangular form
14+
* CAMD: symmetric approximate minimum degree
15+
* CCOLAMD: constrained column approximate minimum degree
16+
* COLAMD: column approximate minimum degree
17+
* CHOLMOD: sparse supernodal Cholesky factorization and update/downdate
18+
* CSparse: a concise sparse matrix package
19+
* CXSparse: an extended version of CSparse
20+
* GraphBLAS: graph algorithms implemented with BLAS
21+
* KLU: sparse LU factorization, for circuit simulation
22+
* LDL: a simple LDL^T factorization
23+
* Mongoose: graph partioning package
24+
* RBio: read/write sparse matrices in Rutherford / Boeing format
25+
* SPQR: multifrontal sparse QT factorization
26+
* SuiteSparse_config: common configuration for all but CSparse
27+
* UMFPACK: sparse multifrontal LU factorization
28+
The Gentoo package does not include the suitesparse MATLAB tools from
29+
upstream, from the packages above and the following MATLAB-only packages:
30+
* LINFACTOR: solve Ax=b using LU or CHOL
31+
* MESHND: 2D and 3D mesh generation and nested dissection
32+
* SSMULT: sparse matrix times sparse matrix
33+
</longdescription>
34+
<use>
35+
<!-- FIXME: provide meaningfull USE flag descriptions -->
36+
<flag name="cuda">Use CUDA for cholmod and spqr</flag>
37+
<flag name="tbb">Use Intel's <pkg>dev-cpp/tbb</pkg> for threading</flag>
38+
</use>
39+
</pkgmetadata>
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Copyright 1999-2018 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=6
5+
6+
# TODO: patch SuiteSparse_config/SuiteSparse_config.mk
7+
8+
# FIXME: currently this is a safety measure. Is it really needed by the
9+
# fortran modules?
10+
FORTRAN_NEED_OPENMP=1
11+
12+
# FIXME: how to handle cmake without having a root CMakeLists.txt?
13+
inherit fortran-2 toolchain-funcs
14+
15+
MY_PN="SuiteSparse"
16+
17+
DESCRIPTION="Package for a suite of sparse matrix tools"
18+
HOMEPAGE="http://faculty.cse.tamu.edu/davis/suitesparse.html"
19+
SRC_URI="http://faculty.cse.tamu.edu/davis/${MY_PN}/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz"
20+
21+
# BSD: amd, camd, ccolamd, colamd, ssget
22+
# LGPL-2.1+: btf, cholmod/Check, choldmod/Cholesky, cholmod/Core,
23+
# cholmod/Partition, cxsparse, klu, ldl
24+
# GPL-2+: choldmod/Demo, cholmod/Matlab, cholmod/MatrixOps,
25+
# cholmod/Modify, cholmod/Supernodal, cholmod/Tcov, cholmod/Valgrind,
26+
# GPUQREngine, RBio, spqr, SuiteSparse_GPURuntime, umfpack
27+
# Apache-2.0: GraphBLAS
28+
# GPL-3: Mongoose
29+
LICENSE="Apache-2.0 BSD GPL-2+ GPL-3 LGPL-2.1+"
30+
SLOT="0"
31+
32+
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
33+
34+
FORTRAN_NEEDED="amd"
35+
36+
# FIXME: currently not included:
37+
# GraphBLAS, Mongoose, RBio, SuiteSparse_GPURuntime, GPUQREngine,
38+
# Piro_Band, Skyline_SVD
39+
# GraphBLAS and Mongoose are cmake based builds
40+
IUSE="cuda doc fortran tbb test"
41+
42+
RESTRICT="!test? ( test )"
43+
44+
# FIXME: Exclude the old packages. These could be removed once the package
45+
# and revdeps are fully updated.
46+
RDEPEND="
47+
!<sci-libs/suitesparse-5
48+
!sci-libs/amd
49+
!sci-libs/btf
50+
!sci-libs/camd
51+
!sci-libs/ccolamd
52+
!sci-libs/cholmod
53+
!sci-libs/colamd
54+
!sci-libs/cxsparse
55+
!sci-libs/klu
56+
!sci-libs/ldl
57+
!sci-libs/spqr
58+
!sci-libs/suitesparseconfig
59+
!sci-libs/umfpack
60+
|| ( >=sci-libs/metis-5.1.0-r3[openmp(+)] >=sci-libs/parmetis-4.0.3[openmp(+)] )
61+
virtual/blas:=
62+
virtual/lapack:=
63+
cuda? (
64+
>=dev-util/nvidia-cuda-toolkit-9.2.88:=
65+
>=sci-libs/magma-2.4.0:=
66+
)
67+
tbb? ( >=dev-cpp/tbb-2017.20161128:= )
68+
"
69+
70+
DEPEND="
71+
${RDEPEND}
72+
>=dev-util/indent-2.2.11-r1
73+
>=sys-apps/grep-3.1
74+
"
75+
76+
S=${WORKDIR}/${MY_PN}
77+
78+
PATCHES=(
79+
"${FILESDIR}/${P}-config.patch"
80+
"${FILESDIR}/${P}-Makefile.patch"
81+
)
82+
83+
DOCS=( README.txt )
84+
85+
pkg_setup() {
86+
# several of the packages need openmp support, so check for it early
87+
# FIXME: check which packages exactly need openmp and make the check
88+
# dependent on USE flags for those packages.
89+
tc-check-openmp || die "Need OpenMP to build ${P}"
90+
}
91+
92+
src_compile() {
93+
local myblas=$($(tc-getPKG_CONFIG) --libs blas)
94+
local mylapack=$($(tc-getPKG_CONFIG) --libs lapack)
95+
# FIXME: AUTOCC auto-enables intel compilers
96+
local mymakeopts="OPTIMIZATION= AUTOCC=no"
97+
mymakeopts="${mymakeopts} LAPACK=\"${mylapack}\" BLAS=\"${myblas}\""
98+
mymakeopts="${mymakeopts} MY_METIS_LIB=-lmetis"
99+
if use cuda; then
100+
mymakeopts="${mymakeopts} CUDA=yes magma_inc=/usr magma_lib=/usr/$(get_libdir)"
101+
else
102+
mymakeopts="${mymakeopts} CUDA=no"
103+
fi
104+
if use tbb; then
105+
mymakeopts="${mymakeopts} TBB=-ltbb"
106+
mymakeopts="${mymakeopts} SPQR_CONFIG+=-DHAVE_TBB"
107+
fi
108+
use test && mymakeopts="${mymakeopts} TCOV=yes"
109+
export LD_LIBRARY_PATH="${S}/lib"
110+
emake ${mymakeopts} config
111+
emake ${mymakeopts}
112+
}
113+
114+
src_install() {
115+
local myblas=$($(tc-getPKG_CONFIG) --libs blas)
116+
local mylapack=$($(tc-getPKG_CONFIG) --libs lapack)
117+
local myinstallargs="INSTALL=${ED%/}/usr INSTALL_LIB=${ED%/}/usr/$(get_libdir)"
118+
myinstallargs="${myinstallargs} BLAS=${myblas} LAPACK=${mylapack} MY_METIS_LIB=-lmetis"
119+
if use cuda; then
120+
myinstallargs="${myinstallargs} CUDA=yes magma_inc=/usr magma_lib=/usr/$(get_libdir)"
121+
else
122+
myinstallargs="${myinstallargs} CUDA=no"
123+
fi
124+
if use tbb; then
125+
myinstallargs="${myinstallargs} TBB=-ltbb"
126+
myinstallargs="${myinstallargs} SPQR_CONFIG=-DHAVE_TBB"
127+
fi
128+
emake ${myinstallargs} install
129+
}

0 commit comments

Comments
 (0)