package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
1.2 KiB

package("mpfr")
set_homepage("https://www.mpfr.org/")
set_description("The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.")
set_license("LGPL-3.0")
add_urls("https://www.mpfr.org/mpfr-current/mpfr-$(version).tar.gz")
add_versions("4.1.0", "3127fe813218f3a1f0adf4e8899de23df33b4cf4b4b3831a5314f78e65ffa2d6")
add_deps("gmp")
on_install("macosx", "linux", function (package)
local configs = {"--disable-dependency-tracking"}
table.insert(configs, "--with-gmp=" .. package:dep("gmp"):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
if package:config("pic") ~= false then
table.insert(configs, "--with-pic")
end
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("mpfr_get_version", {includes = "mpfr.h"}))
end)