2009-12-27 11:30:02 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mpfr < Formula
|
2009-12-27 11:30:02 +00:00
|
|
|
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'
|
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
|
2012-01-01 21:48:30 +00:00
|
|
|
[["--32-bit", "Build 32-bit only."]]
|
2011-03-06 12:04:36 +00:00
|
|
|
end
|
|
|
|
|
2011-10-12 01:55:02 +00:00
|
|
|
def patches
|
2012-03-15 00:57:44 +00:00
|
|
|
"http://www.mpfr.org/mpfr-3.1.0/allpatches"
|
2011-10-12 01:55:02 +00:00
|
|
|
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.
|
2012-01-01 21:48:30 +00:00
|
|
|
if MacOS.prefer_64_bit? and not ARGV.build_32_bit?
|
2011-06-19 17:52:03 +00:00
|
|
|
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
|