aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/xcrun4
-rw-r--r--Library/Homebrew/os/mac/xcode.rb2
-rw-r--r--Library/Homebrew/superenv.rb15
-rw-r--r--Library/Homebrew/superenv/macsystem.rb12
4 files changed, 8 insertions, 25 deletions
diff --git a/Library/ENV/4.3/xcrun b/Library/ENV/4.3/xcrun
index 14176a5a7..6afb6cf16 100755
--- a/Library/ENV/4.3/xcrun
+++ b/Library/ENV/4.3/xcrun
@@ -19,8 +19,8 @@ end
arg0 = ARGV.shift
try `/usr/bin/xcrun --find #{arg0}`.chomp
# Nuts, Xcode is not setup properly or something. Try to find the tools anyway!
-try "/Applications/Xcode.app/Contents/Developer/usr/bin/#{arg0}"
-try "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/#{arg0}"
+try "#{ENV['DEVELOPER_DIR']}/usr/bin/#{arg0}"
+try "#{ENV['DEVELOPER_DIR']}/Toolchains/XcodeDefault.xctoolchain/usr/bin/#{arg0}"
try "/usr/bin/#{arg0}"
abort <<-EOS
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 40bc1e87d..a89faa002 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -76,7 +76,7 @@ module MacOS::Xcode extend self
# this shortcut makes version work for people who don't realise you
# need to install the CLI tools
- xcode43build = V4_BUNDLE_PATH/'Contents/Developer/usr/bin/xcodebuild'
+ xcode43build = prefix/'usr/bin/xcodebuild'
if xcode43build.file?
`#{xcode43build} -version 2>/dev/null` =~ /Xcode (\d(\.\d)*)/
return $1 if $1
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb
index fb494c10e..0fd597391 100644
--- a/Library/Homebrew/superenv.rb
+++ b/Library/Homebrew/superenv.rb
@@ -18,10 +18,7 @@ end
def superenv?
not (MacSystem.xcode43_without_clt? and
- MacOS.sdk_path.nil?) and # because superenv will fail to find stuff
- not (MacSystem.xcode43_without_clt? and
- !MacSystem.xcode43_developer_dir) and # because superenv's logic might not find it
- not MacOS::Xcode.folder.nil? and # because xcrun won't work
+ MacOS.sdk_path.nil?) and # because superenv will fail to find stuff
superbin and superbin.directory? and
not ARGV.include? "--env=std"
rescue # blanket rescue because there are naked raises
@@ -112,8 +109,8 @@ class << ENV
def determine_path
paths = [superbin]
if MacSystem.xcode43_without_clt?
- paths << "#{MacSystem.xcode43_developer_dir}/usr/bin"
- paths << "#{MacSystem.xcode43_developer_dir}/Toolchains/XcodeDefault.xctoolchain/usr/bin"
+ paths << "#{MacOS::Xcode.prefix}/usr/bin"
+ paths << "#{MacOS::Xcode.prefix}/Toolchains/XcodeDefault.xctoolchain/usr/bin"
end
paths += deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/bin" }
paths << "#{HOMEBREW_PREFIX}/opt/python/bin" if brewed_python?
@@ -197,11 +194,7 @@ class << ENV
# If Xcode path is fucked then this is basically a fix. In the case where
# nothing is valid, it still fixes most usage to supply a valid path that
# is not "/".
- if MacOS::Xcode.bad_xcode_select_path?
- (MacOS::Xcode.prefix || HOMEBREW_PREFIX).to_s
- elsif ENV['DEVELOPER_DIR']
- ENV['DEVELOPER_DIR']
- end
+ MacOS::Xcode.prefix || ENV['DEVELOPER_DIR']
end
def brewed_python?
diff --git a/Library/Homebrew/superenv/macsystem.rb b/Library/Homebrew/superenv/macsystem.rb
index 5f16b8fad..7d2a7880f 100644
--- a/Library/Homebrew/superenv/macsystem.rb
+++ b/Library/Homebrew/superenv/macsystem.rb
@@ -1,7 +1,7 @@
# new code because I don't really trust the Xcode code now having researched it more
module MacSystem extend self
def xcode_clt_installed?
- File.executable? "/usr/bin/clang" and File.executable? "/usr/bin/lldb"
+ File.executable? "/usr/bin/clang" and File.executable? "/usr/bin/lldb" and File.executable? "/usr/bin/make"
end
def xcode43_without_clt?
@@ -13,16 +13,6 @@ module MacSystem extend self
#{MacOS.sdk_path}/usr/X11].find{|path| File.directory? "#{path}/include" }
end
- def xcode43_developer_dir
- @xcode43_developer_dir ||=
- tst(ENV['DEVELOPER_DIR']) ||
- tst(`xcode-select -print-path 2>/dev/null`) ||
- tst("/Applications/Xcode.app/Contents/Developer") ||
- MacOS.mdfind("com.apple.dt.Xcode").find{|path| tst(path) }
- raise unless @xcode43_developer_dir
- @xcode43_developer_dir
- end
-
private
def tst prefix