aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/install.rb7
-rw-r--r--Library/Homebrew/keg_relocate.rb4
-rw-r--r--Library/Homebrew/mach.rb4
-rw-r--r--Library/Homebrew/os/mac.rb16
4 files changed, 26 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index fa9507fb3..1ef1ca61a 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -157,7 +157,12 @@ module Homebrew
def perform_preinstall_checks
check_ppc
check_writable_install_location
- check_xcode
+ if MacOS::Xcode.installed?
+ check_xcode
+ else
+ opoo "You have not installed Xcode."
+ puts "Bottles may install correctly, but builds will fail!"
+ end
check_cellar
end
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb
index eceef192f..59ff1c9d7 100644
--- a/Library/Homebrew/keg_relocate.rb
+++ b/Library/Homebrew/keg_relocate.rb
@@ -98,8 +98,8 @@ class Keg
end
def install_name_tool(*args)
- tool = MacOS.locate("install_name_tool")
- system(tool, *args) || raise(ErrorDuringExecution.new(tool, args))
+ tool = MacOS.install_name_tool
+ system(tool, *args) || raise ErrorDuringExecution.new(tool, args)
end
# If file is a dylib or bundle itself, look for the dylib named by
diff --git a/Library/Homebrew/mach.rb b/Library/Homebrew/mach.rb
index c15399cbf..f7ca428e6 100644
--- a/Library/Homebrew/mach.rb
+++ b/Library/Homebrew/mach.rb
@@ -154,9 +154,9 @@ module MachO
def parse_otool_L_output
ENV["HOMEBREW_MACH_O_FILE"] = path.expand_path.to_s
- libs = `#{MacOS.locate("otool")} -L "$HOMEBREW_MACH_O_FILE"`.split("\n")
+ libs = `#{MacOS.otool} -L "$HOMEBREW_MACH_O_FILE"`.split("\n")
unless $?.success?
- raise ErrorDuringExecution.new(MacOS.locate("otool"),
+ raise ErrorDuringExecution.new(MacOS.otool,
["-L", ENV["HOMEBREW_MACH_O_FILE"]])
end
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index ffab00b00..185126548 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -36,6 +36,22 @@ module OS
end
end
+ def install_name_tool
+ if File.executable?(path = "#{HOMEBREW_PREFIX}/opt/cctools/bin/install_name_tool")
+ Pathname.new(path)
+ else
+ locate("install_name_tool")
+ end
+ end
+
+ def otool
+ if File.executable?(path = "#{HOMEBREW_PREFIX}/opt/cctools/bin/otool")
+ Pathname.new(path)
+ else
+ locate("otool")
+ end
+ end
+
def active_developer_dir
@active_developer_dir ||= Utils.popen_read("/usr/bin/xcode-select", "-print-path").strip
end