diff options
| author | Max Howell | 2012-02-26 12:58:54 +0000 |
|---|---|---|
| committer | Max Howell | 2012-02-26 12:59:12 +0000 |
| commit | 56046b541a0b7ba5e5992ba925f40413f59c92f9 (patch) | |
| tree | be706f5624d20333f4b2a5cceee83f469f2da2f5 /Library | |
| parent | 112e1557385a5ee33118aff22e3365fc3f795b67 (diff) | |
| download | homebrew-56046b541a0b7ba5e5992ba925f40413f59c92f9.tar.bz2 | |
Make xcode_version work with CLI4.3X
Closes #10460.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/utils.rb | 27 |
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 |
