blob: 680b0cd67016dc806f4c40095dd4e0e19b9f14f7 (
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
|
require 'formula'
class Gmp <Formula
url 'ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.1.tar.bz2'
homepage 'http://gmplib.org/'
sha1 'acbd1edc61230b1457e9742136994110e4f381b2'
def options
[
["--skip-check", "Do not run 'make check' to verify libraries. (Not recommended.)"]
]
end
def install
# On OS X 10.6, some tests fail under LLVM
ENV.gcc_4_2
args = ["--prefix=#{prefix}", "--infodir=#{info}", "--disable-debug", "--disable-dependency-tracking", "--enable-cxx"]
# Doesn't compile correctly on 10.5 MacPro in 64 bit mode
if MACOS_VERSION == 10.5 and Hardware.intel_family == :nehalem
ENV.m32
args << "--host=none-apple-darwin"
end
system "./configure", *args
system "make"
ENV.j1 # Don't install in parallel
system "make install"
# Different compilers and options can cause tests to fail even
# if everything compiles, so yes, we want to do this step.
system "make check" unless ARGV.include? "--skip-check"
end
end
|