Rename these collections for clarity
This commit is contained in:
parent
149e65cc8a
commit
a21be66fc8
@ -92,8 +92,8 @@ def install f
|
|||||||
end
|
end
|
||||||
|
|
||||||
if superenv?
|
if superenv?
|
||||||
ENV.deps = keg_only_deps.map(&:to_s)
|
ENV.keg_only_deps = keg_only_deps.map(&:to_s)
|
||||||
ENV.all_deps = deps.map(&:to_s)
|
ENV.deps = deps.map(&:to_s)
|
||||||
ENV.x11 = f.recursive_requirements.detect { |rq| rq.kind_of?(X11Dependency) }
|
ENV.x11 = f.recursive_requirements.detect { |rq| rq.kind_of?(X11Dependency) }
|
||||||
ENV.setup_build_environment
|
ENV.setup_build_environment
|
||||||
post_superenv_hacks(f)
|
post_superenv_hacks(f)
|
||||||
|
|||||||
@ -22,9 +22,7 @@ def superenv?
|
|||||||
end
|
end
|
||||||
|
|
||||||
class << ENV
|
class << ENV
|
||||||
attr :deps, true
|
attr_accessor :keg_only_deps, :deps, :x11
|
||||||
attr :all_deps, true # above is just keg-only-deps
|
|
||||||
attr :x11, true
|
|
||||||
alias_method :x11?, :x11
|
alias_method :x11?, :x11
|
||||||
|
|
||||||
def reset
|
def reset
|
||||||
@ -114,7 +112,7 @@ class << ENV
|
|||||||
paths << "#{MacSystem.xcode43_developer_dir}/usr/bin"
|
paths << "#{MacSystem.xcode43_developer_dir}/usr/bin"
|
||||||
paths << "#{MacSystem.xcode43_developer_dir}/Toolchains/XcodeDefault.xctoolchain/usr/bin"
|
paths << "#{MacSystem.xcode43_developer_dir}/Toolchains/XcodeDefault.xctoolchain/usr/bin"
|
||||||
end
|
end
|
||||||
paths += all_deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/bin" }
|
paths += deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/bin" }
|
||||||
paths << "#{HOMEBREW_PREFIX}/opt/python/bin" if brewed_python?
|
paths << "#{HOMEBREW_PREFIX}/opt/python/bin" if brewed_python?
|
||||||
paths << "#{MacSystem.x11_prefix}/bin" if x11?
|
paths << "#{MacSystem.x11_prefix}/bin" if x11?
|
||||||
paths += %w{/usr/bin /bin /usr/sbin /sbin}
|
paths += %w{/usr/bin /bin /usr/sbin /sbin}
|
||||||
@ -122,8 +120,8 @@ class << ENV
|
|||||||
end
|
end
|
||||||
|
|
||||||
def determine_pkg_config_path
|
def determine_pkg_config_path
|
||||||
paths = all_deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/lib/pkgconfig" }
|
paths = deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/lib/pkgconfig" }
|
||||||
paths += all_deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/share/pkgconfig" }
|
paths += deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/share/pkgconfig" }
|
||||||
paths.to_path_s
|
paths.to_path_s
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -134,7 +132,7 @@ class << ENV
|
|||||||
end
|
end
|
||||||
|
|
||||||
def determine_cmake_prefix_path
|
def determine_cmake_prefix_path
|
||||||
paths = deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}" }
|
paths = keg_only_deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}" }
|
||||||
paths << HOMEBREW_PREFIX.to_s # put ourselves ahead of everything else
|
paths << HOMEBREW_PREFIX.to_s # put ourselves ahead of everything else
|
||||||
paths << "#{MacOS.sdk_path}/usr" if MacSystem.xcode43_without_clt?
|
paths << "#{MacOS.sdk_path}/usr" if MacSystem.xcode43_without_clt?
|
||||||
paths.to_path_s
|
paths.to_path_s
|
||||||
@ -168,7 +166,7 @@ class << ENV
|
|||||||
end
|
end
|
||||||
|
|
||||||
def determine_aclocal_path
|
def determine_aclocal_path
|
||||||
paths = deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/share/aclocal" }
|
paths = keg_only_deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/share/aclocal" }
|
||||||
paths << "#{HOMEBREW_PREFIX}/share/aclocal"
|
paths << "#{HOMEBREW_PREFIX}/share/aclocal"
|
||||||
paths << "/opt/X11/share/aclocal" if x11?
|
paths << "/opt/X11/share/aclocal" if x11?
|
||||||
paths.to_path_s
|
paths.to_path_s
|
||||||
@ -276,8 +274,8 @@ if not superenv?
|
|||||||
# we must do this or tools like pkg-config won't get found by configure scripts etc.
|
# we must do this or tools like pkg-config won't get found by configure scripts etc.
|
||||||
ENV.prepend 'PATH', "#{HOMEBREW_PREFIX}/bin", ':' unless ORIGINAL_PATHS.include? HOMEBREW_PREFIX/'bin'
|
ENV.prepend 'PATH', "#{HOMEBREW_PREFIX}/bin", ':' unless ORIGINAL_PATHS.include? HOMEBREW_PREFIX/'bin'
|
||||||
else
|
else
|
||||||
|
ENV.keg_only_deps = []
|
||||||
ENV.deps = []
|
ENV.deps = []
|
||||||
ENV.all_deps = []
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user