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/'
|
2013-01-07 04:51:47 +00:00
|
|
|
# Upstream is down a lot, so use the GNU mirror + Gist for patches
|
2013-04-14 09:08:27 +00:00
|
|
|
url 'http://ftpmirror.gnu.org/mpfr/mpfr-3.1.2.tar.bz2'
|
|
|
|
mirror 'http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.bz2'
|
|
|
|
sha1 '46d5a11a59a4e31f74f73dd70c5d57a59de2d0b4'
|
2013-03-25 23:27:09 +00:00
|
|
|
|
2013-04-15 10:35:17 +00:00
|
|
|
bottle do
|
|
|
|
sha1 '1da827b2b2afce70c009900043d63731c46ded97' => :mountain_lion
|
|
|
|
sha1 '76cd548a47615fda27e53140a88e9873d55b6a0e' => :lion
|
|
|
|
sha1 'c5a3566bf11105c66823365f05d1dd6e01d69657' => :snow_leopard
|
|
|
|
end
|
|
|
|
|
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
|
|
|
|
2013-04-01 00:51:29 +00:00
|
|
|
fails_with :clang do
|
|
|
|
build 421
|
|
|
|
cause <<-EOS.undent
|
|
|
|
clang build 421 segfaults while building in superenv;
|
|
|
|
see https://github.com/mxcl/homebrew/issues/15061
|
|
|
|
EOS
|
|
|
|
end
|
2012-10-05 14:49:57 +00:00
|
|
|
|
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
|