diff options
| author | Jack Nagel | 2013-06-03 15:08:47 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-06-03 16:52:00 -0500 |
| commit | b2972dc1f9c88eff02175fbf17f67aea6e8e370f (patch) | |
| tree | f638231efa04e652c72d4b1381d94e6874236600 /Library/Homebrew/dependency.rb | |
| parent | 17bf43ef705cae45545f3c43cf37b6be6e12d509 (diff) | |
| download | homebrew-b2972dc1f9c88eff02175fbf17f67aea6e8e370f.tar.bz2 | |
Allow explicit conversion of requirements to deps
Fixes #19857.
Diffstat (limited to 'Library/Homebrew/dependency.rb')
| -rw-r--r-- | Library/Homebrew/dependency.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/dependency.rb b/Library/Homebrew/dependency.rb index a6905bc37..91def8442 100644 --- a/Library/Homebrew/dependency.rb +++ b/Library/Homebrew/dependency.rb @@ -5,6 +5,7 @@ class Dependency include Dependable attr_reader :name, :tags + attr_accessor :env_proc def initialize(name, tags=[]) @name = name @@ -54,6 +55,10 @@ class Dependency tags << 'universal' if to_formula.build.has_option? 'universal' end + def modify_build_environment + env_proc.call unless env_proc.nil? + end + class << self # Expand the dependencies of dependent recursively, optionally yielding # [dependent, dep] pairs to allow callers to apply arbitrary filters to |
