diff options
| author | Jack Nagel | 2013-06-03 15:08:47 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-06-03 16:52:00 -0500 |
| commit | 873d9766ae1e14ba172a4f815fc56023d231eb76 (patch) | |
| tree | 0134f81ca2e7890272faf7d4fa37377d8c287294 /Library/Homebrew/dependency.rb | |
| parent | 3937d2bb848951d40a04bf2de7b0a1cf554d9846 (diff) | |
| download | brew-873d9766ae1e14ba172a4f815fc56023d231eb76.tar.bz2 | |
Allow explicit conversion of requirements to deps
Fixes Homebrew/homebrew#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 |
