From 5b17091a4bc3020ddf0e0f310874b4be0c8f393c Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 11 Aug 2023 15:31:18 +0300 Subject: [PATCH] Ports/file: Build host version to ensure we can properly cross compile We should build file natively as well so it can be used to compile the target build (for serenity). The Makefile doesn't do this automatically so to ensure it will not fail due to version mismatch between the host version and target version, we ensure we always have a native binary at hand. --- Ports/file/package.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Ports/file/package.sh b/Ports/file/package.sh index 20b03b6cc4..106b1aaff8 100755 --- a/Ports/file/package.sh +++ b/Ports/file/package.sh @@ -6,3 +6,18 @@ use_fresh_config_sub='true' files=( "http://ftp.astron.com/pub/file/file-${version}.tar.gz#fc97f51029bb0e2c9f4e3bffefdaf678f0e039ee872b9de5c002a6d09c784d82" ) + +function pre_configure() { + host_env + mkdir -p "host-build" + ( + cd host-build + "../${workdir}/configure" + make + ) +} + +function build() { + export PATH="${PORT_BUILD_DIR}/host-build/src/.libs/:$PATH" + run make +}