From 622648544d3e51654b9c32e92ef06f726d470cb2 Mon Sep 17 00:00:00 2001 From: Mukundan Ragavan Date: Sat, 26 Mar 2016 12:45:04 -0400 Subject: [PATCH] Update to 5.1.1 - Remove format security patch - not needed anymore - Edit patches to be version specific - Renamed patch4 to be consistent with others - Minor spec file housekeeping --- .gitignore | 1 + SuperLU.spec | 36 ++++++++++++--------- sources | 2 +- superlu-511-add-fpic.patch | 12 +++++++ superlu-511-build-shared-lib3.patch | 39 ++++++++++++++++++++++ superlu-511-fix-testsuite.patch | 50 +++++++++++++++++++++++++++++ superlu-removemc64.patch | 25 +++++++++++++++ 7 files changed, 149 insertions(+), 16 deletions(-) create mode 100644 superlu-511-add-fpic.patch create mode 100644 superlu-511-build-shared-lib3.patch create mode 100644 superlu-511-fix-testsuite.patch create mode 100644 superlu-removemc64.patch diff --git a/.gitignore b/.gitignore index 277c383..02a113e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /superlu_4.3.tar.gz +/superlu_5.1.1.tar.gz diff --git a/SuperLU.spec b/SuperLU.spec index 3502c7e..394655c 100644 --- a/SuperLU.spec +++ b/SuperLU.spec @@ -1,23 +1,24 @@ +%global genname superlu +%global majorver 5.1 + Name: SuperLU -Version: 4.3 -Release: 14%{?dist} +Version: 5.1.1 +Release: 1%{?dist} Summary: Subroutines to solve sparse linear systems %{?el5:Group: System/Libraries} License: BSD URL: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/ -Source0: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_%{version}.tar.gz +Source0: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/%{genname}_%{version}.tar.gz # Build with -fPIC -Patch0: %{name}-add-fpic.patch +Patch0: %{genname}-511-add-fpic.patch # Build shared library -Patch1: %{name}-build-shared-lib3.patch -# Fixes FTBFS if "-Werror=format-security" flag is used (#1037343) -Patch2: %{name}-fix-format-security.patch +Patch1: %{genname}-511-build-shared-lib3.patch # Fixes testsuite -Patch3: SuperLU-fix-testsuite.patch +Patch3: %{genname}-511-fix-testsuite.patch # remove non-free mc64 functionality # patch obtained from the debian package -Patch4: SuperLU-removemc64.patch +Patch4: %{genname}-removemc64.patch %{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)} BuildRequires: atlas-devel @@ -43,12 +44,10 @@ and libraries for use with %{name} package. %setup -q -n %{name}_%{version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 %patch3 -p1 %patch4 rm -fr SRC/mc64ad.f.bak -rm FORTRAN/*.old FORTRAN/*.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 @@ -58,8 +57,8 @@ done cp -p MAKE_INC/make.linux make.inc sed -i -e "s|-O3|$RPM_OPT_FLAGS|" \ -e "s|\$(SUPERLULIB) ||" \ - -e "s|\$(HOME)/Codes/%{name}_%{version}|%{_builddir}/%{name}_%{version}|" \ - -e 's!lib/libsuperlu_4.3.a$!SRC/libsuperlu.so!' \ + -e "s|\$(HOME)/Dropbox/Codes/%{name}/%{name}|%{_builddir}/%{name}_%{version}|" \ + -e 's!lib/libsuperlu_5.1.a$!SRC/libsuperlu.so!' \ -e 's!-shared!& %{__global_ldflags}!' \ %if 0%{?fedora} >= 21 -e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lsatlas|" \ @@ -76,7 +75,7 @@ make -C TESTING %{?el5:rm -rf %{buildroot}} mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir}/%{name} -install -p SRC/libsuperlu.so.%{version} %{buildroot}%{_libdir} +install -p SRC/libsuperlu.so.%{majorver} %{buildroot}%{_libdir} install -p SRC/*.h %{buildroot}%{_includedir}/%{name} chmod -x %{buildroot}%{_includedir}/%{name}/*.h cp -Pp SRC/libsuperlu.so %{buildroot}%{_libdir} @@ -99,7 +98,7 @@ popd %files %doc README -%{_libdir}/libsuperlu.so.* +%{_libdir}/libsuperlu.so.%{majorver} %files devel %doc DOC EXAMPLE FORTRAN @@ -107,6 +106,13 @@ popd %{_libdir}/libsuperlu.so %changelog +* Mon Mar 21 2016 Mukundan Ragavan - 5.1.1-1 +- Update to 5.1.1 +- Remove format security patch - not needed anymore +- Edit patches to be version specific +- Renamed patch4 to be consistent with others +- Minor spec file housekeeping + * Wed Feb 03 2016 Fedora Release Engineering - 4.3-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index a378cef..63d1e8f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b72c6309f25e9660133007b82621ba7c superlu_4.3.tar.gz +260a3cd90b2100122abff38587a8290a superlu_5.1.1.tar.gz diff --git a/superlu-511-add-fpic.patch b/superlu-511-add-fpic.patch new file mode 100644 index 0000000..ab1e0cc --- /dev/null +++ b/superlu-511-add-fpic.patch @@ -0,0 +1,12 @@ +--- SuperLU_5.1.1/MAKE_INC/make.linux.orig 2016-03-26 08:43:03.038994570 -0400 ++++ SuperLU_5.1.1/MAKE_INC/make.linux 2016-03-26 08:44:09.141092611 -0400 +@@ -46,7 +46,8 @@ + RANLIB = ranlib + + CC = gcc +-CFLAGS = -O3 -g ++FPIC = -fPIC ++CFLAGS = -O3 $(FPIC) + NOOPTS = + FORTRAN = gfortran #g77 + FFLAGS = -O2 -g -fopenmp diff --git a/superlu-511-build-shared-lib3.patch b/superlu-511-build-shared-lib3.patch new file mode 100644 index 0000000..88e7aa3 --- /dev/null +++ b/superlu-511-build-shared-lib3.patch @@ -0,0 +1,39 @@ +--- SuperLU_5.1.1/SRC/Makefile.orig 2016-03-26 08:47:18.885503561 -0400 ++++ SuperLU_5.1.1/SRC/Makefile 2016-03-26 08:52:10.512497969 -0400 +@@ -98,7 +98,7 @@ + ilu_zcolumn_dfs.o ilu_zpanel_dfs.o ilu_zcopy_to_ucol.o \ + ilu_zpivotL.o zdiagonal.o zlacon2.o dzsum1.o izmax1.o + +-all: single double complex complex16 ++all: sharedlib + + single: $(SLUSRC) $(ALLAUX) $(SCAUX) + $(ARCH) $(ARCHFLAGS) $(SUPERLULIB) $(SLUSRC) $(ALLAUX) $(SCAUX) +@@ -116,17 +116,23 @@ + $(ARCH) $(ARCHFLAGS) $(SUPERLULIB) $(ZLUSRC) $(ALLAUX) $(DZLAUX) + $(RANLIB) $(SUPERLULIB) + ++sharedlib: $(ALLAUX) $(LAAUX) $(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) $(DZLAUX) $(SLUSRC) $(DLUSRC) $(CLUSRC) $(ZLUSRC) ++ $(CC) $(CFLAGS) $(LIBS) -shared -Wl,-soname,libsuperlu.so.5.1 -o libsuperlu.so.5.1 \ ++ $(ALLAUX) $(LAAUX) $(SLASRC) $(DLASRC) $(CLASRC) $(ZLASRC) $(SCLAUX) \ ++ $(DZLAUX) $(SLUSRC) $(DLUSRC) $(CLUSRC) $(ZLUSRC) ++ ln -sf libsuperlu.so.5.1 libsuperlu.so ++ + + ################################## + # Do not optimize these routines # + ################################## +-smach.o: smach.c ; $(CC) -c $(NOOPTS) $(CDEFS) $< +-dmach.o: dmach.c ; $(CC) -c $(NOOPTS) $(CDEFS) $< +-superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) $< ++slamch.o: slamch.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $(CDEFS) $< ++dlamch.o: dlamch.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $(CDEFS) $< ++superlu_timer.o: superlu_timer.c ; $(CC) $(FPIC) $(LIBS) -c $(NOOPTS) $< + ################################## + + .c.o: +- $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) -c $< $(VERBOSE) ++ $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) $(LIBS) -c $< $(VERBOSE) + + .f.o: + $(FORTRAN) $(FFLAGS) -c $< diff --git a/superlu-511-fix-testsuite.patch b/superlu-511-fix-testsuite.patch new file mode 100644 index 0000000..798690b --- /dev/null +++ b/superlu-511-fix-testsuite.patch @@ -0,0 +1,50 @@ +--- SuperLU_5.1.1/TESTING/Makefile.orig 2016-03-26 08:56:10.347188385 -0400 ++++ SuperLU_5.1.1/TESTING/Makefile 2016-03-26 08:58:39.763126530 -0400 +@@ -52,9 +52,9 @@ + + single: ./stest stest.out + +-./stest: $(SLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB) ++./stest: $(SLINTST) $(ALINTST) $(TMGLIB) + $(LOADER) $(LOADOPTS) $(SLINTST) $(ALINTST) \ +- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@ ++ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@ + + stest.out: stest stest.csh + @echo Testing SINGLE PRECISION linear equation routines +@@ -62,9 +62,9 @@ + + double: ./dtest dtest.out + +-./dtest: $(DLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB) ++./dtest: $(DLINTST) $(ALINTST) $(TMGLIB) + $(LOADER) $(LOADOPTS) $(DLINTST) $(ALINTST) \ +- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@ ++ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@ + + dtest.out: dtest dtest.csh + @echo Testing DOUBLE PRECISION linear equation routines +@@ -72,9 +72,9 @@ + + complex: ./ctest ctest.out + +-./ctest: $(CLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB) ++./ctest: $(CLINTST) $(ALINTST) $(TMGLIB) + $(LOADER) $(LOADOPTS) $(CLINTST) $(ALINTST) \ +- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@ ++ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@ + + ctest.out: ctest ctest.csh + @echo Testing SINGLE COMPLEX linear equation routines +@@ -82,9 +82,9 @@ + + complex16: ./ztest ztest.out + +-./ztest: $(ZLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB) ++./ztest: $(ZLINTST) $(ALINTST) $(TMGLIB) + $(LOADER) $(LOADOPTS) $(ZLINTST) $(ALINTST) \ +- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@ ++ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@ + + ztest.out: ztest ztest.csh + @echo Testing DOUBLE COMPLEX linear equation routines diff --git a/superlu-removemc64.patch b/superlu-removemc64.patch new file mode 100644 index 0000000..00d36af --- /dev/null +++ b/superlu-removemc64.patch @@ -0,0 +1,25 @@ +Description: Provide stubs for the two functions whose implementation is nonfree +Author: Sébastien Villemot +Forwarded: not-needed +Last-Update: 2013-11-27 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- /dev/null ++++ b/SRC/mc64ad.c +@@ -0,0 +1,16 @@ ++#include ++#include ++ ++void mc64id_(int *a) ++{ ++ fprintf(stderr, "SuperLU: MC64 functionality not available (it uses non-free code). Aborting.\n"); ++ abort(); ++} ++ ++void mc64ad_(int *a, int *b, int *c, int d[], int e[], double f[], ++ int *g, int h[], int *i, int j[], int *k, double l[], ++ int m[], int n[]) ++{ ++ fprintf(stderr, "SuperLU: MC64 functionality not available (it uses non-free code). Aborting.\n"); ++ abort(); ++}