blob: 7fc923618d5e60b7b5b82e4bb466ad0edd937869 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  | 
require 'formula'
class Mpfr < Formula
  homepage 'http://www.mpfr.org/'
  # Upstream is down a lot, so use the GNU mirror + Gist for patches
  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'
  bottle do
    sha1 '1da827b2b2afce70c009900043d63731c46ded97' => :mountain_lion
    sha1 '76cd548a47615fda27e53140a88e9873d55b6a0e' => :lion
    sha1 'c5a3566bf11105c66823365f05d1dd6e01d69657' => :snow_leopard
  end
  depends_on 'gmp'
  option '32-bit'
  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
  def install
    args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
    # Build 32-bit where appropriate, and help configure find 64-bit CPUs
    # Note: This logic should match what the GMP formula does.
    if MacOS.prefer_64_bit? and not build.build_32_bit?
      ENV.m64
      args << "--build=x86_64-apple-darwin"
    else
      ENV.m32
      args << "--build=none-apple-darwin"
    end
    system "./configure", *args
    system "make"
    system "make check"
    system "make install"
  end
end
  |