Browse Source

enable cross for pcre and libffi (#1485)

ruki 2 years ago
parent
commit
b74d051592
2 changed files with 3 additions and 5 deletions
  1. 1 1
      packages/l/libffi/xmake.lua
  2. 2 4
      packages/p/pcre/xmake.lua

+ 1 - 1
packages/l/libffi/xmake.lua

@@ -23,7 +23,7 @@ package("libffi")
         end
     end)
 
-    on_install("windows", "iphoneos", function (package)
+    on_install("windows", "iphoneos", "cross", function (package)
         io.gsub("fficonfig.h.in", "# *undef (.-)\n", "${define %1}\n")
         os.cp(path.join(os.scriptdir(), "port", "xmake.lua"), "xmake.lua")
         import("package.tools.xmake").install(package, {

+ 2 - 4
packages/p/pcre/xmake.lua

@@ -35,9 +35,10 @@ package("pcre")
         import("package.tools.cmake").install(package, configs)
     end)
 
-    on_install("macosx", "linux", "mingw", function (package)
+    on_install("macosx", "linux", "mingw", "cross", function (package)
         local configs = {}
         table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
+        table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
         if package:config("jit") then
             table.insert(configs, "--enable-jit")
         end
@@ -49,9 +50,6 @@ package("pcre")
         if package:debug() then
             table.insert(configs, "--enable-debug")
         end
-        if package:is_plat("linux") and package:config("pic") ~= false then
-            table.insert(configs, "--with-pic")
-        end
         import("package.tools.autoconf").install(package, configs)
     end)