homebrew-core/Formula/mpfr.rb

37 lines
841 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Mpfr < Formula
homepage 'http://www.mpfr.org/'
2012-03-15 00:57:44 +00:00
url 'http://www.mpfr.org/mpfr-3.1.0/mpfr-3.1.0.tar.bz2'
md5 '238ae4a15cc3a5049b723daef5d17938'
depends_on 'gmp'
def options
2012-01-01 21:48:30 +00:00
[["--32-bit", "Build 32-bit only."]]
end
def patches
2012-03-15 00:57:44 +00:00
"http://www.mpfr.org/mpfr-3.1.0/allpatches"
end
def install
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
# Build 32-bit where appropriate, and help configure find 64-bit CPUs
# Note: This logic should match what the GMP formula does.
2012-01-01 21:48:30 +00:00
if MacOS.prefer_64_bit? and not ARGV.build_32_bit?
ENV.m64
args << "--build=x86_64-apple-darwin"
else
ENV.m32
args << "--build=none-apple-darwin"
end
system "./configure", *args
system "make"
system "make check"
system "make install"
end
end