aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2014-09-21 11:27:26 -0500
committerJack Nagel2014-09-21 11:36:50 -0500
commite34cbf0da0e322737ec58a3572ee73e5b841dae3 (patch)
tree3b574bbb083c7beb26873e6612b54f5904acb5e9 /Library/Formula
parent5d827b8dfbf4e75a429a675ecc9ca1d3329c6716 (diff)
downloadhomebrew-e34cbf0da0e322737ec58a3572ee73e5b841dae3.tar.bz2
wine: fix devel build on 10.7 under superenv
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/wine.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/Library/Formula/wine.rb b/Library/Formula/wine.rb
index b1e33f094..9bf77aaac 100644
--- a/Library/Formula/wine.rb
+++ b/Library/Formula/wine.rb
@@ -126,13 +126,17 @@ class Wine < Formula
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"
+ cc, cxx = s.get_make_var("CC"), s.get_make_var("CXX")
+ s.change_make_var! "CC", cc.sub(ENV.cc, "xcrun clang") if cc
+ s.change_make_var! "CXX", cc.sub(ENV.cxx, "xcrun clang++") if cxx
# 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
- )
+ # We're configured to use GNU GCC, so remote an unsupported flag
+ s.gsub! "-gstabs+", ""
+ # Pass the sysroot to support Xcode-only systems
+ cflags = s.get_make_var("CFLAGS")
+ cflags += " --sysroot=#{MacOS.sdk_path}"
+ s.change_make_var! "CFLAGS", cflags
end
end