Dominique Leuenberger 2018-02-28 19:00:44 +00:00 committed by Git OBS Bridge
commit 8e333181bd
2 changed files with 30 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Feb 14 10:36:16 UTC 2018 - schwab@suse.de
- Make openblas optional, using lapack instead
-------------------------------------------------------------------
Mon Oct 16 13:53:59 UTC 2017 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package suitesparse
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,6 +16,12 @@
#
%ifarch m68k riscv64
%bcond_with openblas
%else
%bcond_without openblas
%endif
Name: suitesparse
Summary: A collection of sparse matrix libraries
License: GPL-2.0+ and LGPL-2.1+
@ -31,7 +37,9 @@ BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: lapack-devel
BuildRequires: metis-devel
%if %{with openblas}
BuildRequires: openblas-devel
%endif
BuildRequires: openmpi-devel
%define amdver 2.4.6
%define amdso 2_4_6
@ -102,7 +110,11 @@ Requires: %{rbiolib} = %{rbiover}
Requires: %{spqrlib} = %{spqrver}
Requires: %{umfpacklib} = %{umfpackver}
Requires: metis-devel
%if %{with openblas}
Requires: openblas-devel
%else
Requires: lapack-devel
%endif
Requires: openmpi-devel
# make sure developers can find these packages
Provides: suitesparse-common-devel = %{version}
@ -225,9 +237,9 @@ CCOLAMD is part of the SuiteSparse sparse matrix suite.
Version: %{cholmodver}
Release: 0
Summary: Supernodal Sparse Cholesky Factorization and Update/Downdate
#bnc746867 cholmod from suitesparse should be GPL-2.0 and/or LGPL-2.0 licensed
License: GPL-2.0 and LGPL-2.1
Group: System/Libraries
#bnc746867 cholmod from suitesparse should be GPL-2.0 and/or LGPL-2.0 licensed
%description -n %{cholmodlib}
CHOLMOD is a set of ANSI C routines for sparse Cholesky factorization
@ -427,6 +439,9 @@ SuiteSparse_config is part of the SuiteSparse sparse matrix suite.
%prep
%setup -q -n SuiteSparse
sed 's/^CHOLMOD_CONFIG =.*/CHOLMOD_CONFIG = -DNPARTITION/' -i SuiteSparse_config/SuiteSparse_config.mk
%if %{without openblas}
sed 's/-lopenblas/-lblas/' -i SuiteSparse_config/SuiteSparse_config.mk
%endif
# bnc#751746
rm -rf MATLAB_Tools/Factorize/Doc/factorize_article.pdf
@ -448,15 +463,20 @@ pushd SuiteSparse_config
popd
# libraries linking config [bnc#883683]
%if %{with openblas}
blas_lib=-lopenblas
%else
blas_lib=-lblas
%endif
amd_libs="libsuitesparseconfig.so"
camd_libs="libsuitesparseconfig.so"
ccolamd_libs="libsuitesparseconfig.so"
cholmod_libs="libamd.so libcamd.so libcolamd.so libccolamd.so libsuitesparseconfig.so -lopenblas -llapack -lmetis"
cholmod_libs="libamd.so libcamd.so libcolamd.so libccolamd.so libsuitesparseconfig.so $blas_lib -llapack -lmetis"
colamd_libs="libsuitesparseconfig.so"
klu_libs="libamd.so libbtf.so libcolamd.so"
rbio_libs="libsuitesparseconfig.so"
spqr_libs="libcholmod.so libsuitesparseconfig.so -lopenblas -llapack -lmetis"
umfpack_libs="libamd.so libcholmod.so libsuitesparseconfig.so -lopenblas -llapack -lmetis"
spqr_libs="libcholmod.so libsuitesparseconfig.so $blas_lib -llapack -lmetis"
umfpack_libs="libamd.so libcholmod.so libsuitesparseconfig.so $blas_lib -llapack -lmetis"
for dir in AMD BTF CAMD CCOLAMD COLAMD CHOLMOD CSparse CXSparse KLU LDL RBio SPQR UMFPACK; do
pushd $dir