diff options
| author | Jack Nagel | 2014-05-01 18:36:46 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-05-01 18:36:46 -0500 | 
| commit | 6c6280fecded9bfc639e1792da3a3014550854c3 (patch) | |
| tree | 11a84b60592ce97216508d756791588b35049f1d /Library/Homebrew | |
| parent | 68280de7711b88ed6c053d88481c435be25abf5f (diff) | |
| download | homebrew-6c6280fecded9bfc639e1792da3a3014550854c3.tar.bz2 | |
Move xctoolchain_path to Xcode module, where it belongs
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/extend/ENV/std.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ENV/super.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/os/mac.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/os/mac/xcode.rb | 4 | 
4 files changed, 6 insertions, 14 deletions
diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb index fb2741b53..663be4ff0 100644 --- a/Library/Homebrew/extend/ENV/std.rb +++ b/Library/Homebrew/extend/ENV/std.rb @@ -71,9 +71,7 @@ module Stdenv      macosxsdk MacOS.version      if MacOS::Xcode.without_clt? -      # Some tools (clang, etc.) are in the xctoolchain dir of Xcode -      append_path 'PATH', "#{MacOS.xctoolchain_path}/usr/bin" if MacOS.xctoolchain_path -      # Others are now at /Applications/Xcode.app/Contents/Developer/usr/bin +      append_path "PATH", "#{MacOS::Xcode.toolchain_path}/usr/bin"        append_path 'PATH', MacOS.dev_tools_path      end    end diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 940cc36d2..76d26836b 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -117,7 +117,7 @@ module Superenv      paths = [Superenv.bin]      if MacOS::Xcode.without_clt?        paths << "#{MacOS::Xcode.prefix}/usr/bin" -      paths << "#{MacOS::Xcode.prefix}/Toolchains/XcodeDefault.xctoolchain/usr/bin" +      paths << "#{MacOS::Xcode.toolchain_path}/usr/bin"      end      paths += deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/bin" }      paths << MacOS::X11.bin if x11? diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 37939264d..6ed35440d 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -56,16 +56,6 @@ module OS        %w{cc make}.all? { |tool| File.executable? "#{prefix}/usr/bin/#{tool}" }      end -    def xctoolchain_path -      # As of Xcode 4.3, some tools are located in the "xctoolchain" directory -      @xctoolchain_path ||= begin -        path = Pathname.new("#{Xcode.prefix}/Toolchains/XcodeDefault.xctoolchain") -        # If only the CLT are installed, all tools will be under dev_tools_path, -        # this path won't exist, and xctoolchain_path will be nil. -        path if path.exist? -      end -    end -      def sdk_path(v = version)        (@sdk_path ||= {}).fetch(v.to_s) do |key|          opts = [] diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 41f809835..4c79e3965 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -61,6 +61,10 @@ module OS          end        end +      def toolchain_path +        Pathname.new("#{prefix}/Toolchains/XcodeDefault.xctoolchain") if installed? && version >= "4.3" +      end +        # Ask Spotlight where Xcode is. If the user didn't install the        # helper tools and installed Xcode in a non-conventional place, this        # is our only option. See: http://superuser.com/questions/390757  | 
