Attempt to fix opt-paths for all deps

Since we changed superenv to set a PATH without /usr/local, all deps need to have opt paths.

Fixes Homebrew/homebrew#15077.
This commit is contained in:
Max Howell 2012-09-24 11:07:22 -04:00
parent c076a272ee
commit bda8bb08e3

View File

@ -69,7 +69,8 @@ def pre_superenv_hacks f
end
def install f
keg_only_deps = f.recursive_deps.uniq.select{|dep| dep.keg_only? }
deps = f.recursive_deps
keg_only_deps = deps.select{|dep| dep.keg_only? }
pre_superenv_hacks(f)
require 'superenv'
@ -81,10 +82,10 @@ def install f
f.recursive_requirements.each { |rq| rq.modify_build_environment }
end
keg_only_deps.each do |dep|
opt = HOMEBREW_PREFIX/:opt/dep.name
deps.each do |dep|
opt = HOMEBREW_PREFIX/:opt/dep
fixopt(dep) unless opt.directory?
if not superenv?
if not superenv? and dep.keg_only?
ENV.prepend_path 'PATH', "#{opt}/bin"
ENV.prepend_path 'PKG_CONFIG_PATH', "#{opt}/lib/pkgconfig"
ENV.prepend_path 'PKG_CONFIG_PATH', "#{opt}/share/pkgconfig"