From 47c4090eea98fdfa4004b195c751c7f3aea97d5a Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 16 Oct 2016 14:21:20 -0400 Subject: [PATCH] Automatically update autotools for aarch64 compatibility Signed-off-by: Michael Tremer --- macros/build.macro | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/macros/build.macro b/macros/build.macro index 097965300..e1a0a3e72 100644 --- a/macros/build.macro +++ b/macros/build.macro @@ -59,6 +59,18 @@ def MACRO_PYTHON_COMPILE fi end +def MACRO_FIX_AUTOTOOLS + if [ "%{DISTRO_ARCH}" = "aarch64" ]; then + for i in $(find %{DIR_SRC} -name config.guess -or -name config.sub); do + if ! grep -q "aarch64" ${i}; then + if [ -e "%{datadir}/pakfire/$(basename ${i})" ]; then + cp -vf %{datadir}/pakfire/$(basename ${i}) $(dirname ${i}) + fi + fi + done + fi +end + MACRO_PATCHES = /usr/lib/pakfire/patch --search-path=%{DIR_PATCHES} "%{patches}" # Pre-defined build scripts. @@ -84,6 +96,9 @@ build # Run custom commands. %{prepare_cmds} + + # Fix outdated autotools on aarch64 + %{MACRO_FIX_AUTOTOOLS} end def prepare_cmds -- 2.39.5