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.
This commit is contained in:
Jack Nagel 2013-11-17 22:06:00 -06:00
parent e4da435995
commit c020950a42
2 changed files with 2 additions and 1 deletions

View File

@ -25,5 +25,5 @@ class Array
end
end
$brewfix = "#{__FILE__}/../../../".cleanpath.freeze
$brewfix = ENV['HOMEBREW_PREFIX'].freeze
$sdkroot = ENV['HOMEBREW_SDKROOT'].freeze

View File

@ -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?