Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/metis.git#32a8f075b44980df8d28e0698c652083adc8d04c
This commit is contained in:
DistroBaker 2021-01-23 21:36:37 +00:00
parent 9200f5b9b1
commit 2544422622

View File

@ -1,5 +1,4 @@
%undefine _ld_as_needed
%global __cmake_in_source_build 1
%if %{?__isa_bits:%{__isa_bits}}%{!?__isa_bits:32} == 64
%global arch64 1
@ -9,7 +8,7 @@
Name: metis
Version: 5.1.0
Release: 27%{?dist}
Release: 28%{?dist}
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering
License: ASL 2.0 and BSD and LGPLv2+
URL: http://glaros.dtc.umn.edu/gkhome/views/%{name}
@ -37,6 +36,7 @@ Patch4: %{name}_lib64.patch
Patch5: %{name}-pcre2.patch
BuildRequires: make
BuildRequires: cmake3, gcc, gcc-c++
%if 0%{?rhel} && 0%{?rhel} < 9
BuildRequires: pcre-devel
@ -102,15 +102,14 @@ cp -a %{name}-%{version} metis64
%endif
%build
pushd %{name}-%{version}/build
%if 0%{?rhel} && 0%{?rhel} < 9
PCRE_LDFLAGS="-lpcreposix"
%else
PCRE_LDFLAGS="-lpcre2-posix"
%endif
%cmake3 \
%cmake3 -S %{name}-%{version} -B %{name}-%{version}/build \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DGKLIB_PATH=../GKlib \
-DGKLIB_PATH=%{name}-%{version}/GKlib \
-DSHARED:BOOL=TRUE \
-DOPENMP:BOOL=ON \
-DPCRE:BOOL=ON \
@ -118,24 +117,23 @@ PCRE_LDFLAGS="-lpcre2-posix"
-DCMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} $PCRE_LDFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} $PCRE_LDFLAGS" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} ..
%make_build
popd
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}
%make_build -C %{name}-%{version}/build
%if 0%{?arch64}
cd metis64
patch -p0 < %{PATCH2}
patch -p0 < %{PATCH4}
mkdir -p build64
pushd build64
cd ..
mkdir -p metis64/build64
%if 0%{?rhel} && 0%{?rhel} < 9
PCRE_LDFLAGS="-lpcreposix"
%else
PCRE_LDFLAGS="-lpcre2-posix"
%endif
%cmake3 \
%cmake3 -S metis64 -B metis64/build64 \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DGKLIB_PATH=../GKlib \
-DGKLIB_PATH=metis64/GKlib \
-DSHARED:BOOL=TRUE \
-DOPENMP:BOOL=ON \
-DPCRE:BOOL=ON \
@ -144,9 +142,7 @@ PCRE_LDFLAGS="-lpcre2-posix"
-DCMAKE_EXE_LINKER_FLAGS_RELEASE:STRING="%{__global_ldflags} $PCRE_LDFLAGS" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} ..
%make_build
popd
cd ../
%make_build -C metis64/build64
%endif
%install
@ -225,12 +221,6 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./graphchk64 4elt.graph
%endif
popd
%ldconfig_scriptlets
%if 0%{?arch64}
%ldconfig_scriptlets -n metis64
%endif
%files
%doc %{name}-%{version}/Changelog %{name}-%{version}/manual/manual.pdf
%license %{name}-%{version}/LICENSE.txt
@ -266,6 +256,9 @@ popd
%endif
%changelog
* Sat Jan 23 2021 Antonio Trande <sagitter@fedoraproject.org> - 5.1.0-28
- Change CMake options
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-27
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild