aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2012-07-09 14:58:34 -0500
committerJack Nagel2012-07-25 11:58:01 -0500
commit68fee2a11aa8215e686e9529f466c135716fd7ec (patch)
treef09fde24695f61f622dae5daba26fe12880ef2cf /Library/Homebrew/cmd
parent7c80aae8446ebceb9b9d89b7469d9962251bf982 (diff)
downloadhomebrew-68fee2a11aa8215e686e9529f466c135716fd7ec.tar.bz2
Split Xcode and CLT methods into separate modules
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/--config.rb14
-rw-r--r--Library/Homebrew/cmd/doctor.rb22
2 files changed, 18 insertions, 18 deletions
diff --git a/Library/Homebrew/cmd/--config.rb b/Library/Homebrew/cmd/--config.rb
index 4ead67caf..3b749c5ab 100644
--- a/Library/Homebrew/cmd/--config.rb
+++ b/Library/Homebrew/cmd/--config.rb
@@ -32,17 +32,17 @@ module Homebrew extend self
else '/Applications/Xcode.app/Contents/Developer'
end
- guess = '(guessed)' unless MacOS.xcode_installed?
- prefix = if MacOS.xcode_installed?
- "=> #{MacOS.xcode_prefix}" unless MacOS.xcode_prefix.to_s == default_prefix
+ guess = '(guessed)' unless MacOS::Xcode.installed?
+ prefix = if MacOS::Xcode.installed?
+ "=> #{MacOS::Xcode.prefix}" unless MacOS::Xcode.prefix.to_s == default_prefix
end
- [MacOS.xcode_version, guess, prefix].compact.join(' ')
+ [MacOS::Xcode.version, guess, prefix].compact.join(' ')
end
end
def describe_clt
- @describe_clt ||= if MacOS.clt_installed? then MacOS.clt_version else 'N/A' end
+ @describe_clt ||= if MacOS::CLT.installed? then MacOS::CLT.version else 'N/A' end
end
def head
@@ -92,7 +92,7 @@ module Homebrew extend self
puts hardware
puts "OS X: #{MACOS_FULL_VERSION}-#{kernel}"
puts "Xcode: #{describe_xcode}"
- puts "CLT: #{describe_clt}" if MacOS.xcode_version.to_f >= 4.3
+ puts "CLT: #{describe_clt}" if MacOS::Xcode.version.to_f >= 4.3
puts "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby:\n #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}" if RUBY_VERSION.to_f != 1.8
unless MacOS.compilers_standard?
@@ -119,7 +119,7 @@ module Homebrew extend self
Xcode: #{describe_xcode}
EOS
- config_s << "CLT: #{describe_clt}\n" if MacOS.xcode_version.to_f >= 4.3
+ config_s << "CLT: #{describe_clt}\n" if MacOS::Xcode.version.to_f >= 4.3
config_s << <<-EOS.undent
GCC-4.0: #{gcc_40 ? "build #{gcc_40}" : "N/A"}
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 39079ceb7..8e63c0942 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -207,10 +207,10 @@ def check_for_broken_symlinks
end
def check_for_latest_xcode
- if not MacOS.xcode_installed?
+ if not MacOS::Xcode.installed?
# no Xcode, now it depends on the OS X version...
if MacOS.version >= 10.7 then
- if not MacOS.clt_installed?
+ if not MacOS::CLT.installed?
return <<-EOS.undent
No Xcode version found!
No compiler found in /usr/bin!
@@ -248,16 +248,16 @@ def check_for_latest_xcode
Not sure what version of Xcode is the latest for OS X #{MacOS.version}.
EOS
end
- if MacOS.xcode_installed? and MacOS.xcode_version < latest_xcode then <<-EOS.undent
- You have Xcode-#{MacOS.xcode_version}, which is outdated.
+ if MacOS::Xcode.installed? and MacOS::Xcode.version < latest_xcode then <<-EOS.undent
+ You have Xcode-#{MacOS::Xcode.version}, which is outdated.
Please install Xcode #{latest_xcode}.
EOS
end
end
def check_cc
- unless MacOS.clt_installed?
- if MacOS.xcode_version >= "4.3"
+ unless MacOS::CLT.installed?
+ if MacOS::Xcode.version >= "4.3"
return <<-EOS.undent
Experimental support for using Xcode without the "Command Line Tools".
EOS
@@ -389,7 +389,7 @@ def check_homebrew_prefix
end
def check_xcode_prefix
- prefix = MacOS.xcode_prefix
+ prefix = MacOS::Xcode.prefix
return if prefix.nil?
if prefix.to_s.match(' ')
<<-EOS.undent
@@ -401,9 +401,9 @@ end
def check_xcode_select_path
# with the advent of CLT-only support, we don't need xcode-select
- return if MacOS.clt_installed?
- unless File.file? "#{MacOS.xcode_folder}/usr/bin/xcodebuild" and not MacOS.xctools_fucked?
- path = MacOS.app_with_bundle_id(MacOS::XCODE_4_BUNDLE_ID) || MacOS.app_with_bundle_id(MacOS::XCODE_3_BUNDLE_ID)
+ return if MacOS::CLT.installed?
+ unless File.file? "#{MacOS::Xcode.folder}/usr/bin/xcodebuild" and not MacOS::Xcode.xctools_fucked?
+ path = MacOS.app_with_bundle_id(MacOS::Xcode::V4_BUNDLE_ID) || MacOS.app_with_bundle_id(MacOS::Xcode::V3_BUNDLE_ID)
path = '/Developer' if path.nil? or not path.directory?
<<-EOS.undent
Your Xcode is configured with an invalid path.
@@ -677,7 +677,7 @@ def check_git_newline_settings
end
def check_for_autoconf
- return if MacOS.xcode_version >= "4.3"
+ return if MacOS::Xcode.version >= "4.3"
autoconf = which('autoconf')
safe_autoconfs = %w[/usr/bin/autoconf /Developer/usr/bin/autoconf]