world/file - patch to fix compilation of magic error on armv7l

This commit is contained in:
Nathan Fisher 2021-03-06 08:30:43 -05:00
parent 05bed5dde9
commit 73b8fca0dd
2 changed files with 24 additions and 1 deletions

View File

@ -3,6 +3,11 @@
#
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)

View File

@ -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.