2010-04-20 20:52:06 +00:00
|
|
|
class Libmpc < Formula
|
2014-12-30 10:24:18 +00:00
|
|
|
homepage "http://multiprecision.org"
|
|
|
|
url "http://ftpmirror.gnu.org/mpc/mpc-1.0.2.tar.gz"
|
|
|
|
mirror "http://multiprecision.org/mpc/download/mpc-1.0.2.tar.gz"
|
|
|
|
sha1 "5072d82ab50ec36cc8c0e320b5c377adb48abe70"
|
2010-04-20 20:52:06 +00:00
|
|
|
|
2013-03-25 23:26:58 +00:00
|
|
|
bottle do
|
2013-12-05 05:01:39 +00:00
|
|
|
cellar :any
|
2015-01-08 03:31:54 +00:00
|
|
|
revision 3
|
|
|
|
sha1 "6113e69eea132dfeb82db6edc10fdb964047f85d" => :yosemite
|
|
|
|
sha1 "206544ff8ee4234e456ab778bb4c7e9d84878582" => :mavericks
|
|
|
|
sha1 "5fe23420d4647f9447d976d19e402dbcea198c47" => :mountain_lion
|
2013-03-25 23:26:58 +00:00
|
|
|
end
|
|
|
|
|
2014-12-30 10:24:18 +00:00
|
|
|
depends_on "gmp"
|
|
|
|
depends_on "mpfr"
|
2010-04-26 07:03:46 +00:00
|
|
|
|
2010-04-20 20:52:06 +00:00
|
|
|
def install
|
2013-01-22 02:29:55 +00:00
|
|
|
args = [
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--disable-dependency-tracking",
|
2014-02-26 04:54:34 +00:00
|
|
|
"--with-gmp=#{Formula["gmp"].opt_prefix}",
|
|
|
|
"--with-mpfr=#{Formula["mpfr"].opt_prefix}"
|
2013-01-22 02:29:55 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
system "./configure", *args
|
2010-04-20 20:52:06 +00:00
|
|
|
system "make"
|
2014-12-30 10:24:18 +00:00
|
|
|
system "make", "check"
|
|
|
|
system "make", "install"
|
2010-04-20 20:52:06 +00:00
|
|
|
end
|
2014-12-30 10:28:24 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <mpc.h>
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
mpc_t x;
|
|
|
|
mpc_init2 (x, 256);
|
|
|
|
mpc_clear (x);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cc, "test.c", "-lgmp", "-lmpfr", "-lmpc", "-o", "test"
|
|
|
|
system "./test"
|
|
|
|
end
|
2010-04-20 20:52:06 +00:00
|
|
|
end
|