ruki 4 éve
szülő
commit
7e978a72ca
1 módosított fájl, 6 hozzáadás és 3 törlés
  1. 6 3
      packages/l/libffi/xmake.lua

+ 6 - 3
packages/l/libffi/xmake.lua

@@ -17,11 +17,14 @@ package("libffi")
     end)
 
     on_install("macosx", "linux", "iphoneos", function (package)
-        local configs = {"--disable-silent-rules", "--disable-dependency-tracking", "--enable-shared=no"}
+        local configs = {"--disable-silent-rules", "--disable-dependency-tracking"}
+        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:debug() then
             table.insert(configs, "--enable-debug")
-        else
-            table.insert(configs, "--disable-debug")
+        end
+        if package:config("pic") ~= false then
+            table.insert(configs, "--with-pic")
         end
         import("package.tools.autoconf").install(package, configs)
     end)