diff --git a/world/file/Makefile b/world/file/Makefile index 5a7952b..6691195 100644 --- a/world/file/Makefile +++ b/world/file/Makefile @@ -1,8 +1,13 @@ # Makefile - hhl - /usr/src/world/file # Copyright 2021 Nathan Fisher -# +# distname = file distext = gz +ifeq ($(arch), armv7l) +ifeq ($(shell uname -m), armv7l) +patches += file-compile_magic.patch +endif +endif include world.mk config_opts += --host=$(tgt) diff --git a/world/file/file-compile_magic.patch b/world/file/file-compile_magic.patch new file mode 100644 index 0000000..e161b82 --- /dev/null +++ b/world/file/file-compile_magic.patch @@ -0,0 +1,18 @@ +Description: During the build, file uses either the system + installed file executable (if cross compiling) + or the newly compiled file executable to generate + magic. Unfortunately this fails if doing a native + build on armv7l with the sysroot compiler, so + fall back to system executable. +diff --color -Naur file-5.39.orig/magic/Makefile.in file-5.39/magic/Makefile.in +--- file-5.39.orig/magic/Makefile.in 2020-06-14 20:03:12.000000000 -0400 ++++ file-5.39/magic/Makefile.in 2021-03-06 08:21:13.701131046 -0500 +@@ -841,7 +841,7 @@ + exit 1; \ + fi; \ + fi) +- $(FILE_COMPILE) -C -m magic ++ file -C -m magic + @rm -fr magic + + # Tell versions [3.59,3.63) of GNU make to not export all variables.