Skip to content

Commit 57f4f44

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. Restricts tests for now, as they fail in cholmod module. Package-Manager: Portage-2.3.51, Repoman-2.3.12 Manifest-Sign-Key: 0x2E246A4E715AA683 Signed-off-by: Bernd Waibel <[email protected]>
1 parent d692797 commit 57f4f44

File tree

5 files changed

+261
-0
lines changed

5 files changed

+261
-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 1468 BLAKE2B 355a5855bc3bf621c4304f66abb0b487a07ab4ee87558251e375ea883aca54c0bec1fc1ef4045271d0655240e66ef2bc04c6fdec3975e342addc4ab2a1e4b21b SHA512 73011af1eeb35a7f9f4bcbc147e83216cdd0a3a37bbe27ec3ce1172578d9a2a02c94c0de491eba1e51bdf8a9546e8a4ecf1cfb58710d3eb79f0bc6a5d54a0366
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 4681 BLAKE2B 48bb14cf69302e014c5be84d0846650c79f8cf89da0f45533a60c941e24ee8422d1a74a074f44afe1531a679d0470ce0db350d03491ab551267581e934b7660b SHA512 cfd729c86fc3c62c4f1221a4736c58a4646d1032c2f8ddeff3cd92ba9da0990774a697eb1649baeb96471ee44bba706f4384d5f1a20899bc5c0ade41bfdda002
5+
MISC metadata.xml 1699 BLAKE2B fd298ed713a1bb29de7a9e874e8b73ce6bc1a4cb45889e3a1d786d746e35c243fd8ce6dc1d74b03a18b70c29475f499fe21682d1dd1e63dead15bedbb54fa199 SHA512 19952506e14cd08ccb0182b468b9459bc05330fbd302ed92349b55b45ffda956a180f2b88c54a3702ee5fe515e791431cc179263ba85f32632c9b8652e0c61d8
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
diff --git a/AMD/Lib/Makefile b/AMD/Lib/Makefile
2+
index 3b92f6a..3c40cc2 100644
3+
--- a/AMD/Lib/Makefile
4+
+++ b/AMD/Lib/Makefile
5+
@@ -62,7 +62,7 @@ $(AR_TARGET): $(OBJ)
6+
# compile the Fortran versions and the libamdf77.a library (static only)
7+
#-------------------------------------------------------------------------------
8+
9+
-fortran: libamdf77.a
10+
+fortran: libamdf77.a libamdf77.so.$(VERSION)
11+
12+
AMDF77 = amd.o amdbar.o
13+
14+
@@ -76,6 +76,12 @@ libamdf77.a: $(AMDF77)
15+
$(ARCHIVE) libamdf77.a $^
16+
- $(RANLIB) libamdf77.a
17+
18+
+libamdf77.so.$(VERSION): $(AMDF77)
19+
+ $(CC) $(SO_OPTS) $^ -o $@ $(LDLIBS)
20+
+ ln -sf $@ libamdf77.so.$(SO_VERSION)
21+
+ ln -sf $@ libamdf77.so
22+
+ chmod 755 $@
23+
+
24+
#-------------------------------------------------------------------------------
25+
# install (shared C version only)
26+
#-------------------------------------------------------------------------------
27+
@@ -98,6 +104,15 @@ $(INSTALL_LIB)/$(SO_TARGET): $(OBJ)
28+
chmod 644 $(INSTALL_DOC)/AMD_UserGuide.pdf
29+
chmod 644 $(INSTALL_DOC)/AMD_README.txt
30+
31+
+install-fortran: $(INSTALL_LIB)/libamdf77.so.$(VERSION)
32+
+
33+
+$(INSTALL_LIB)/libamdf77.so.$(VERSION): fortran
34+
+ @mkdir -p $(INSTALL_LIB)
35+
+ $(CC) $(SO_OPTS) $(AMDF77) -o $@ $(LDLIBS)
36+
+ ( cd $(INSTALL_LIB) ; ln -sf libamdf77.so.$(VERSION) libamdf77.so.$(SO_VERSION) )
37+
+ ( cd $(INSTALL_LIB) ; ln -sf libamdf77.so.$(VERSION) libamdf77.so )
38+
+ chmod 755 $(INSTALL_LIB)/libamdf77.so.$(VERSION)
39+
+
40+
# uninstall AMD
41+
uninstall:
42+
$(RM) $(INSTALL_LIB)/$(SO_TARGET)
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: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
<flag name="cuda">Use CUDA for cholmod and spqr</flag>
36+
<flag name="tbb">Use Intel's <pkg>dev-cpp/tbb</pkg> for threading</flag>
37+
</use>
38+
</pkgmetadata>
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# Copyright 1999-2018 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=6
5+
6+
# FIXME: currently this is a safety measure. Is it really needed by the
7+
# fortran modules?
8+
FORTRAN_NEED_OPENMP=1
9+
10+
# FIXME: how to handle cmake without having a root CMakeLists.txt?
11+
inherit fortran-2 toolchain-funcs
12+
13+
MY_PN="SuiteSparse"
14+
15+
DESCRIPTION="Package for a suite of sparse matrix tools"
16+
HOMEPAGE="http://faculty.cse.tamu.edu/davis/suitesparse.html"
17+
SRC_URI="http://faculty.cse.tamu.edu/davis/${MY_PN}/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz"
18+
19+
# BSD: amd, camd, ccolamd, colamd, ssget
20+
# LGPL-2.1+: btf, cholmod/Check, choldmod/Cholesky, cholmod/Core,
21+
# cholmod/Partition, cxsparse, klu, ldl
22+
# GPL-2+: choldmod/Demo, cholmod/Matlab, cholmod/MatrixOps,
23+
# cholmod/Modify, cholmod/Supernodal, cholmod/Tcov, cholmod/Valgrind,
24+
# GPUQREngine, RBio, spqr, SuiteSparse_GPURuntime, umfpack
25+
# Apache-2.0: GraphBLAS
26+
# GPL-3: Mongoose
27+
LICENSE="Apache-2.0 BSD GPL-2+ GPL-3 LGPL-2.1+"
28+
SLOT="0"
29+
30+
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
31+
32+
FORTRAN_NEEDED="amd"
33+
34+
# FIXME: currently not included:
35+
# Piro_Band, Skyline_SVD
36+
# GraphBLAS and Mongoose are cmake based builds
37+
# SuiteSparse_GPURuntime and GPUQREngine are part of spqr[cuda]
38+
# FIXME: cuda is not compiling due to C/C++ mixing
39+
# FIXME: testing
40+
IUSE="cuda fortran tbb test"
41+
42+
# Tests currently fail in cholmod library
43+
#RESTRICT="!test? ( test )"
44+
RESTRICT="test"
45+
46+
# FIXME: Exclude the old packages. These could be removed once the package
47+
# and revdeps are fully updated.
48+
RDEPEND="
49+
!<sci-libs/suitesparse-5
50+
!sci-libs/amd
51+
!sci-libs/btf
52+
!sci-libs/camd
53+
!sci-libs/ccolamd
54+
!sci-libs/cholmod
55+
!sci-libs/colamd
56+
!sci-libs/cxsparse
57+
!sci-libs/klu
58+
!sci-libs/ldl
59+
!sci-libs/spqr
60+
!sci-libs/suitesparseconfig
61+
!sci-libs/umfpack
62+
|| ( >=sci-libs/metis-5.1.0-r3[openmp(+)] >=sci-libs/parmetis-4.0.3[openmp(+)] )
63+
virtual/blas:=
64+
virtual/lapack:=
65+
cuda? (
66+
>=dev-util/nvidia-cuda-toolkit-9.2.88:=
67+
>=sci-libs/magma-2.4.0:=
68+
)
69+
tbb? ( >=dev-cpp/tbb-2017.20161128:= )
70+
"
71+
72+
DEPEND="
73+
${RDEPEND}
74+
>=dev-util/indent-2.2.11-r1
75+
>=sys-apps/grep-3.1
76+
test? ( >=app-shells/tcsh-6.20.00 )
77+
"
78+
79+
S=${WORKDIR}/${MY_PN}
80+
81+
PATCHES=(
82+
"${FILESDIR}/${P}-config.patch"
83+
"${FILESDIR}/${P}-Makefile.patch"
84+
)
85+
86+
DOCS=( README.txt )
87+
88+
pkg_setup() {
89+
# several of the packages need openmp support, so check for it early
90+
tc-check-openmp || die "Need OpenMP to build ${P}"
91+
}
92+
93+
src_compile() {
94+
local myblas=$($(tc-getPKG_CONFIG) --libs blas)
95+
local mylapack=$($(tc-getPKG_CONFIG) --libs lapack)
96+
# FIXME: AUTOCC auto-enables intel compilers
97+
local mymakeopts="OPTIMIZATION= AUTOCC=no"
98+
mymakeopts="${mymakeopts} LAPACK=\"${mylapack}\" BLAS=\"${myblas}\""
99+
mymakeopts="${mymakeopts} MY_METIS_LIB=-lmetis"
100+
if use cuda; then
101+
mymakeopts="${mymakeopts} CUDA=yes magma_inc=/usr magma_lib=/usr/$(get_libdir)"
102+
else
103+
mymakeopts="${mymakeopts} CUDA=no"
104+
fi
105+
if use fortran; then
106+
local myf77=$(tc-getF77)
107+
mymakeopts="${mymakeopts} F77=${myf77}"
108+
fi
109+
if use tbb; then
110+
mymakeopts="${mymakeopts} TBB=-ltbb SPQR_CONFIG+=-DHAVE_TBB"
111+
fi
112+
use test && mymakeopts="${mymakeopts} TCOV=yes"
113+
export LD_LIBRARY_PATH="${S}/lib"
114+
emake ${mymakeopts} config # FIXME: remove on final ebuild
115+
emake ${mymakeopts}
116+
if use fortran; then
117+
emake -C "${S}/AMD" fortran ${mymakeopts}
118+
fi
119+
}
120+
121+
src_test() {
122+
local myblas=$($(tc-getPKG_CONFIG) --libs blas)
123+
local mylapack=$($(tc-getPKG_CONFIG) --libs lapack)
124+
local mytestargs="OPTIMIZATION= AUTOCC=no BLAS=${myblas} LAPACK=${mylapack}"
125+
mytestargs="${mytestargs} MY_METIS_LIB=-lmetis"
126+
if use cuda; then
127+
mytestargs="${mytestargs} CUDA=yes magma_inc=/usr magma_lib=/usr/$(get_libdir)"
128+
else
129+
mytestargs="${mytestargs} CUDA=no"
130+
fi
131+
if use fortran; then
132+
local myf77=$(tc-getF77)
133+
mytestargs="${mytestargs} F77=${myf77}"
134+
fi
135+
if use tbb; then
136+
mytestargs="${mytestargs} TBB=-ltbb SPQR_CONFIG+=-DHAVE_TBB"
137+
fi
138+
export LD_LIBRARY_PATH="${S}/lib"
139+
emake ${mytestargs} cov
140+
}
141+
142+
src_install() {
143+
local myblas=$($(tc-getPKG_CONFIG) --libs blas)
144+
local mylapack=$($(tc-getPKG_CONFIG) --libs lapack)
145+
local myinstallargs="INSTALL=${ED%/}/usr INSTALL_LIB=${ED%/}/usr/$(get_libdir)"
146+
myinstallargs="${myinstallargs} BLAS=${myblas} LAPACK=${mylapack} MY_METIS_LIB=-lmetis"
147+
if use cuda; then
148+
myinstallargs="${myinstallargs} CUDA=yes magma_inc=/usr magma_lib=/usr/$(get_libdir)"
149+
else
150+
myinstallargs="${myinstallargs} CUDA=no"
151+
fi
152+
if use fortran; then
153+
local myf77=$(tc-getF77)
154+
myinstallargs="${myinstallargs} F77=${myf77}"
155+
fi
156+
if use tbb; then
157+
myinstallargs="${myinstallargs} TBB=-ltbb SPQR_CONFIG+=-DHAVE_TBB"
158+
fi
159+
emake ${myinstallargs} install
160+
if use fortran; then
161+
emake -C "${S}/AMD/Lib" ${myinstallargs} install-fortran
162+
fi
163+
}

0 commit comments

Comments
 (0)