mpfrcx 0.6.3 (new formula)

Closes #119312.

Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Caleb Xu 2022-12-29 01:08:45 -05:00 committed by BrewTestBot
parent 36cf28825d
commit 3f39e3e2db
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 36 additions and 0 deletions

36
Formula/mpfrcx.rb Normal file
View File

@ -0,0 +1,36 @@
class Mpfrcx < Formula
desc "Arbitrary precision library for arithmetic of univariate polynomials"
homepage "https://www.multiprecision.org/mpfrcx/home.html"
url "https://www.multiprecision.org/downloads/mpfrcx-0.6.3.tar.gz"
sha256 "9da9b3614c0a3e00e6ed2b82fc935d1c838d97074dc59cb388f8fafbe3db8594"
license "GPL-3.0-or-later"
head "https://gitlab.inria.fr/enge/mpfrcx.git", branch: "master"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "gmp"
depends_on "libmpc"
depends_on "mpfr"
def install
# Regenerate configure to avoid building libraries with flat namespaces
system "autoreconf", "--force", "--install", "--verbose"
system "./configure", *std_configure_args, "--disable-silent-rules"
system "make", "install"
(pkgshare/"tests").install Dir["tests/tc_*.c"]
end
test do
Dir[pkgshare/"tests/*"].each do |src|
testname = File.basename(src, ".c")
system ENV.cc, src, "-I#{include}", "-L#{lib}",
"-L#{Formula["gmp"].opt_lib}", "-L#{Formula["libmpc"].opt_lib}", "-L#{Formula["mpfr"].opt_lib}",
"-lmpfrcx", "-lgmp", "-lmpc", "-lmpfr",
"-o", testname
system testpath/testname
end
end
end