diff options
| author | markusn | 2011-10-18 11:56:23 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2011-12-15 21:11:13 -0800 |
| commit | c1481e96931425fbd7651208853b47dd2de5a8c7 (patch) | |
| tree | 96a6ac9a808e748f9313e9d627f540c111027e5e | |
| parent | 71a9296afb440c88cfb86b673265faed202955b3 (diff) | |
| download | homebrew-c1481e96931425fbd7651208853b47dd2de5a8c7.tar.bz2 | |
gmp: allow building with Xcode 4.2
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/gmp.rb | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/Library/Formula/gmp.rb b/Library/Formula/gmp.rb index aafb81152..b8db0da49 100644 --- a/Library/Formula/gmp.rb +++ b/Library/Formula/gmp.rb @@ -13,11 +13,20 @@ class Gmp < Formula ] end + # Fixes make check for xcode 4.2. See: + # http://gmplib.org/list-archives/gmp-bugs/2011-July/002308.html + def patches + DATA if MacOS.xcode_version >= "4.2" + end + def install # Reports of problems using gcc 4.0 on Leopard # https://github.com/mxcl/homebrew/issues/issue/2302 # Also force use of 4.2 on 10.6 in case a user has changed the default - ENV.gcc_4_2 + # Do not force if xcode > 4.2 since it does not have /usr/bin/gcc-4.2 as default + unless MacOS.xcode_version >= "4.2" + ENV.gcc_4_2 + end args = ["--prefix=#{prefix}", "--enable-cxx"] @@ -41,3 +50,35 @@ class Gmp < Formula system "make check" unless ARGV.include? "--skip-check" end end + +__END__ +diff --git a/acinclude.m4 b/acinclude.m4 +index 699dd7b..87b5f6f 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -1941,8 +1941,8 @@ X86_PATTERN | x86_64-*-*) + esac + + cat >conftest.c <<EOF +-extern const int foo[]; /* Suppresses C++'s suppression of foo */ +-const int foo[] = {1,2,3}; ++extern const int foo[[]]; /* Suppresses C++'s suppression of foo */ ++const int foo[[]] = {1,2,3}; + EOF + echo "Test program:" >&AC_FD_CC + cat conftest.c >&AC_FD_CC +diff --git a/configure b/configure +index 07b9fda..f6df8cd 100755 +--- a/configure ++++ b/configure +@@ -26446,8 +26446,8 @@ i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | + esac + + cat >conftest.c <<EOF +-extern const int foo; /* Suppresses C++'s suppression of foo */ +-const int foo = {1,2,3}; ++extern const int foo[]; /* Suppresses C++'s suppression of foo */ ++const int foo[] = {1,2,3}; + EOF + echo "Test program:" >&5 + cat conftest.c >&5 |
