2009-12-27 11:30:02 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mpfr < Formula
|
2011-10-03 19:37:40 +00:00
|
|
|
url 'http://www.mpfr.org/mpfr-3.1.0/mpfr-3.1.0.tar.bz2'
|
2009-12-27 11:30:02 +00:00
|
|
|
homepage 'http://www.mpfr.org/'
|
2011-10-03 19:37:40 +00:00
|
|
|
md5 '238ae4a15cc3a5049b723daef5d17938'
|
2009-12-27 11:30:02 +00:00
|
|
|
|
|
|
|
depends_on 'gmp'
|
|
|
|
|
2011-03-06 12:04:36 +00:00
|
|
|
def options
|
|
|
|
[["--32-bit", "Force 32-bit."]]
|
|
|
|
end
|
|
|
|
|
2011-10-12 01:55:02 +00:00
|
|
|
def patches
|
|
|
|
{ :p1 => "http://www.mpfr.org/mpfr-3.1.0/allpatches" }
|
|
|
|
end
|
|
|
|
|
2009-12-27 11:30:02 +00:00
|
|
|
def install
|
2011-06-19 17:52:03 +00:00
|
|
|
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
|
2011-04-14 03:38:02 +00:00
|
|
|
|
2011-06-19 17:52:03 +00:00
|
|
|
# Build 32-bit where appropriate, and help configure find 64-bit CPUs
|
|
|
|
# Note: This logic should match what the GMP formula does.
|
|
|
|
if MacOS.prefer_64_bit? and not ARGV.include? "--32-bit"
|
|
|
|
ENV.m64
|
|
|
|
args << "--build=x86_64-apple-darwin"
|
|
|
|
else
|
2011-03-06 12:04:36 +00:00
|
|
|
ENV.m32
|
2011-10-03 19:40:14 +00:00
|
|
|
args << "--build=none-apple-darwin"
|
2011-03-06 12:04:36 +00:00
|
|
|
end
|
|
|
|
|
2011-06-19 17:52:03 +00:00
|
|
|
system "./configure", *args
|
2009-12-27 11:30:02 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|