aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-02-26 12:58:54 +0000
committerMax Howell2012-02-26 12:59:12 +0000
commit5c7c82baf88f10c126ab5125bb363a562ba61821 (patch)
tree7d3dfbbe95174471efa9b95d646ffc0ed4a8c95b /Library
parent9ca233812ce95b62cf79f75efdcbe1b73cb7a1ea (diff)
downloadbrew-5c7c82baf88f10c126ab5125bb363a562ba61821.tar.bz2
Make xcode_version work with CLI4.3X
Closes Homebrew/homebrew#10460.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils.rb27
1 files changed, 22 insertions, 5 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 6c29ba105..e46926063 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -363,10 +363,10 @@ module MacOS extend self
raise if $1.nil? or not $?.success?
$1
rescue
- # for people who don't have xcodebuild installed due to using
- # some variety of minimal installer, let's try and guess their
- # Xcode version
- case llvm_build_version.to_i
+ # For people who's xcode-select is unset, or who have installed
+ # xcode-gcc-installer or whatever other combinations we can try and
+ # supprt. See https://github.com/mxcl/homebrew/wiki/Xcode
+ case nil
when 0..2063 then "3.1.0"
when 2064..2065 then "3.1.4"
when 2366..2325
@@ -381,7 +381,24 @@ module MacOS extend self
# https://github.com/mxcl/homebrew/wiki/Xcode
"4.0"
else
- "4.2"
+ case (clang_version.to_f * 10).to_i
+ when 0..14
+ "3.2.2"
+ when 15
+ "3.2.4"
+ when 16
+ "3.2.5"
+ when 17..20
+ "4.0"
+ when 21
+ "4.1"
+ when 22..30
+ "4.2"
+ when 31
+ "4.3"
+ else
+ "4.3"
+ end
end
end
end