2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-26 19:11:08 +00:00
|
|
|
|
|
|
|
class Gmp <Formula
|
2010-04-20 20:51:12 +00:00
|
|
|
url 'ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.bz2'
|
2009-09-26 19:11:08 +00:00
|
|
|
homepage 'http://gmplib.org/'
|
2010-04-20 20:51:12 +00:00
|
|
|
sha1 '6340edc7ceb95f9015a758c7c0d196eb0f441d49'
|
2009-09-26 19:11:08 +00:00
|
|
|
|
2009-12-03 06:40:08 +00:00
|
|
|
def options
|
|
|
|
[
|
|
|
|
["--skip-check", "Do not run 'make check' to verify libraries. (Not recommended.)"]
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2009-09-26 19:11:08 +00:00
|
|
|
def install
|
2009-12-03 06:40:08 +00:00
|
|
|
# On OS X 10.6, some tests fail under LLVM
|
|
|
|
ENV.gcc_4_2
|
2010-04-20 20:51:12 +00:00
|
|
|
|
2010-02-25 23:16:44 +00:00
|
|
|
args = ["--prefix=#{prefix}", "--infodir=#{info}", "--disable-debug", "--disable-dependency-tracking", "--enable-cxx"]
|
2009-09-26 19:11:08 +00:00
|
|
|
|
2009-12-03 06:40:08 +00:00
|
|
|
# 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
|
2010-04-20 20:51:12 +00:00
|
|
|
|
2009-12-03 06:40:08 +00:00
|
|
|
system "./configure", *args
|
|
|
|
system "make"
|
|
|
|
ENV.j1 # Don't install in parallel
|
2009-09-26 19:11:08 +00:00
|
|
|
system "make install"
|
2010-04-20 20:51:12 +00:00
|
|
|
|
2009-12-03 06:40:08 +00:00
|
|
|
# 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"
|
2009-09-26 19:11:08 +00:00
|
|
|
end
|
|
|
|
end
|