]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
Automatically update autotools for aarch64 compatibility
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Oct 2016 18:21:20 +0000 (14:21 -0400)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Oct 2016 18:21:20 +0000 (14:21 -0400)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
macros/build.macro

index 097965300328ce9a3b5120622072af2e9ec74b01..e1a0a3e72524777b8c9228a52de1a6381384802b 100644 (file)
@@ -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