Skip to content

Instantly share code, notes, and snippets.

@serras
Last active December 16, 2015 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save serras/5405051 to your computer and use it in GitHub Desktop.
Save serras/5405051 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment