diff --git a/.gitignore b/.gitignore index ee7c990..adb7e63 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /superlu_5.2.0.tar.gz /superlu_5.2.1.tar.gz /superlu-5.2.1.tar.gz +/superlu-5.2.2.tar.gz diff --git a/SuperLU-5.2.1-set_soname.patch b/SuperLU-5.2.2-set_soname.patch similarity index 74% rename from SuperLU-5.2.1-set_soname.patch rename to SuperLU-5.2.2-set_soname.patch index d362e87..dde86ae 100644 --- a/SuperLU-5.2.1-set_soname.patch +++ b/SuperLU-5.2.2-set_soname.patch @@ -1,11 +1,11 @@ --- a/SRC/CMakeLists.orig.txt 2018-04-25 15:17:39.786715000 +0200 +++ b/SRC/CMakeLists.txt 2018-04-25 15:25:00.253317607 +0200 -@@ -230,7 +230,7 @@ - - target_link_libraries(superlu ${BLAS_LIB} m) +@@ -242,7 +242,7 @@ + $ + ) set_target_properties(superlu PROPERTIES - VERSION ${PROJECT_VERSION} SOVERSION ${VERSION_MAJOR} + VERSION ${PROJECT_VERSION} SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR} ) - include(GNUInstallDirs) + # Define GNU standard installation directories diff --git a/SuperLU-fedora-make.inc.in b/SuperLU-fedora-make.inc.in new file mode 100644 index 0000000..6b998c0 --- /dev/null +++ b/SuperLU-fedora-make.inc.in @@ -0,0 +1,48 @@ +############################################################################ +# +# Program: SuperLU +# +# Module: make.inc +# +# Purpose: Top-level Definitions +# +# Creation date: May 10, 2015 +# +# Modified: +# +# +############################################################################ +# +# The name of the libraries to be created/linked to +# +SuperLUroot = ${CMAKE_SOURCE_DIR}/build +# +# SuperLUroot = ${CMAKE_INSTALL_PREFIX} +SUPERLULIB = $(SuperLUroot)/SRC/${PROJECT_NAME_LIB_EXPORT} + +#TMGLIB = libtmglib.a + +# BLASDEF = -DUSE_VENDOR_BLAS +BLASLIB = $(TPL_BLAS_LIBRARIES) +LIBS = $(SUPERLULIB) $(BLASLIB) + +# +# The archiver and the flag(s) to use when building archive (library) +# If your system has no ranlib, set RANLIB = echo. +# +ARCH = @CMAKE_AR@ +ARCHFLAGS = cr +RANLIB = @CMAKE_RANLIB@ + +CC = @CMAKE_C_COMPILER@ +CFLAGS = @CMAKE_C_FLAGS_RELEASE@ @CMAKE_C_FLAGS@ +NOOPTS = +FORTRAN = @CMAKE_Fortran_COMPILER@ + +LOADER = $(CC) +LOADOPTS = $(LDFLAGS) + +# +# The directory in which Matlab is installed +# +MATLAB = /Applications/MATLAB_R2015b.app diff --git a/SuperLU-fix_example_builds.patch b/SuperLU-fix_example_builds.patch new file mode 100644 index 0000000..aa1c4b7 --- /dev/null +++ b/SuperLU-fix_example_builds.patch @@ -0,0 +1,54 @@ +--- a/EXAMPLE/Makefile.orig 2020-10-18 00:23:21.000000000 +0200 ++++ b/EXAMPLE/Makefile 2021-01-29 17:58:26.396762602 +0100 +@@ -101,10 +101,10 @@ + $(LOADER) $(LOADOPTS) $(SLINXEXM3) $(LIBS) -lm -o $@ + + sitersol: $(SITSOL) $(SUPERLULIB) +- $(LOADER) $(LOADOPTS) $(SITSOL) $(LIBS) -lm -o $@ ++ $(LOADER) $(LOADOPTS) $(SITSOL) $(LIBS) $(TPL_BLAS_LIBRARIES) -lm -o $@ + + sitersol1: $(SITSOL1) $(SUPERLULIB) +- $(LOADER) $(LOADOPTS) $(SITSOL1) $(LIBS) -lm -o $@ ++ $(LOADER) $(LOADOPTS) $(SITSOL1) $(LIBS) $(TPL_BLAS_LIBRARIES) -lm -o $@ + + dlinsol: $(DLINEXM) $(SUPERLULIB) + $(LOADER) $(LOADOPTS) $(DLINEXM) $(LIBS) -lm -o $@ +@@ -128,10 +128,10 @@ + $(LOADER) $(LOADOPTS) $(SUPERLUEXM) $(LIBS) -lm -o $@ + + ditersol: $(DITSOL) $(SUPERLULIB) +- $(LOADER) $(LOADOPTS) $(DITSOL) $(LIBS) -lm -o $@ ++ $(LOADER) $(LOADOPTS) $(DITSOL) $(LIBS) $(TPL_BLAS_LIBRARIES) -lm -o $@ + + ditersol1: $(DITSOL1) $(SUPERLULIB) +- $(LOADER) $(LOADOPTS) $(DITSOL1) $(LIBS) -lm -o $@ ++ $(LOADER) $(LOADOPTS) $(DITSOL1) $(LIBS) $(TPL_BLAS_LIBRARIES) -lm -o $@ + + clinsol: $(CLINEXM) $(SUPERLULIB) + $(LOADER) $(LOADOPTS) $(CLINEXM) $(LIBS) -lm -o $@ +@@ -152,10 +152,10 @@ + $(LOADER) $(LOADOPTS) $(CLINXEXM3) $(LIBS) -lm -o $@ + + citersol: $(CITSOL) $(SUPERLULIB) +- $(LOADER) $(LOADOPTS) $(CITSOL) $(LIBS) -lm -o $@ ++ $(LOADER) $(LOADOPTS) $(CITSOL) $(LIBS) $(TPL_BLAS_LIBRARIES) -lm -o $@ + + citersol1: $(CITSOL1) $(SUPERLULIB) +- $(LOADER) $(LOADOPTS) $(CITSOL1) $(LIBS) -lm -o $@ ++ $(LOADER) $(LOADOPTS) $(CITSOL1) $(LIBS) $(TPL_BLAS_LIBRARIES) -lm -o $@ + + zlinsol: $(ZLINEXM) $(SUPERLULIB) + $(LOADER) $(LOADOPTS) $(ZLINEXM) $(LIBS) -lm -o $@ +@@ -176,10 +176,10 @@ + $(LOADER) $(LOADOPTS) $(ZLINXEXM3) $(LIBS) -lm -o $@ + + zitersol: $(ZITSOL) $(SUPERLULIB) +- $(LOADER) $(LOADOPTS) $(ZITSOL) $(LIBS) -lm -o $@ ++ $(LOADER) $(LOADOPTS) $(ZITSOL) $(LIBS) $(TPL_BLAS_LIBRARIES) -lm -o $@ + + zitersol1: $(ZITSOL1) $(SUPERLULIB) +- $(LOADER) $(LOADOPTS) $(ZITSOL1) $(LIBS) -lm -o $@ ++ $(LOADER) $(LOADOPTS) $(ZITSOL1) $(LIBS) $(TPL_BLAS_LIBRARIES) -lm -o $@ + + .c.o: + $(CC) $(CFLAGS) $(CDEFS) $(INCLUDEDIR) -c $< $(VERBOSE) diff --git a/SuperLU.spec b/SuperLU.spec index 05ef16f..9f844be 100644 --- a/SuperLU.spec +++ b/SuperLU.spec @@ -1,19 +1,24 @@ -%global __cmake_in_source_build 1 %global genname superlu %global libver 5 Name: SuperLU -Version: 5.2.1 -Release: 15%{?dist} +Version: 5.2.2 +Release: 1%{?dist} Summary: Subroutines to solve sparse linear systems License: BSD and GPLv2+ URL: https://portal.nersc.gov/project/sparse/superlu/ 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 -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 BuildRequires: pkgconfig(flexiblas) @@ -56,8 +61,15 @@ The %{name}-doc package contains all the help HTML documentation. %prep %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 find . -type f | sed -e "/TESTING/d" | xargs chmod a-x + # Remove the shippped executables from EXAMPLE find EXAMPLE -type f | while read file do @@ -65,20 +77,32 @@ do done # Change optimization level -sed -i.bak '/NOOPTS/d' make.inc.in sed -e 's|-O0|-O2|g' -i SRC/CMakeLists.txt %build -# Do not use bundled CBLAS code -%cmake3 -B build \ - -Denable_blaslib:BOOL=OFF \ +mkdir -p build +%cmake3 -S . -B build \ + -Denable_internal_blaslib:BOOL=NO \ %if 0%{?fedora} >= 33 - -DBLAS_LIBRARIES=-lflexiblas \ + -DTPL_BLAS_LIBRARIES="`pkg-config --libs flexiblas`" \ +%else + -DTPL_BLAS_LIBRARIES=-lopenblas \ %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 # 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 EXAMPLE @@ -105,8 +129,6 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir} make clean popd -%ldconfig_scriptlets - %files %license License.txt %{_libdir}/libsuperlu.so.%{libver}* @@ -114,12 +136,17 @@ popd %files devel %{_includedir}/%{name}/ %{_libdir}/libsuperlu.so +%{_libdir}/cmake/%{genname}/ +%{_libdir}/pkgconfig/%{genname}.pc %files doc %license License.txt %doc DOC %changelog +* Thu Jan 28 2021 Antonio Trande - 5.2.2-1 +- Release 5.2.2 + * Mon Jan 25 2021 Fedora Release Engineering - 5.2.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index b7e7d8b..d565943 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (superlu-5.2.1.tar.gz) = c5f9ca6055b6861dcc89e31c446c9f57a4e16333f9f24f109e8f375eded878005fa520ab39d2c1dd0ce12f289f9e251aef47da58c975bf5b1f09ca7539194e90 +SHA512 (superlu-5.2.2.tar.gz) = 091928a3df3433b337ebdacdb28de341d6d29d655965de6ffd656a6de18cf11171555bfd3af73082af62b1cead6835b4c11e4ba524a32db7f7d28db47c9d490c diff --git a/superlu-cmake-includedir.patch b/superlu-cmake-includedir.patch deleted file mode 100644 index c955879..0000000 --- a/superlu-cmake-includedir.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- SuperLU_5.2.1/SRC/CMakeLists.txt 2018-04-13 17:01:44.007761121 +0200 -+++ CMakeLists.txt 2018-04-13 17:01:30.573718261 +0200 -@@ -242,5 +242,5 @@ - - install(FILES ${headers} - # DESTINATION ${CMAKE_INSTALL_PREFIX}/include -- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SuperLU - )