diff options
| author | Darin Morrison | 2013-08-24 08:48:30 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2013-08-24 08:48:55 +0100 |
| commit | 93fe0378e7fbecf6ac9d0890cac2c1714c613a97 (patch) | |
| tree | f2b1342a421431094ecd043736070c277f381798 /Library | |
| parent | 316c31e69e234e77d13b04c90adaa3902d524351 (diff) | |
| download | homebrew-93fe0378e7fbecf6ac9d0890cac2c1714c613a97.tar.bz2 | |
ghc: fix with Xcode 5.
Closes #21960.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/ghc.rb | 73 |
1 files changed, 63 insertions, 10 deletions
diff --git a/Library/Formula/ghc.rb b/Library/Formula/ghc.rb index daf23b0c2..b3913dfa8 100644 --- a/Library/Formula/ghc.rb +++ b/Library/Formula/ghc.rb @@ -42,18 +42,25 @@ class Ghc < Formula EOS end - def install - ENV.j1 # Fixes an intermittent race condition + def patches + # Fixes 7.6.3 compilation on 10.9 + DATA if MacOS.version >= :mavericks + end + def install # Move the main tarball contents into a subdirectory (buildpath+'Ghcsource').install Dir['*'] - # Define where the subformula will temporarily install itself - subprefix = buildpath+'subfo' - Ghcbinary.new.brew do - system "./configure", "--prefix=#{subprefix}" - # Temporary j1 to stop an intermittent race condition + # Define where the subformula will temporarily install itself + subprefix = buildpath+'subfo' + + # ensure configure does not use Xcode 5 "gcc" which is actually clang + args = ["--prefix=#{subprefix}"] + args << "--with-gcc=#{ENV.cc}" if ENV.compiler == :gcc + + system "./configure", *args + ENV.j1 # Fixes an intermittent race condition system 'make install' ENV.prepend 'PATH', subprefix/'bin', ':' end @@ -66,12 +73,15 @@ class Ghc < Formula if Hardware.is_64_bit? and not build.build_32_bit? arch = 'x86_64' else - ENV.m32 # Need to force this to fix build error on internal libgmp. + ENV.m32 # Need to force this to fix build error on internal libgmp_ar. arch = 'i386' end - system "./configure", "--prefix=#{prefix}", - "--build=#{arch}-apple-darwin" + # ensure configure does not use Xcode 5 "gcc" which is actually clang + args = ["--prefix=#{prefix}", "--build=#{arch}-apple-darwin"] + args << "--with-gcc=#{ENV.cc}" if ENV.compiler == :gcc + + system "./configure", *args system 'make' if build.include? 'tests' Ghctestsuite.new.brew do @@ -85,6 +95,8 @@ class Ghc < Formula end end end + system 'make' + ENV.j1 # Fixes an intermittent race condition system 'make install' end end @@ -94,3 +106,44 @@ class Ghc < Formula EOS end end + +__END__ +diff --git a/includes/HsFFI.h b/includes/HsFFI.h +index 652fbea..a21811e 100644 +--- a/includes/HsFFI.h ++++ b/includes/HsFFI.h +@@ -21,7 +21,7 @@ extern "C" { + #include "stg/Types.h" + + /* get limits for integral types */ +-#ifdef HAVE_STDINT_H ++#if defined HAVE_STDINT_H && !defined USE_INTTYPES_H_FOR_RTS_PROBES_D + /* ISO C 99 says: + * "C++ implementations should define these macros only when + * __STDC_LIMIT_MACROS is defined before <stdint.h> is included." +diff --git a/rts/RtsProbes.d b/rts/RtsProbes.d +index 13f40f8..226f881 100644 +--- a/rts/RtsProbes.d ++++ b/rts/RtsProbes.d +@@ -6,6 +6,12 @@ + * + * ---------------------------------------------------------------------------*/ + ++#ifdef __APPLE__ && __MACH__ ++# if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 ++# define USE_INTTYPES_H_FOR_RTS_PROBES_D ++# endif ++#endif ++ + #include "HsFFI.h" + #include "rts/EventLogFormat.h" + +diff --git a/utils/mkdirhier/mkdirhier.sh b/utils/mkdirhier/mkdirhier.sh +index 4c5d5f7..80762f4 100644 +--- a/utils/mkdirhier/mkdirhier.sh ++++ b/utils/mkdirhier/mkdirhier.sh +@@ -1,4 +1,4 @@ + #!/bin/sh + +-mkdir -p ${1+"$@"} ++mkdir -p ${1+"./$@"} |
