Add generic patches_touch_autotools mechanism for running autoreconf.

(cherry picked from commit 64dbc29874)
(cherry picked from commit 6856676bd4)
This commit is contained in:
Richard W.M. Jones 2018-07-01 16:35:07 +01:00
parent 246b4bd277
commit 37d98a4b3e

View File

@ -43,7 +43,10 @@ Patch4: 0004-perl-Make-example4-and-tar-plugins-conditional-on-en.patch
Patch5: 0005-plugins-nbd-Free-h-handle-along-error-paths.patch
Patch6: 0006-crypto-Fix-error-path-when-sending-to-gnutls-socket.patch
Patch7: 0007-src-main-Add-missing-break-affecting-t-threads-param.patch
%global patches_touch_autotools 1
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool
%endif
%if 0%{?rhel} == 7
# On RHEL 7, nothing in the virt stack is shipped on aarch64 and
@ -391,8 +394,9 @@ tmphome="$(mktemp -d)"
gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%endif
%autosetup -p1
# Temporarily while patch1 touches autotools files.
%if 0%{patches_touch_autotools}
autoreconf -i
%endif
%ifnarch %{complete_test_arches}
# Simplify the test suite so it doesn't require qemu.