Compare commits

...

No commits in common. "c8s" and "c9s" have entirely different histories.
c8s ... c9s

5 changed files with 465 additions and 303 deletions

8
.gitignore vendored
View File

@ -1 +1,7 @@
/SuiteSparse-4.4.6.tar.gz
/SuiteSparse-*.tar.gz
/SuiteSparse/
/*.log
/clog
/*.src.rpm
/x86_64/
/noarch/

1
.suitesparse.metadata Normal file
View File

@ -0,0 +1 @@
23bb875f50c2b1ea7d9e7885e1956fa02e210824 SuiteSparse-5.4.0.tar.gz

View File

@ -0,0 +1,25 @@
From 6cfb73889129bd537115479b5756b834f4bf1070 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 21 Feb 2022 18:42:28 +0100
Subject: [PATCH] build: don't set RPATH on Linux
---
SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk b/SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk
index 1d3d18f..ee60de4 100644
--- a/SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk
+++ b/SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk
@@ -358,7 +358,7 @@ SUITESPARSE_VERSION = 5.4.0
ifeq ($(UNAME),Linux)
# add the realtime library, librt, and SuiteSparse/lib
- LDLIBS += -lrt -Wl,-rpath=$(INSTALL_LIB)
+ LDLIBS += -lrt
endif
#---------------------------------------------------------------------------
--
2.33.1

View File

@ -1 +1 @@
SHA512 (SuiteSparse-4.4.6.tar.gz) = e7203a35d16b9eca999390a388617824a82689f354a5cdfb6404ca86250509d0547d0d88ce9d34d6769f4189a01617ada86ab835cfeed96ab2e315bcb71a4ec7
SHA512 (SuiteSparse-5.4.0.tar.gz) = 8328bcc2ef5eb03febf91b9c71159f091ff405c1ba7522e53714120fcf857ceab2d2ecf8bf9a2e1fc45e1a934665a341e3a47f954f87b59934f4fce6164775d6

View File

@ -1,68 +1,52 @@
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
%bcond_without atlas310
%else
%bcond_with atlas310
%endif
%if %{with atlas310}
%global atlaslibs -lsatlas
%else
%global atlaslibs -lcblas -llapack
%endif
%global amd_version 2.4.1
%global amd_version_major 2
%global btf_version 1.2.1
%global btf_version_major 1
%global camd_version 2.4.1
%global camd_version_major 2
%global ccolamd_version 2.9.1
%global ccolamd_version_major 2
%global cholmod_version 3.0.6
%global cholmod_version_major 3
%global colamd_version 2.9.1
%global colamd_version_major 2
%global csparse_version 3.1.4
%global csparse_version_major 3
%global cxsparse_version 3.1.4
%global cxsparse_version_major 3
%global klu_version 1.3.3
%global klu_version_major 1
%global ldl_version 2.2.1
%global ldl_version_major 2
%global rbio_version 2.2.1
%global rbio_version_major 2
%global spqr_version 2.0.1
%global spqr_version_major 2
%global SuiteSparse_config_ver 4.4.4
%global SuiteSparse_config_major 4
%global umfpack_version 5.7.1
%global SuiteSparse_config_major 5
%global umfpack_version_major 5
### CHOLMOD can also be compiled to use the METIS library, but it is not
### used here because its licensing terms exclude it from Fedora Extras.
### To compile with METIS, define enable_metis as 1 below.
%global enable_metis 0
### CXSparse is a superset of CSparse, and the two share common header
### names, so it does not make sense to build both. CXSparse is built
### by default, but CSparse can be built instead by defining
### enable_csparse as 1 below.
%global enable_csparse 0
# Whether to build a separate version of libraries linked against an ILP64 BLAS
%if 0%{?__isa_bits} == 64
%global build64 1
%endif
%if 0%{?fedora} >= 33
%global blaslib flexiblas
%else
%global blaslib openblas
%endif
Name: suitesparse
Version: 4.4.6
Release: 11%{?dist}
Version: 5.4.0
Release: 10%{?dist}
Summary: A collection of sparse matrix libraries
Group: System Environment/Libraries
License: (LGPLv2+ or BSD) and LGPLv2+ and GPLv2+
URL: http://faculty.cse.tamu.edu/davis/suitesparse.html
Source0: http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-%{version}.tar.gz
%if %{with atlas310}
BuildRequires: atlas-devel >= 3.10
%else
BuildRequires: atlas-devel
%endif
BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc-c++
#BuildRequires: metis-devel
BuildRequires: %{blaslib}-devel
# openblas is still required for 64-bit suffixed versions
BuildRequires: openblas-devel
BuildRequires: tbb-devel
BuildRequires: hardlink
@ -70,6 +54,8 @@ Obsoletes: umfpack <= 5.0.1
Obsoletes: ufsparse <= 2.1.1
Provides: ufsparse = %{version}-%{release}
Patch0001: 0001-build-don-t-set-RPATH-on-Linux.patch
%description
suitesparse is a collection of libraries for computations involving sparse
matrices. The package includes the following libraries:
@ -92,7 +78,6 @@ matrices. The package includes the following libraries:
%package devel
Summary: Development headers for SuiteSparse
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Obsoletes: umfpack-devel <= 5.0.1
Obsoletes: ufsparse-devel <= 2.1.1
@ -105,7 +90,6 @@ applications which use the suitesparse libraries.
%package static
Summary: Static version of SuiteSparse libraries
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Provides: ufsparse-static = %{version}-%{release}
@ -113,11 +97,67 @@ Provides: ufsparse-static = %{version}-%{release}
The suitesparse-static package contains the statically linkable
version of the suitesparse libraries.
%if 0%{?build64}
%package -n %{name}64
Summary: A collection of sparse matrix libraries (ILP64 version)
%description -n %{name}64
The suitesparse collection compiled against an ILP64 BLAS library.
%package -n %{name}64-devel
Summary: Development headers for SuiteSparse (ILP64 version)
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}64 = %{version}-%{release}
%description -n %{name}64-devel
The suitesparse64-devel package contains files needed for developing
applications which use the suitesparse libraries (ILP64 version).
%package -n %{name}64-static
Summary: Static version of SuiteSparse libraries (ILP64 version)
Requires: %{name}-devel = %{version}-%{release}
%description -n %{name}64-static
The suitesparse64-static package contains the statically linkable
version of the suitesparse libraries (ILP64 version).
%package -n %{name}64_
Summary: A collection of sparse matrix libraries (ILP64 version)
%description -n %{name}64_
The suitesparse collection compiled against an ILP64 BLAS library.
%package -n %{name}64_-devel
Summary: Development headers for SuiteSparse (ILP64 version)
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}64_ = %{version}-%{release}
%description -n %{name}64_-devel
The suitesparse64_-devel package contains files needed for developing
applications which use the suitesparse libraries (ILP64 version) compiled
against a BLAS library with the "64_" symbol name suffix (see openblas-*64_
packages).
%package -n %{name}64_-static
Summary: Static version of SuiteSparse libraries (ILP64 version)
Requires: %{name}-devel = %{version}-%{release}
%description -n %{name}64_-static
The suitesparse64_-static package contains the statically linkable
version of the suitesparse libraries (ILP64 version) compiled against a
BLAS library with the "64_" symbol name suffix (see openblas-*64_ packages).
%endif
%package doc
Summary: Documentation files for SuiteSparse
Group: Documentation
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
%description doc
@ -125,313 +165,403 @@ This package contains documentation files for %{name}.
%prep
%setup -q -n SuiteSparse
%setup -c -q
# Fix pragma ivdep so gcc understands it.
for fil in $(grep -Frl 'pragma ivdep' .); do
sed -i.orig 's/pragma ivdep/pragma GCC ivdep/' $fil
touch -r ${fil}.orig $fil
rm -f ${fil}.orig
done
%patch1 -p1
pushd SuiteSparse
# Remove bundled metis
rm -r metis*
# Makefiles look for metis.h specifically
#ln -s %%{_includedir}/metis/*.h include/
# Fix pragma ivdep so gcc understands it.
for fil in $(grep -Frl 'pragma ivdep' .); do
sed -i.orig 's/pragma ivdep/pragma GCC ivdep/' $fil
touch -r ${fil}.orig $fil
rm -f ${fil}.orig
done
# drop non-standard -O3 and duplicate -fexceptions from default CFLAGS
sed -i -e '/^ CF =/ s/ -O3 -fexceptions//' SuiteSparse_config/SuiteSparse_config.mk
# Allow adding a suffix to the library name
sed -i -e '/SO.*=/s/$(LIBRARY).so/$(LIBRARY)$(LIBRARY_SUFFIX).so/' \
-e '/AR_TARGET *=/s/$(LIBRARY).a/$(LIBRARY)$(LIBRARY_SUFFIX).a/' SuiteSparse_config/SuiteSparse_config.mk
sed -i -e 's/-l\(amd\|btf\|camd\|ccolamd\|cholmod\|colamd\|csparse\|cxsparse\|klu\|ldl\|rbio\|spqr\|suitesparseconfig\|umfpack\)/-l\1$(LIBRARY_SUFFIX)/g' \
$(find -name Makefile\* -o -name \*.mk)
popd
%if 0%{?build64}
cp -a SuiteSparse SuiteSparse64
cp -a SuiteSparse SuiteSparse64_
%endif
%build
mkdir -p Doc/{AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,KLU,LDL,UMFPACK,SPQR,RBio} Lib Include
export AUTOCC=no
export CC=gcc
# SuiteSparse_config needs to come first
pushd SuiteSparse_config
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
ar x libsuitesparseconfig.a
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libsuitesparseconfig.so.%{SuiteSparse_config_major} -o \
libsuitesparseconfig.so.%{SuiteSparse_config_ver} ../SuiteSparse_config/*.o -lm
ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so.%{SuiteSparse_config_major}
ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so
cp -p ../SuiteSparse_config/*.a ./
popd
cp -p *.h ../Include
popd
for build in SuiteSparse %{?build64:SuiteSparse64 SuiteSparse64_}
do
pushd $build
pushd AMD
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libamd.so.%{amd_version_major} -o \
libamd.so.%{amd_version} ../AMD/Lib/*.o \
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
ln -sf libamd.so.%{amd_version} libamd.so.%{amd_version_major}
ln -sf libamd.so.%{amd_version} libamd.so
cp -p ../AMD/Lib/*.a ./
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/License.txt Doc/lesser.txt Doc/ChangeLog Doc/*.pdf ../Doc/AMD
popd
# TODO - Try to use upstream makefile - will build more components
mkdir -p Doc/{AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,KLU,LDL,UMFPACK,SPQR,RBio} Include
pushd BTF
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="-Wl,-z,now"
export LAPACK=""
# Set flags for ILP64 build
if [ $build = SuiteSparse64 ]
then
export CFLAGS="$CFLAGS -DBLAS64"
export BLAS=-l%{blaslib}64
export LIBRARY_SUFFIX=64
elif [ $build = SuiteSparse64_ ]
then
export CFLAGS="$CFLAGS -DBLAS64 -DSUN64"
export BLAS=-lopenblas64_
export LIBRARY_SUFFIX=64_
else
export BLAS=-l%{blaslib}
fi
# SuiteSparse_config needs to come first
pushd SuiteSparse_config
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
cp -p *.h ../Include
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libbtf.so.%{btf_version_major} -o \
libbtf.so.%{btf_version} ../BTF/Lib/*.o
ln -sf libbtf.so.%{btf_version} libbtf.so.%{btf_version_major}
ln -sf libbtf.so.%{btf_version} libbtf.so
cp -p ../BTF/Lib/*.a ./
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/* ../Doc/BTF
popd
pushd CAMD
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
pushd AMD
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/License.txt Doc/lesser.txt Doc/ChangeLog Doc/*.pdf ../Doc/AMD
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libcamd.so.%{camd_version_major} -o \
libcamd.so.%{camd_version} ../CAMD/Lib/*.o \
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
ln -sf libcamd.so.%{camd_version} libcamd.so.%{camd_version_major}
ln -sf libcamd.so.%{camd_version} libcamd.so
cp -p ../CAMD/Lib/*.a ./
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/ChangeLog Doc/License Doc/*.pdf ../Doc/CAMD
popd
pushd CCOLAMD
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
pushd BTF
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/* ../Doc/BTF
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libccolamd.so.%{ccolamd_version_major} -o \
libccolamd.so.%{ccolamd_version} ../CCOLAMD/Lib/*.o \
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so.%{ccolamd_version_major}
ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so
cp -p ../CCOLAMD/Lib/*.a ./
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/* ../Doc/CCOLAMD
popd
pushd COLAMD
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
pushd CAMD
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/ChangeLog Doc/License.txt Doc/*.pdf ../Doc/CAMD
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libcolamd.so.%{colamd_version_major} -o \
libcolamd.so.%{colamd_version} ../COLAMD/Lib/*.o \
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
ln -sf libcolamd.so.%{colamd_version} libcolamd.so.%{colamd_version_major}
ln -sf libcolamd.so.%{colamd_version} libcolamd.so
cp -p ../COLAMD/Lib/*.a ./
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/* ../Doc/COLAMD
popd
%if "%{?enable_metis}" == "1"
CHOLMOD_FLAGS="$RPM_OPT_FLAGS -I%{_includedir}/metis -fPIC"
%else
CHOLMOD_FLAGS="$RPM_OPT_FLAGS -DNPARTITION -fPIC"
%endif
pushd CHOLMOD
pushd Lib
make CFLAGS="$CHOLMOD_FLAGS"
pushd CCOLAMD
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/* ../Doc/CCOLAMD
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libcholmod.so.%{cholmod_version_major} -o \
libcholmod.so.%{cholmod_version} ../CHOLMOD/Lib/*.o \
-L%{_libdir}/atlas %{atlaslibs} \
libamd.so.%{amd_version_major} \
libcamd.so.%{camd_version_major} libcolamd.so.%{colamd_version_major} \
libccolamd.so.%{ccolamd_version_major} \
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
ln -sf libcholmod.so.%{cholmod_version} libcholmod.so.%{cholmod_version_major}
ln -sf libcholmod.so.%{cholmod_version} libcholmod.so
cp -p ../CHOLMOD/Lib/*.a ./
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/*.pdf ../Doc/CHOLMOD
cp -p Cholesky/License.txt ../Doc/CHOLMOD/Cholesky_License.txt
cp -p Core/License.txt ../Doc/CHOLMOD/Core_License.txt
cp -p MatrixOps/License.txt ../Doc/CHOLMOD/MatrixOps_License.txt
cp -p Partition/License.txt ../Doc/CHOLMOD/Partition_License.txt
cp -p Supernodal/License.txt ../Doc/CHOLMOD/Supernodal_License.txt
popd
%if "%{?enable_csparse}" == "1"
pushd CSparse
pushd Source
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
cp -p cs.h ../../Include
pushd COLAMD
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/* ../Doc/COLAMD
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libcsparse.so.%{csparse_version_major} -o \
libcsparse.so.%{csparse_version} ../CSparse/Source/*.o -lm
ln -sf libcsparse.so.%{csparse_version} libcsparse.so.%{csparse_version_major}
ln -sf libcsparse.so.%{csparse_version} libcsparse.so
cp -p ../CSparse/Source/*.a ./
popd
mkdir ../Doc/CSparse/
cp -p Doc/* ../Doc/CSparse
popd
%else
pushd CXSparse
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
pushd CHOLMOD
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/*.pdf ../Doc/CHOLMOD
cp -p Cholesky/lesser.txt ../Doc/CHOLMOD/Cholesky_License.txt
cp -p Core/lesser.txt ../Doc/CHOLMOD/Core_License.txt
cp -p MatrixOps/gpl.txt ../Doc/CHOLMOD/MatrixOps_License.txt
cp -p Partition/lesser.txt ../Doc/CHOLMOD/Partition_License.txt
cp -p Supernodal/gpl.txt ../Doc/CHOLMOD/Supernodal_License.txt
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libcxsparse.so.%{cxsparse_version_major} -o \
libcxsparse.so.%{cxsparse_version} ../CXSparse/Lib/*.o -lm
ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so.%{cxsparse_version_major}
ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so
cp -p ../CXSparse/Lib/*.a ./
popd
cp -p Include/cs.h ../Include
mkdir ../Doc/CXSparse/
cp -p Doc/* ../Doc/CXSparse
popd
%endif
pushd KLU
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
%if "%{?enable_csparse}" == "1"
pushd CSparse
pushd Source
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
cp -p cs.h ../../Include
popd
mkdir ../Doc/CSparse/
cp -p Doc/* ../Doc/CSparse
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libklu.so.%{klu_version_major} -o \
libklu.so.%{klu_version} ../KLU/Lib/*.o \
libamd.so.%{amd_version_major} libcolamd.so.%{colamd_version_major} \
libbtf.so.%{btf_version_major} \
libsuitesparseconfig.so.%{SuiteSparse_config_major}
ln -sf libklu.so.%{klu_version} libklu.so.%{klu_version_major}
ln -sf libklu.so.%{klu_version} libklu.so
cp -p ../KLU/Lib/*.a ./
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/lesser.txt ../Doc/KLU
popd
pushd LDL
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
%else
pushd CXSparse
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/cs.h ../Include
mkdir ../Doc/CXSparse/
cp -p Doc/* ../Doc/CXSparse
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libldl.so.%{ldl_version_major} -o \
libldl.so.%{ldl_version} ../LDL/Lib/*.o
ln -sf libldl.so.%{ldl_version} libldl.so.%{ldl_version_major}
ln -sf libldl.so.%{ldl_version} libldl.so
cp -p ../LDL/Lib/*.a ./
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/ChangeLog Doc/lesser.txt Doc/*.pdf ../Doc/LDL
popd
%endif
pushd UMFPACK
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
pushd KLU
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/lesser.txt ../Doc/KLU
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,libumfpack.so.%{umfpack_version_major} -o \
libumfpack.so.%{umfpack_version} ../UMFPACK/Lib/*.o \
-L%{_libdir}/atlas %{atlaslibs} \
libamd.so.%{amd_version_major} \
libcholmod.so.%{cholmod_version_major} \
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
ln -sf libumfpack.so.%{umfpack_version} libumfpack.so.%{umfpack_version_major}
ln -sf libumfpack.so.%{umfpack_version} libumfpack.so
cp -p ../UMFPACK/Lib/*.a ./
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/License Doc/ChangeLog Doc/gpl.txt Doc/*.pdf ../Doc/UMFPACK
popd
pushd SPQR
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -DHAVE_TBB -DNPARTITION -fPIC"
pushd LDL
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/ChangeLog Doc/lesser.txt Doc/*.pdf ../Doc/LDL
popd
pushd ../Lib
g++ -shared %{?__global_ldflags} -Wl,-soname,libspqr.so.%{spqr_version_major} -o \
libspqr.so.%{spqr_version} ../SPQR/Lib/*.o \
-L%{_libdir}/atlas -L%{_libdir} %{atlaslibs} \
-ltbb \
libcholmod.so.%{cholmod_version_major} \
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
ln -sf libspqr.so.%{spqr_version} libspqr.so.%{spqr_version_major}
ln -sf libspqr.so.%{spqr_version} libspqr.so
cp -p ../SPQR/Lib/*.a ./
popd
cp -p Include/*.h* ../Include
cp -p README{,_SPQR}.txt
cp -p README_SPQR.txt Doc/* ../Doc/SPQR
popd
pushd RBio
pushd Lib
make CFLAGS="$RPM_OPT_FLAGS -fPIC"
pushd UMFPACK
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/License.txt Doc/ChangeLog Doc/gpl.txt Doc/*.pdf ../Doc/UMFPACK
popd
pushd ../Lib
gcc -shared %{?__global_ldflags} -Wl,-soname,librbio.so.%{rbio_version_major} -o \
librbio.so.%{rbio_version} ../RBio/Lib/*.o \
libsuitesparseconfig.so.%{SuiteSparse_config_major}
ln -sf librbio.so.%{rbio_version} librbio.so.%{rbio_version_major}
ln -sf librbio.so.%{rbio_version} librbio.so
cp -p ../RBio/Lib/*.a ./
pushd SPQR
pushd Lib
%make_build CFLAGS="$CFLAGS -DHAVE_TBB -DNPARTITION" TBB=-ltbb BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h* ../Include
cp -p README{,_SPQR}.txt
cp -p README_SPQR.txt Doc/* ../Doc/SPQR
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/ChangeLog Doc/License.txt ../Doc/RBio
popd
pushd RBio
pushd Lib
%make_build CFLAGS="$CFLAGS" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX"
popd
cp -p Include/*.h ../Include
cp -p README.txt Doc/ChangeLog Doc/License.txt ../Doc/RBio
popd
popd
done
%install
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name}
pushd Lib
for f in *.a *.so*; do
cp -a $f ${RPM_BUILD_ROOT}%{_libdir}/$f
done
popd
chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/*.so.*
pushd Include
for f in *.h *.hpp; do
cp -a $f ${RPM_BUILD_ROOT}%{_includedir}/%{name}/$f
done
popd
cp -a SuiteSparse/Include/*.{h,hpp} ${RPM_BUILD_ROOT}%{_includedir}/%{name}/
for build in SuiteSparse %{?build64:SuiteSparse64 SuiteSparse64_}
do
pushd $build
cp -a */Lib/*.a lib/*.so* ${RPM_BUILD_ROOT}%{_libdir}/
chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/*.so.*
# collect licenses in one place to ship as base package documentation
rm -rf Licenses
mkdir Licenses
find */ -iname lesser.txt -o -iname license.txt -o -iname gpl.txt -o \
-iname license | while read f; do
b="${f%%/*}"
r="${f#$b}"
x="$(echo "$r" | sed 's|/doc/|/|gi')"
install -m0644 -D "$f" "./Licenses/$b/$x"
# collect licenses in one place to ship as base package documentation
rm -rf Licenses
mkdir Licenses
find */ -iname lesser.txt -o -iname license.txt -o -iname gpl.txt -o \
-iname license | while read f; do
b="${f%%/*}"
r="${f#$b}"
x="$(echo "$r" | sed 's|/doc/|/|gi')"
install -m0644 -D "$f" "./Licenses/$b/$x"
done
# hardlink duplicate documentation files
hardlink -cv Docs/ Licenses/
popd
done
%check
export AUTOCC=no
export CC=gcc
TESTDIRS="AMD CAMD CCOLAMD CHOLMOD COLAMD KLU LDL SPQR RBio UMFPACK"
%if "%{?enable_csparse}" == "1"
TESTDIRS="$TESTDIRS CSparse"
%else
TESTDIRS="$TESTDIRS CXSparse"
%endif
for build in SuiteSparse %{?build64:SuiteSparse64 SuiteSparse64_}
do
pushd $build
export CFLAGS="$RPM_OPT_FLAGS"
export LAPACK=""
# Set flags for ILP64 build
if [ $build = SuiteSparse64 ]
then
export CFLAGS="$CFLAGS -DBLAS64"
export BLAS=-l%{blaslib}64
export LIBRARY_SUFFIX=64
elif [ $build = SuiteSparse64_ ]
then
export CFLAGS="$CFLAGS -DBLAS64 -DSUN64"
export BLAS=-lopenblas64_
export LIBRARY_SUFFIX=64_
else
export BLAS=-l%{blaslib}
fi
for d in $TESTDIRS ; do
LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir}/ %make_build -C $d/Demo CFLAGS="$CFLAGS" LIB="%{?__global_ldflags} -lm -lrt" BLAS="$BLAS" LIBRARY_SUFFIX="$LIBRARY_SUFFIX" SPQR_CONFIG=-DHAVE_TBB TBB=-ltbb
done
# hardlink duplicate documentation files
hardlink -cv Docs/ Licenses/
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
popd
done
%files
%license Licenses
%{_libdir}/lib*.so.*
%license SuiteSparse/Licenses
%{_libdir}/libamd.so.%{amd_version_major}*
%{_libdir}/libbtf.so.%{btf_version_major}*
%{_libdir}/libcamd.so.%{camd_version_major}*
%{_libdir}/libccolamd.so.%{ccolamd_version_major}*
%{_libdir}/libcholmod.so.%{cholmod_version_major}*
%{_libdir}/libcolamd.so.%{colamd_version_major}*
%if "%{?enable_csparse}" == "1"
%{_libdir}/libcsparse.so.%{csparse_version_major}*
%endif
%{_libdir}/libcxsparse.so.%{cxsparse_version_major}*
%{_libdir}/libklu.so.%{klu_version_major}*
%{_libdir}/libldl.so.%{ldl_version_major}*
%{_libdir}/librbio.so.%{rbio_version_major}*
%{_libdir}/libspqr.so.%{spqr_version_major}*
%{_libdir}/libsuitesparseconfig.so.%{SuiteSparse_config_major}*
%{_libdir}/libumfpack.so.%{umfpack_version_major}*
%files devel
%{_includedir}/%{name}
%{_libdir}/lib*.so
%exclude %{_libdir}/lib*64*.so
%files static
%{_libdir}/lib*.a
%exclude %{_libdir}/lib*64*.a
%if 0%{?build64}
%files -n %{name}64
%license SuiteSparse64/Licenses
%{_libdir}/libamd64.so.%{amd_version_major}*
%{_libdir}/libbtf64.so.%{btf_version_major}*
%{_libdir}/libcamd64.so.%{camd_version_major}*
%{_libdir}/libccolamd64.so.%{ccolamd_version_major}*
%{_libdir}/libcholmod64.so.%{cholmod_version_major}*
%{_libdir}/libcolamd64.so.%{colamd_version_major}*
%if "%{?enable_csparse}" == "1"
%{_libdir}/libcsparse64.so.%{csparse_version_major}*
%endif
%{_libdir}/libcxsparse64.so.%{cxsparse_version_major}*
%{_libdir}/libklu64.so.%{klu_version_major}*
%{_libdir}/libldl64.so.%{ldl_version_major}*
%{_libdir}/librbio64.so.%{rbio_version_major}*
%{_libdir}/libspqr64.so.%{spqr_version_major}*
%{_libdir}/libsuitesparseconfig64.so.%{SuiteSparse_config_major}*
%{_libdir}/libumfpack64.so.%{umfpack_version_major}*
%files -n %{name}64-devel
%{_libdir}/lib*64.so
%files -n %{name}64-static
%{_libdir}/lib*64.a
%files -n %{name}64_
%license SuiteSparse64_/Licenses
%{_libdir}/libamd64_.so.%{amd_version_major}*
%{_libdir}/libbtf64_.so.%{btf_version_major}*
%{_libdir}/libcamd64_.so.%{camd_version_major}*
%{_libdir}/libccolamd64_.so.%{ccolamd_version_major}*
%{_libdir}/libcholmod64_.so.%{cholmod_version_major}*
%{_libdir}/libcolamd64_.so.%{colamd_version_major}*
%if "%{?enable_csparse}" == "1"
%{_libdir}/libcsparse64_.so.%{csparse_version_major}*
%endif
%{_libdir}/libcxsparse64_.so.%{cxsparse_version_major}*
%{_libdir}/libklu64_.so.%{klu_version_major}*
%{_libdir}/libldl64_.so.%{ldl_version_major}*
%{_libdir}/librbio64_.so.%{rbio_version_major}*
%{_libdir}/libspqr64_.so.%{spqr_version_major}*
%{_libdir}/libsuitesparseconfig64_.so.%{SuiteSparse_config_major}*
%{_libdir}/libumfpack64_.so.%{umfpack_version_major}*
%files -n %{name}64_-devel
%{_libdir}/lib*64_.so
%files -n %{name}64_-static
%{_libdir}/lib*64_.a
%endif
%files doc
%doc Doc/*
%doc SuiteSparse/Doc/*
%changelog
* Mon Feb 21 2022 Michal Sekletar <msekleta@redhat.com> - 5.4.0-10
- Disable lazy binding (#2044892)
- Remove RPATH (#2056604)
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 5.4.0-9
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jul 09 2021 Lukas Nykryn <lnykryn@redhat.com> - 5.4.0-8
- drop metis
Resolves: #1977815
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.4.0-7
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Aug 13 2020 Iñaki Úcar <iucar@fedoraproject.org> - 5.4.0-5
- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Oct 14 2019 Orion Poplawski <orion@nwra.com> - 5.4.0-2
- Build ILP64 version (bugz#1294200)
* Sun Sep 29 2019 Orion Poplawski <orion@nwra.com> - 5.4.0-1
- Update to 5.4.0
- Use upstream shared library builds
- Build with metis
- Explicitly list libraries and soname versions
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.6-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jun 13 2019 Kalev Lember <klember@redhat.com> - 4.4.6-19
- Use __global_ldflags when building tests
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.6-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Oct 13 2018 Jerry James <loganjerry@gmail.com> - 4.4.6-17
- Rebuild for tbb 2019_U1
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 4.4.6-16
- Rebuild with fixed binutils
* Fri Jul 27 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.4.6-15
- Rebuild for new binutils
* Mon Jul 16 2018 Dominik Mierzejewski <rpm@greysector.net> - 4.4.6-14
- use openblas instead of atlas (#1506933)
- enable parallel make for faster builds and drop duplicate -fPIC
- drop non-standard -O3 and duplicate -fexceptions from default CFLAGS
- build and run demos in check section
- drop redundant ldconfig scriptlets
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.6-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Feb 20 2018 Nils Philippsen <nils@tiptoe.de> - 4.4.6-12
- require gcc, gcc-c++ for building
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.6-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild