diff options
| author | Jack Nagel | 2012-07-09 11:33:43 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-07-27 02:42:22 -0500 |
| commit | 5a62582b39b7df44c8068970728f0a2f800bf39f (patch) | |
| tree | cd166e6c450fa01022105ded612855e9c55a8e9a /Library | |
| parent | 4dde88b6d3e17cd9a9b5bbe6ac300a1f8a148a40 (diff) | |
| download | brew-5a62582b39b7df44c8068970728f0a2f800bf39f.tar.bz2 | |
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>
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Homebrew/build.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/dependencies.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 72628ac46..ef74a1942 100755 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -56,7 +56,7 @@ at_exit do end 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| dep = Formula.factory dep diff --git a/Library/Homebrew/dependencies.rb b/Library/Homebrew/dependencies.rb index 65026dab8..6a4c3e228 100644 --- a/Library/Homebrew/dependencies.rb +++ b/Library/Homebrew/dependencies.rb @@ -118,6 +118,7 @@ class Requirement def satisfied?; false; end def fatal?; false; end def message; ""; end + def modify_build_environment; nil end end @@ -188,4 +189,8 @@ class X11Dependency < Requirement EOS end + def modify_build_environment + ENV.x11 + end + end |
