diff options
| author | Jack Nagel | 2012-07-27 02:38:10 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-07-27 02:40:44 -0500 |
| commit | aafc494677d53c74f6bfe76a0f98dfc49f784739 (patch) | |
| tree | 8a9e20f96318bfb5df8a1d6e19610c0d29380efe /Library | |
| parent | c75f72d969c79e2fcaf85769a56241de6654f4d1 (diff) | |
| download | homebrew-aafc494677d53c74f6bfe76a0f98dfc49f784739.tar.bz2 | |
Un-break MacOS.sdk_path
MacOS.sdk_path is meant to return the SDK path that matches the version
argument, so store the result in a hash.
Fixes #13623.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/macos.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index 21c3bc7af..80f8b3d2d 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -92,10 +92,11 @@ module MacOS extend self end def sdk_path v=version - @sdk_path ||= begin + @sdk_path ||= {} + @sdk_path[v.to_s] ||= begin path = if not Xcode.bad_xcode_select_path? and File.executable? "#{Xcode.folder}/usr/bin/make" `#{locate('xcodebuild')} -version -sdk macosx#{v} Path 2>/dev/null`.strip - elsif File.directory? '/Developer/SDKs/MacOS#{v}.sdk' + elsif File.directory? "/Developer/SDKs/MacOS#{v}.sdk" # the old default (or wild wild west style) "/Developer/SDKs/MacOS#{v}.sdk" elsif File.directory? "#{Xcode.prefix}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX#{v}.sdk" |
