diff options
| author | Jack Nagel | 2012-07-09 14:58:34 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-07-25 11:58:01 -0500 |
| commit | 68fee2a11aa8215e686e9529f466c135716fd7ec (patch) | |
| tree | f09fde24695f61f622dae5daba26fe12880ef2cf /Library/Homebrew/compat | |
| parent | 7c80aae8446ebceb9b9d89b7469d9962251bf982 (diff) | |
| download | homebrew-68fee2a11aa8215e686e9529f466c135716fd7ec.tar.bz2 | |
Split Xcode and CLT methods into separate modules
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/compat')
| -rw-r--r-- | Library/Homebrew/compat/compatibility.rb | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb index 879042fd4..e14909496 100644 --- a/Library/Homebrew/compat/compatibility.rb +++ b/Library/Homebrew/compat/compatibility.rb @@ -137,7 +137,7 @@ class FailsWithLLVM # latest version we have tested against so we will switch to GCC and # bump this integer when Xcode 4.3 is released. TODO do that! if build.to_i >= 2336 - if MacOS.xcode_version < "4.2" + if MacOS::Xcode.version < "4.2" opoo "Formula will not build with LLVM, using GCC" ENV.gcc else @@ -156,7 +156,7 @@ class FailsWithLLVM that we can update the formula accordingly. Thanks! EOS puts - if MacOS.xcode_version < "4.2" + if MacOS::Xcode.version < "4.2" puts "If it doesn't work you can: brew install --use-gcc" else puts "If it doesn't work you can try: brew install --use-clang" @@ -164,3 +164,29 @@ class FailsWithLLVM puts end end + +module MacOS extend self + def xcode_folder + Xcode.folder + end + + def xcode_prefix + Xcode.prefix + end + + def xcode_installed? + Xcode.installed? + end + + def xcode_version + Xcode.version + end + + def clt_installed? + CLT.installed? + end + + def clt_version? + CLT.version + end +end |
