Requirement: add modify_build_environment method
Rather than doing type introspection in build.rb, just define a method to perform the necessary environment setup for Requirements. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
4dde88b6d3
commit
5a62582b39
@ -56,7 +56,7 @@ at_exit do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def install f
|
def install f
|
||||||
ENV.x11 if f.external_deps.any? { |dep| dep.is_a? X11Dependency }
|
f.external_deps.each { |dep| dep.modify_build_environment }
|
||||||
|
|
||||||
f.recursive_deps.uniq.each do |dep|
|
f.recursive_deps.uniq.each do |dep|
|
||||||
dep = Formula.factory dep
|
dep = Formula.factory dep
|
||||||
|
@ -118,6 +118,7 @@ class Requirement
|
|||||||
def satisfied?; false; end
|
def satisfied?; false; end
|
||||||
def fatal?; false; end
|
def fatal?; false; end
|
||||||
def message; ""; end
|
def message; ""; end
|
||||||
|
def modify_build_environment; nil end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -188,4 +189,8 @@ class X11Dependency < Requirement
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def modify_build_environment
|
||||||
|
ENV.x11
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user