aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2016-07-15 03:36:04 +0100
committerDominyk Tiller2016-07-15 05:14:51 +0100
commit706e7e71a07784f14abbdf5f019428e04afcfae6 (patch)
tree2dcd97530c8cf9c6d5fccd2a5146a3a5663c0e67 /Library
parentf6dad377b63946d403df7ed755fb14426a33df31 (diff)
downloadbrew-706e7e71a07784f14abbdf5f019428e04afcfae6.tar.bz2
mac/super: restore definition of effective_sysroot
In https://github.com/Homebrew/brew/commit/0d189fae57bad6c209b471eba9e0b254a2b40886 we completely removed `effective_sysroot`, which consequently left all the `effective_sysroot`/usr/include calls pointing at `/usr/include`. This is wildly problematic on systems where the Command Line Tools aren't installed because `/usr/include` is not a default-created folder prior to CLT installation. I'm unsure if `effective_sysroot` should still be mentioned in Library/Homebrew/extend/ENV/super.rb at all. If it can be deleted, feel free to do that without waiting for me to review. This seems to fix: * https://github.com/Homebrew/homebrew-core/issues/2991 * https://github.com/Homebrew/homebrew-core/issues/2986 * https://github.com/Homebrew/homebrew-core/issues/2962
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/os/mac/extend/ENV/super.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb
index eacf48813..9e0a25137 100644
--- a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb
@@ -7,6 +7,10 @@ module Superenv
bin.realpath unless bin.nil?
end
+ def effective_sysroot
+ MacOS::Xcode.without_clt? ? MacOS.sdk_path.to_s : nil
+ end
+
def homebrew_extra_paths
paths = []
# On 10.9, there are shims for all tools in /usr/bin.