Hoildkv 4 gadi atpakaļ
vecāks
revīzija
24809a64f5
3 mainītis faili ar 29 papildinājumiem un 2 dzēšanām
  1. 1 1
      packages/g/gmp/xmake.lua
  2. 27 0
      packages/m/mpc/xmake.lua
  3. 1 1
      packages/m/mpfr/xmake.lua

+ 1 - 1
packages/g/gmp/xmake.lua

@@ -8,7 +8,7 @@ package("gmp")
     add_versions("6.2.1", "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2")
 
     on_install("macosx", "linux", function (package)
-        local configs = {}
+        local configs = {"--with-pic"}
         if package:config("shared") then
             table.insert(configs, "--enable-shared=yes")
             table.insert(configs, "--enable-static=no")

+ 27 - 0
packages/m/mpc/xmake.lua

@@ -0,0 +1,27 @@
+package("mpc")
+
+    set_homepage("http://www.multiprecision.org/mpc/")
+    set_description("GNU MPC is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result.")
+    set_license("LGPL-3.0")
+
+    add_urls("https://ftp.gnu.org/gnu/mpc/mpc-$(version).tar.gz")
+    add_versions("1.2.1", "17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459")
+
+    add_deps("gmp", "mpfr")
+    on_install("macosx", "linux", function (package)
+        local configs = {"--disable-dependency-tracking", "--with-pic"}
+        table.insert(configs, "--with-gmp=" .. package:dep("gmp"):installdir())
+        table.insert(configs, "--with-mpfr=" .. package:dep("mpfr"):installdir())
+        if package:config("shared") then
+            table.insert(configs, "--enable-shared=yes")
+            table.insert(configs, "--enable-static=no")
+        else
+            table.insert(configs, "--enable-static=yes")
+            table.insert(configs, "--enable-shared=no")
+        end
+        import("package.tools.autoconf").install(package, configs)
+    end)
+
+    on_test(function (package)
+        assert(package:has_cfuncs("mpc_add", {includes = "mpc.h"}))
+    end)

+ 1 - 1
packages/m/mpfr/xmake.lua

@@ -9,7 +9,7 @@ package("mpfr")
 
     add_deps("gmp")
     on_install("macosx", "linux", function (package)
-        local configs = {"--disable-dependency-tracking"}
+        local configs = {"--disable-dependency-tracking", "--with-pic"}
         if package:config("shared") then
             table.insert(configs, "--enable-shared=yes")
             table.insert(configs, "--enable-static=no")