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
commitc020950a426592cd96aa9225ca8e1c3a7c7ac4cb (patch)
tree25d3af09a35b6ca0b6c4d9d449aa8b53535f148c /Library
parente4da435995364d4582672b4f62a0440bb2944401 (diff)
downloadbrew-c020950a426592cd96aa9225ca8e1c3a7c7ac4cb.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 Homebrew/homebrew#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?