From 866ae291c18904eb87c4ed5fdf9258b1a3fa1942 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Thu, 21 Sep 2023 07:08:25 +0200 Subject: [PATCH] fix native/file - works with static build only - cleanup cross/file/Makefile --- cross/file/Makefile | 22 +--------------------- native/file/Makefile | 4 ++++ 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/cross/file/Makefile b/cross/file/Makefile index 4e1de681492..9c891493498 100644 --- a/cross/file/Makefile +++ b/cross/file/Makefile @@ -15,29 +15,9 @@ GNU_CONFIGURE = 1 ADDITIONAL_CPPFLAGS = -Os -#COMPILE_TARGET = file_compile - -# -# file -m /spksrc/native/file/work-native/install/usr/local/share/misc/magic.mgc -C -m magic - - - -#BIN_PATH = $(abspath $(WORK_DIR)/../../../native/file/work-native/install/usr/local/bin) -#ENV += PATH:=$(BIN_PATH):$(PATH) -#MAGIC_FILE = $(abspath $(WORK_DIR)/../../../native/file/work-native/install/usr/local/share/misc/magic.mgc) -#ENV += NATIVE_MAGIC=$(MAGIC_FILE) - -#NATIVE_FILE = $(BIN_PATH)/file +# Inject native/file into magic/Makefile (by patched Makefile.in) NATIVE_FILE = $(abspath $(WORK_DIR)/../../../native/file/work-native/install/usr/local/bin/file) ENV += NATIVE_FILE=$(NATIVE_FILE) -#export PATH:=$(BIN_PATH):$(PATH) - -#COMPILE_MAKE_OPTIONS = MAGIC=$(MAGIC_FILE) include ../../mk/spksrc.cross-cc.mk - -.PHONY: file_compile -file_compile: - $(RUN) MAGIC=$(MAGIC_FILE) $(MAKE) - diff --git a/native/file/Makefile b/native/file/Makefile index 6f6de6393cf..d468db10740 100644 --- a/native/file/Makefile +++ b/native/file/Makefile @@ -12,5 +12,9 @@ COMMENT = The file command is "a file type guesser", that is, a command-line to LICENSE = https://github.com/file/file/blob/master/COPYING GNU_CONFIGURE = 1 +# force build of static version +# otherwise magic.mgc fails to build with error: +# Compiled magic version [545] does not match with shared library magic version [539] +CONFIGURE_ARGS += --enable-static --disable-shared include ../../mk/spksrc.native-cc.mk