|
|
@ -1,19 +1,24 @@
|
|
|
|
%global __cmake_in_source_build 1
|
|
|
|
|
|
|
|
%global genname superlu
|
|
|
|
%global genname superlu
|
|
|
|
%global libver 5
|
|
|
|
%global libver 5
|
|
|
|
|
|
|
|
|
|
|
|
Name: SuperLU
|
|
|
|
Name: SuperLU
|
|
|
|
Version: 5.2.1
|
|
|
|
Version: 5.2.2
|
|
|
|
Release: 15%{?dist}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Subroutines to solve sparse linear systems
|
|
|
|
Summary: Subroutines to solve sparse linear systems
|
|
|
|
License: BSD and GPLv2+
|
|
|
|
License: BSD and GPLv2+
|
|
|
|
URL: https://portal.nersc.gov/project/sparse/superlu/
|
|
|
|
URL: https://portal.nersc.gov/project/sparse/superlu/
|
|
|
|
Source0: https://github.com/xiaoyeli/superlu/archive/v%{version}/%{genname}-%{version}.tar.gz
|
|
|
|
Source0: https://github.com/xiaoyeli/superlu/archive/v%{version}/%{genname}-%{version}.tar.gz
|
|
|
|
Patch0: %{genname}-cmake-includedir.patch
|
|
|
|
|
|
|
|
Patch1: %{genname}-removemc64.patch
|
|
|
|
# Use a pre-made configuration file for Make
|
|
|
|
|
|
|
|
Source1: %{name}-fedora-make.inc.in
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Patch0: %{genname}-removemc64.patch
|
|
|
|
|
|
|
|
|
|
|
|
# Patch soname (5 -> 5.2) of shared library
|
|
|
|
# Patch soname (5 -> 5.2) of shared library
|
|
|
|
Patch2: %{name}-%{version}-set_soname.patch
|
|
|
|
Patch1: %{name}-%{version}-set_soname.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Fix ldflags of example files
|
|
|
|
|
|
|
|
Patch2: %{name}-fix_example_builds.patch
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} >= 33
|
|
|
|
%if 0%{?fedora} >= 33
|
|
|
|
BuildRequires: pkgconfig(flexiblas)
|
|
|
|
BuildRequires: pkgconfig(flexiblas)
|
|
|
@ -56,8 +61,15 @@ The %{name}-doc package contains all the help HTML documentation.
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{genname}-%{version} -p1
|
|
|
|
%autosetup -n %{genname}-%{version} -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rm -f make.inc
|
|
|
|
|
|
|
|
cp -pf %{SOURCE1} make.inc.in
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Remove bundled BLAS
|
|
|
|
|
|
|
|
rm -rf CBLAS
|
|
|
|
|
|
|
|
|
|
|
|
rm -fr SRC/mc64ad.f.bak
|
|
|
|
rm -fr SRC/mc64ad.f.bak
|
|
|
|
find . -type f | sed -e "/TESTING/d" | xargs chmod a-x
|
|
|
|
find . -type f | sed -e "/TESTING/d" | xargs chmod a-x
|
|
|
|
|
|
|
|
|
|
|
|
# Remove the shippped executables from EXAMPLE
|
|
|
|
# Remove the shippped executables from EXAMPLE
|
|
|
|
find EXAMPLE -type f | while read file
|
|
|
|
find EXAMPLE -type f | while read file
|
|
|
|
do
|
|
|
|
do
|
|
|
@ -65,20 +77,32 @@ do
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
# Change optimization level
|
|
|
|
# Change optimization level
|
|
|
|
sed -i.bak '/NOOPTS/d' make.inc.in
|
|
|
|
|
|
|
|
sed -e 's|-O0|-O2|g' -i SRC/CMakeLists.txt
|
|
|
|
sed -e 's|-O0|-O2|g' -i SRC/CMakeLists.txt
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
# Do not use bundled CBLAS code
|
|
|
|
mkdir -p build
|
|
|
|
%cmake3 -B build \
|
|
|
|
%cmake3 -S . -B build \
|
|
|
|
-Denable_blaslib:BOOL=OFF \
|
|
|
|
-Denable_internal_blaslib:BOOL=NO \
|
|
|
|
%if 0%{?fedora} >= 33
|
|
|
|
%if 0%{?fedora} >= 33
|
|
|
|
-DBLAS_LIBRARIES=-lflexiblas \
|
|
|
|
-DTPL_BLAS_LIBRARIES="`pkg-config --libs flexiblas`" \
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
-DTPL_BLAS_LIBRARIES=-lopenblas \
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
-DCMAKE_BUILD_TYPE:STRING=Release
|
|
|
|
-DCMAKE_BUILD_TYPE:STRING=Release \
|
|
|
|
|
|
|
|
-DCMAKE_INSTALL_INCLUDEDIR:PATH=include/%{name} \
|
|
|
|
|
|
|
|
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
|
|
|
|
|
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES
|
|
|
|
%make_build -C build
|
|
|
|
%make_build -C build
|
|
|
|
|
|
|
|
|
|
|
|
# Compile Fortran example interface to use the C routines in SuperLU
|
|
|
|
# Compile Fortran example interface to use the C routines in SuperLU
|
|
|
|
|
|
|
|
%if 0%{?fedora} >= 33
|
|
|
|
|
|
|
|
export TPL_BLAS_LIBRARIES="`pkg-config --libs flexiblas`" \
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
export TPL_BLAS_LIBRARIES=-lopenblas \
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
export LDFLAGS="%{build_ldflags}"
|
|
|
|
|
|
|
|
export FFLAGS="%{build_fflags}"
|
|
|
|
|
|
|
|
export CFLAGS="%{build_cflags}"
|
|
|
|
make -C FORTRAN
|
|
|
|
make -C FORTRAN
|
|
|
|
make -C EXAMPLE
|
|
|
|
make -C EXAMPLE
|
|
|
|
|
|
|
|
|
|
|
@ -105,8 +129,6 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
|
|
|
make clean
|
|
|
|
make clean
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%files
|
|
|
|
%license License.txt
|
|
|
|
%license License.txt
|
|
|
|
%{_libdir}/libsuperlu.so.%{libver}*
|
|
|
|
%{_libdir}/libsuperlu.so.%{libver}*
|
|
|
@ -114,12 +136,17 @@ popd
|
|
|
|
%files devel
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_libdir}/libsuperlu.so
|
|
|
|
%{_libdir}/libsuperlu.so
|
|
|
|
|
|
|
|
%{_libdir}/cmake/%{genname}/
|
|
|
|
|
|
|
|
%{_libdir}/pkgconfig/%{genname}.pc
|
|
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%files doc
|
|
|
|
%license License.txt
|
|
|
|
%license License.txt
|
|
|
|
%doc DOC
|
|
|
|
%doc DOC
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Thu Jan 28 2021 Antonio Trande <sagitter@fedoraproject.org> - 5.2.2-1
|
|
|
|
|
|
|
|
- Release 5.2.2
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-15
|
|
|
|
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-15
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|