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-07-07 17:40:51 +00:00
|
|
|
url 'http://www.mpfr.org/mpfr-3.1.1/mpfr-3.1.1.tar.bz2'
|
2012-09-07 01:24:08 +00:00
|
|
|
version '3.1.1-p2'
|
2012-07-07 17:40:51 +00:00
|
|
|
sha256 '7b66c3f13dc8385f08264c805853f3e1a8eedab8071d582f3e661971c9acd5fd'
|
2009-12-27 11:30:02 +00:00
|
|
|
|
|
|
|
depends_on 'gmp'
|
|
|
|
|
2012-08-13 00:02:55 +00:00
|
|
|
option '32-bit'
|
2011-03-06 12:04:36 +00:00
|
|
|
|
2012-09-07 01:24:08 +00:00
|
|
|
def patches
|
|
|
|
"http://www.mpfr.org/mpfr-current/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.
|
2012-08-13 00:02:55 +00:00
|
|
|
if MacOS.prefer_64_bit? and not build.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
|
2012-05-08 03:19:44 +00:00
|
|
|
system "make"
|
|
|
|
system "make check"
|
2009-12-27 11:30:02 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|