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-01-24 20:41:23 +00:00
|
|
|
url 'http://ftpmirror.gnu.org/mpfr/mpfr-3.1.1.tar.bz2'
|
|
|
|
mirror 'http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.1.tar.bz2'
|
2012-09-07 01:24:08 +00:00
|
|
|
version '3.1.1-p2'
|
2013-01-07 04:51:47 +00:00
|
|
|
sha1 'f632d43943ff9f13c184fa13b9a6e8c7f420f4dd'
|
2009-12-27 11:30:02 +00:00
|
|
|
|
2013-03-25 23:27:09 +00:00
|
|
|
bottle do
|
|
|
|
sha1 'ef221a793449407ea7726e5d160350a77a1d1e2e' => :mountain_lion
|
|
|
|
sha1 'afb92847f2b66872f615ba03e004f8e856dbc448' => :lion
|
|
|
|
sha1 'cab2e9af46a1006c7a062ea468167a4162e44a99' => :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
|
|
|
|
2012-09-07 01:24:08 +00:00
|
|
|
def patches
|
2013-01-07 04:51:47 +00:00
|
|
|
"https://gist.github.com/raw/4472199/42c0b207037a133527083d12adc9028b4da429ee/gistfile1.txt"
|
2012-09-07 01:24:08 +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-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
|