From 29e15986f04787c10b9837db94132d5e4637fe72 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 31 May 2019 13:14:43 +0100 Subject: [PATCH] Add patches_touch_autotools mechanism from nbdkit. --- libguestfs.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libguestfs.spec b/libguestfs.spec index 3af6c86..4d91c91 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -30,6 +30,9 @@ # Verify tarball signature with GPGv2 (only possible for stable branches). %global verify_tarball_signature %{nil} +# If there are patches which touch autotools files, set this to 1. +%global patches_touch_autotools 1 + # Filter perl provides. %{?perl_default_filter} @@ -64,6 +67,10 @@ Source6: yum.conf.in Source7: libguestfs.keyring %endif +%if 0%{patches_touch_autotools} +BuildRequires: autoconf, automake, libtool, gettext-devel +%endif + # Basic build requirements for the library and virt tools. BuildRequires: gcc, gcc-c++ BuildRequires: rpcgen @@ -803,6 +810,10 @@ gpgv2 --homedir "$tmphome" --keyring %{SOURCE7} %{SOURCE1} %{SOURCE0} %setup -q %autopatch -p1 +%if 0%{patches_touch_autotools} +autoreconf -i +%endif + # For sVirt to work, the local temporary directory we use in the tests # must be labelled the same way as /tmp. This doesn't work if either # the directory is on NFS (no SELinux labels) or if SELinux is