homebrew-core/Formula/mpfi.rb

35 lines
783 B
Ruby
Raw Normal View History

class Mpfi < Formula
2014-12-28 14:42:01 +00:00
homepage "http://perso.ens-lyon.fr/nathalie.revol/software.html"
url "https://gforge.inria.fr/frs/download.php/30130/mpfi-1.5.1.tar.gz"
sha1 "288302c0cdefe823cc3aa71de31c1da82eeb6ad0"
2014-12-28 14:42:01 +00:00
depends_on "gmp"
depends_on "mpfr"
2014-12-28 14:42:01 +00:00
option "32-bit"
def install
ENV.m32 if build.build_32_bit?
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make"
system "make", "check"
system "make", "install"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <mpfi.h>
int main()
{
mpfi_t x;
mpfi_init(x);
mpfi_clear(x);
return 0;
}
EOS
system ENV.cc, "test.c", "-lgmp", "-lmpfr", "-lmpfi", "-o", "test"
system "./test"
end
end