2009-12-27 11:30:02 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mpfr < Formula
|
2011-04-14 03:38:02 +00:00
|
|
|
url 'http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.bz2'
|
2009-12-27 11:30:02 +00:00
|
|
|
homepage 'http://www.mpfr.org/'
|
2011-04-14 03:38:02 +00:00
|
|
|
md5 'bfbecb2eacb6d48432ead5cfc3f7390a'
|
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
|
|
|
|
|
2010-03-07 18:30:51 +00:00
|
|
|
def patches
|
2011-04-14 03:38:02 +00:00
|
|
|
{:p1 => ['http://www.mpfr.org/mpfr-3.0.1/allpatches']}
|
2010-03-07 18:30:51 +00:00
|
|
|
end
|
|
|
|
|
2009-12-27 11:30:02 +00:00
|
|
|
def install
|
2011-04-14 03:38:02 +00:00
|
|
|
args = []
|
|
|
|
|
2011-03-06 12:04:36 +00:00
|
|
|
if Hardware.is_32_bit? or ARGV.include? "--32-bit"
|
|
|
|
ENV.m32
|
|
|
|
args << "--host=none-apple-darwin"
|
|
|
|
else
|
|
|
|
ENV.m64
|
|
|
|
end
|
|
|
|
|
2011-04-14 03:38:02 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", *args
|
2009-12-27 11:30:02 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|