aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-11-17 22:06:00 -0600
committerJack Nagel2013-11-17 22:57:16 -0600
commitbe8e61079df8fd771ed01398be9419b6d9e59abf (patch)
treee2b541459367971d1b489688e93c3a6de69777f3 /Library
parent9bc23fd620400b49880d0eba4744e259e54fde2b (diff)
downloadhomebrew-be8e61079df8fd771ed01398be9419b6d9e59abf.tar.bz2
Export HOMEBREW_PREFIX to build environment
Constructing the path relative to a file in the repository is incorrect on some supported configurations (i.e., the repository is located in a different place than the prefix). Closes #24418.
Diffstat (limited to 'Library')
-rw-r--r--Library/ENV/libsuperenv.rb2
-rw-r--r--Library/Homebrew/extend/ENV/super.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/Library/ENV/libsuperenv.rb b/Library/ENV/libsuperenv.rb
index 49c2d7d2e..575783460 100644
--- a/Library/ENV/libsuperenv.rb
+++ b/Library/ENV/libsuperenv.rb
@@ -25,5 +25,5 @@ class Array
end
end
-$brewfix = "#{__FILE__}/../../../".cleanpath.freeze
+$brewfix = ENV['HOMEBREW_PREFIX'].freeze
$sdkroot = ENV['HOMEBREW_SDKROOT'].freeze
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb
index 9fc3c17b5..080745e98 100644
--- a/Library/Homebrew/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/ENV/super.rb
@@ -72,6 +72,7 @@ module Superenv
self['HOMEBREW_CCCFG'] = determine_cccfg
self['HOMEBREW_OPTIMIZATION_LEVEL'] = 'Os'
self['HOMEBREW_BREW_FILE'] = HOMEBREW_BREW_FILE
+ self['HOMEBREW_PREFIX'] = HOMEBREW_PREFIX
self['HOMEBREW_SDKROOT'] = "#{MacOS.sdk_path}" if MacOS::Xcode.without_clt?
self['HOMEBREW_DEVELOPER_DIR'] = determine_developer_dir # used by our xcrun shim
self['HOMEBREW_VERBOSE'] = "1" if ARGV.verbose?