1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-01 11:19:21 +00:00

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.
This commit is contained in:
Liav A 2023-08-11 15:31:18 +03:00 committed by Tim Schumacher
parent 3ba5daeca9
commit 5b17091a4b

View File

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