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