Used always 'cmake' compiler

This commit is contained in:
sagitter 2015-12-23 22:26:47 +01:00
parent 05c42f833d
commit d4b4d14288

View File

@ -2,15 +2,22 @@
%global _hardened_build 1
%endif
%if 0%{?rhel} < 7
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
%endif
Name: metis
Version: 5.1.0
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering
License: ASL 2.0 and BSD and LGPLv2+
Group: Development/Libraries
URL: http://glaros.dtc.umn.edu/gkhome/views/%{name}
Source0: http://glaros.dtc.umn.edu/gkhome/fetch/sw/%{name}/%{name}-%{version}.tar.gz
##OpenMPI missing
ExcludeArch: s390 s390x
## This patch sets up libmetis soname of libmetis
Patch0: %{name}-libmetis.patch
@ -28,13 +35,7 @@ Patch2: %{name}-width-datatype.patch
## This patch sets up GKREGEX, GKRAND, libsuffix options to the Makefiles
Patch4: %{name}-GKREGEX-GKRAND-LIBSUFFIX-fix.patch
%if 0%{?el6}
BuildRequires: cmake28
Conflicts: cmake < 2.8
%else
BuildRequires: cmake >= 2.8
%endif
BuildRequires: cmake
BuildRequires: openmpi-devel
BuildRequires: pcre-devel
BuildRequires: help2man
@ -68,22 +69,18 @@ fi
# Build metis
cd build
%if 0%{?el6}
%cmake28 \
%else
export LDFLAGS="%{__global_ldflags} -Wl,-z,now"
%cmake \
%endif
-DCMAKE_C_COMPILER=%{_bindir}/gcc \
-DCMAKE_CXX_COMPILER=%{_bindir}/g++ \
-DGKLIB_PATH=../GKlib \
-DSHARED=1 \
-DOPENMP=%{_includedir}/openmpi-%{_arch} \
-DPCRE=%{_includedir} \
-DCMAKE_CXX_FLAGS="%{optflags} -Wl,-z,now -fopenmp -pthread" \
-DCMAKE_C_FLAGS="%{optflags} -Wl,-z,now -fopenmp -pthread" \
-DCMAKE_VERBOSE_MAKEFILE=1 \
-DCMAKE_INSTALL_PREFIX=%{_prefix} ..
-DCMAKE_C_COMPILER=%{_bindir}/gcc \
-DCMAKE_CXX_COMPILER=%{_bindir}/g++ \
-DGKLIB_PATH=../GKlib \
-DSHARED=1 \
-DOPENMP=%{_includedir}/openmpi-%{_arch} \
-DPCRE=%{_includedir} \
-DCMAKE_CXX_FLAGS="%{optflags} -Wl,-z,relro -DNDEBUG -Wl,-z,now -fopenmp -pthread" \
-DCMAKE_C_FLAGS="%{optflags} -Wl,-z,relro -DNDEBUG -Wl,-z,now -fopenmp -pthread" \
-DCMAKE_VERBOSE_MAKEFILE=1 \
-DCMAKE_INSTALL_PREFIX=%{_prefix} ..
make %{?_smp_mflags}
cd ../
@ -156,6 +153,9 @@ popd
%{_libdir}/lib%{name}.so
%changelog
* Wed Dec 23 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.1.0-8
- Used always 'cmake' compiler
* Thu Oct 29 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.1.0-7
- Rebuild for cmake 3.4.0
- Hardened builds on <F23