Selaa lähdekoodia

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.
Liav A 1 vuosi sitten
vanhempi
commit
5b17091a4b
1 muutettua tiedostoa jossa 15 lisäystä ja 0 poistoa
  1. 15 0
      Ports/file/package.sh

+ 15 - 0
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
+}