aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-07-10 21:01:16 -0500
committerJack Nagel2012-07-25 12:04:42 -0500
commita18f853679fd7755b280f99bd8cbb86ef9e9ca54 (patch)
tree4634ffc1bdf708a392c756396e82b399e7394f46 /Library
parent6a799703552cd75a4333e01da378fbbd03a3dff8 (diff)
downloadhomebrew-a18f853679fd7755b280f99bd8cbb86ef9e9ca54.tar.bz2
Add MacOS::Xcode.provides_gcc?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/gmp.rb2
-rw-r--r--Library/Homebrew/xcode.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/Library/Formula/gmp.rb b/Library/Formula/gmp.rb
index e09489d6b..d710591a2 100644
--- a/Library/Formula/gmp.rb
+++ b/Library/Formula/gmp.rb
@@ -19,7 +19,7 @@ class Gmp < Formula
# Also force use of 4.2 on 10.6 in case a user has changed the default
# Do not force if xcode > 4.2 since it does not have /usr/bin/gcc-4.2 as default
# FIXME convert this to appropriate fails_with annotations
- ENV.gcc unless MacOS::Xcode.version >= '4.2'
+ ENV.gcc if MacOS::Xcode.provides_gcc?
args = %W[--prefix=#{prefix} --enable-cxx]
diff --git a/Library/Homebrew/xcode.rb b/Library/Homebrew/xcode.rb
index 74c5fbd9f..ab3062ed0 100644
--- a/Library/Homebrew/xcode.rb
+++ b/Library/Homebrew/xcode.rb
@@ -122,6 +122,10 @@ module MacOS::Xcode extend self
def provides_autotools?
version.to_f < 4.3
end
+
+ def provides_gcc?
+ version.to_f < 4.3
+ end
end
module MacOS::CLT extend self