diff options
| author | Samuel John | 2013-05-31 12:30:25 +0200 |
|---|---|---|
| committer | Samuel John | 2013-06-03 17:29:43 +0200 |
| commit | 06889915075a22031463a86c54e54998535d3e07 (patch) | |
| tree | 548df8ccda233420bd6fb508f7004acbdf0235e2 /Library/ENV | |
| parent | c5248956662e06094b7c4f7f7475d66771771ff6 (diff) | |
| download | brew-06889915075a22031463a86c54e54998535d3e07.tar.bz2 | |
superenv: Work if build tool changes DEVELOPER_DIR
Some build systems still set the DEVELOPER_DIR to /Developer
and then nothing works any more (xcrun, xcodebuild etc.)
I am looking at you MacVim.
Diffstat (limited to 'Library/ENV')
| -rwxr-xr-x | Library/ENV/4.3/xcrun | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/ENV/4.3/xcrun b/Library/ENV/4.3/xcrun index 4784cd4d5..39821c833 100755 --- a/Library/ENV/4.3/xcrun +++ b/Library/ENV/4.3/xcrun @@ -7,6 +7,9 @@ require "#{File.dirname __FILE__}/../libsuperenv" SUPERBIN = __FILE__.dirname.cleanpath.freeze +# Some build tools are stupid and still set DEVELOPER_DIR to old /Developer +ENV['DEVELOPER_DIR'] = ENV['HOMEBREW_DEVELOPER_DIR'] + exec "/usr/bin/xcrun", *ARGV if ARGV.empty? or ARGV[0][0..0] == '-' if File.exist?("/usr/bin/#{ARGV.first}") exec "/usr/bin/#{ARGV.shift}", *ARGV unless ENV['HOMEBREW_SDKROOT'].directory? @@ -19,8 +22,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 "#{ENV['DEVELOPER_DIR']}/usr/bin/#{arg0}" -try "#{ENV['DEVELOPER_DIR']}/Toolchains/XcodeDefault.xctoolchain/usr/bin/#{arg0}" +try "#{ENV['HOMEBREW_DEVELOPER_DIR']}/usr/bin/#{arg0}" +try "#{ENV['HOMEBREW_DEVELOPER_DIR']}/Toolchains/XcodeDefault.xctoolchain/usr/bin/#{arg0}" # xcrun won't always be able to find Homebrew's apple-gcc42, # even when it's in the PATH ENV['PATH'].split(':').each do |p| |
