fixed FTBFS if "-Werror=format-security" flag is used (#1037343)

devel-pkg must Requires: %%{name}%%{?_isa}
apply proper LDFLAGS
added needed bits for el5
reenable testsuite using Patch3
epel9
Björn Esser 11 years ago
parent aeb4d02405
commit d1f90c92e1

@ -0,0 +1,13 @@
Index: SuperLU_4.3/SRC/util.c
===================================================================
--- SuperLU_4.3.orig/SRC/util.c
+++ SuperLU_4.3/SRC/util.c
@@ -29,7 +29,7 @@
void superlu_abort_and_exit(char* msg)
{
- fprintf(stderr, msg);
+ fputs(stderr, msg);
exit (-1);
}

@ -0,0 +1,52 @@
Index: SuperLU_4.3/TESTING/Makefile
===================================================================
--- SuperLU_4.3.orig/TESTING/Makefile
+++ SuperLU_4.3/TESTING/Makefile
@@ -52,9 +52,9 @@ testmat:
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 @@ stest.out: stest stest.csh
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 @@ dtest.out: dtest dtest.csh
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 @@ ctest.out: ctest ctest.csh
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

@ -1,7 +1,8 @@
Name: SuperLU
Version: 4.3
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Subroutines to solve sparse linear systems
%{?el5:Group: System/Libraries}
License: BSD
URL: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/
@ -10,8 +11,12 @@ Source0: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_%{version}.tar
Patch0: %{name}-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
# Fixes testsuite
Patch3: SuperLU-fix-testsuite.patch
%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
BuildRequires: atlas-devel
BuildRequires: csh
@ -23,9 +28,9 @@ preordering for sparsity is completely separate from the factorization.
%package devel
Summary: Header files and libraries for SuperLU development
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
%{?el5:Group: Development/Libraries}
Requires: %{name}%{?_isa} = %{version}-%{release}
%{?el5:Requires: pkgconfig}
%description devel
The %{name}-devel package contains the header files
@ -35,26 +40,33 @@ and libraries for use with CUnit package.
%setup -q -n %{name}_%{version}
%patch0 -p1
%patch1 -p1
chmod a-x SRC/qselect.c EXAMPLE/cg20.cua
%patch2 -p1
%patch3 -p1
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
[ "$(file $file | awk '{print $2}')" = ELF ] && rm $file || :
done
cp -p MAKE_INC/make.linux make.inc
sed -i "s|-O3|$RPM_OPT_FLAGS|" make.inc
sed -i "s|\$(SUPERLULIB) ||" make.inc
sed -i "s|\$(HOME)/Codes/%{name}_%{version}|%{_builddir}/%{name}_%{version}|" 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!-shared!& %{__global_ldflags}!' \
%if 0%{?fedora} >= 21
sed -i "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lsatlas|" make.inc
-e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lsatlas|" \
%else
sed -i "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lf77blas|" make.inc
-e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lf77blas|" \
%endif
make.inc
%build
make %{?_smp_mflags} superlulib
make -C TESTING
%install
%{?el5:rm -rf %{buildroot}}
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}/%{name}
install -p SRC/libsuperlu.so.%{version} %{buildroot}%{_libdir}
@ -62,6 +74,18 @@ install -p SRC/*.h %{buildroot}%{_includedir}/%{name}
chmod -x %{buildroot}%{_includedir}/%{name}/*.h
cp -Pp SRC/libsuperlu.so %{buildroot}%{_libdir}
%check
pushd TESTING
for _test in c d s z
do
chmod +x ${_test}test.csh
./${_test}test.csh
done
popd
%{?el5:%clean}
%{?el5:rm -rf %{buildroot}}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -76,6 +100,13 @@ cp -Pp SRC/libsuperlu.so %{buildroot}%{_libdir}
%{_libdir}/libsuperlu.so
%changelog
* Mon Jan 06 2014 Björn Esser <bjoern.esser@gmail.com> - 4.3-8
- fixed FTBFS if "-Werror=format-security" flag is used (#1037343)
- devel-pkg must Requires: %%{name}%%{?_isa}
- apply proper LDFLAGS
- added needed bits for el5
- reenable testsuite using Patch3
* Fri Oct 4 2013 Orion Poplawski <orion@cora.nwra.com> - 4.3-7
- Rebuild for atlas 3.10
- Handle UnversionedDocDirs change

Loading…
Cancel
Save