瀏覽代碼

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 年之前
父節點
當前提交
5b17091a4b
共有 1 個文件被更改,包括 15 次插入0 次删除
  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
+}