瀏覽代碼

Fix bzip2 when cross-compiling from Windows (#1792)

* Fix bzip2 when cross-compiling from Windows

* Update xmake.lua
Jérôme Leclercq 2 年之前
父節點
當前提交
75fa713d39
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 5 0
      packages/b/bzip2/port/xmake.lua
  2. 0 1
      packages/b/bzip2/xmake.lua

+ 5 - 0
packages/b/bzip2/port/xmake.lua

@@ -36,6 +36,11 @@ target("bzip2")
             local binarydir = path.join(target:installdir(), "bin")
             local binarydir = path.join(target:installdir(), "bin")
             os.vcp(path.join(binarydir, "bzip2.exe"), path.join(binarydir, "bzcat.exe"))
             os.vcp(path.join(binarydir, "bzip2.exe"), path.join(binarydir, "bzcat.exe"))
             os.vcp(path.join(binarydir, "bzip2.exe"), path.join(binarydir, "bunzip2.exe"))
             os.vcp(path.join(binarydir, "bzip2.exe"), path.join(binarydir, "bunzip2.exe"))
+        elseif is_subhost("windows") then
+            -- when cross-compiling (ex: android from windows), we need to copy the binaries too
+            local binarydir = path.join(target:installdir(), "bin")
+            os.vcp(path.join(binarydir, "bzip2"), path.join(binarydir, "bzcat"))
+            os.vcp(path.join(binarydir, "bzip2"), path.join(binarydir, "bunzip2"))
         else
         else
             local binarydir = path.join(target:installdir(), "bin")
             local binarydir = path.join(target:installdir(), "bin")
             os.ln(path.join(binarydir, "bzip2"), path.join(binarydir, "bzcat"))
             os.ln(path.join(binarydir, "bzip2"), path.join(binarydir, "bzcat"))

+ 0 - 1
packages/b/bzip2/xmake.lua

@@ -1,5 +1,4 @@
 package("bzip2")
 package("bzip2")
-
     set_homepage("https://sourceware.org/bzip2/")
     set_homepage("https://sourceware.org/bzip2/")
     set_description("Freely available, patent free, high-quality data compressor.")
     set_description("Freely available, patent free, high-quality data compressor.")