aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLibrary/Homebrew/build.rb2
-rw-r--r--Library/Homebrew/formula.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 894c6b4e9..34c257dc8 100755
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -56,7 +56,7 @@ at_exit do
end
def install f
- f.requirements.each { |dep| dep.modify_build_environment }
+ f.recursive_requirements.each { |req| req.modify_build_environment }
f.recursive_deps.uniq.each do |dep|
dep = Formula.factory dep
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 2f4562449..bf7c4f335 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -440,6 +440,12 @@ class Formula
end
end
+ def recursive_requirements
+ reqs = recursive_deps.map { |dep| dep.requirements }.to_set
+ reqs << requirements
+ reqs.flatten
+ end
+
protected
# Pretty titles the command and buffers stdout/stderr