diff options
| author | Jack Nagel | 2014-09-21 02:35:20 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-09-21 02:36:14 -0500 |
| commit | 5d44503b31366ea6240279c0a06e9c02313b80a1 (patch) | |
| tree | 6dcb96ed4c4d3adbe1803043969fc1ac6a663ef3 /Library | |
| parent | 7ebd25fbaeffff77450b3711bb1dee77a0e206d3 (diff) | |
| download | homebrew-5d44503b31366ea6240279c0a06e9c02313b80a1.tar.bz2 | |
wine: fix build on 10.7 under superenv
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/wine.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Library/Formula/wine.rb b/Library/Formula/wine.rb index 140a9363a..b1e33f094 100644 --- a/Library/Formula/wine.rb +++ b/Library/Formula/wine.rb @@ -119,11 +119,21 @@ class Wine < Formula system "./configure", *args + # The Mac driver uses blocks and must be compiled with an Apple compiler + # even if the rest of Wine is built with A GNU compiler. unless ENV.compiler == :clang || ENV.compiler == :llvm || ENV.compiler == :gcc - # The Mac driver uses blocks and must be compiled with an Apple compiler - # even if the rest of Wine is built with A GNU compiler. - system 'make', 'dlls/winemac.drv/Makefile' - inreplace 'dlls/winemac.drv/Makefile', /^CC\s*=\s*[^\s]+/, "CC = clang" + system "make", "dlls/winemac.drv/Makefile" + inreplace "dlls/winemac.drv/Makefile" do |s| + # We need to use the real compiler, not the superenv shim, which will exec the + # configured compiler no matter what name is used to invoke it. + s.change_make_var! "CC", "xcrun clang -m32" + + # Emulate some things that superenv would normally handle for us + s.change_make_var! "EXTRACFLAGS", s.get_make_var("EXTRACFLAGS").sub( + "-gstabs+", # We're configured to use GNU GCC, so remote an unsupported flag + "--sysroot=#{MacOS.sdk_path}" # Pass the sysroot to support Xcode-only systems + ) + end end system "make install" |
