aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat/dependency_collector.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/compat/dependency_collector.rb')
-rw-r--r--Library/Homebrew/compat/dependency_collector.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/Library/Homebrew/compat/dependency_collector.rb b/Library/Homebrew/compat/dependency_collector.rb
index fbcf1c2a0..2e97d9d7f 100644
--- a/Library/Homebrew/compat/dependency_collector.rb
+++ b/Library/Homebrew/compat/dependency_collector.rb
@@ -1,6 +1,21 @@
require "dependency_collector"
class DependencyCollector
+ alias _parse_string_spec parse_string_spec
+
+ # Define the languages that we can handle as external dependencies.
+ LANGUAGE_MODULES = Set[
+ :lua, :lua51, :perl, :python, :python3, :ruby
+ ].freeze
+
+ def parse_string_spec(spec, tags)
+ if (tag = tags.first) && LANGUAGE_MODULES.include?(tag)
+ LanguageModuleRequirement.new(tag, spec, tags[1])
+ else
+ _parse_string_spec(spec, tags)
+ end
+ end
+
alias _parse_symbol_spec parse_symbol_spec
def parse_symbol_spec(spec, tags)
@@ -20,6 +35,18 @@ class DependencyCollector
tags << :run
output_deprecation("libtool", tags)
Dependency.new("libtool", tags)
+ when :mysql
+ # output_deprecation("mysql", tags)
+ MysqlRequirement.new(tags)
+ when :postgresql
+ # output_deprecation("postgresql", tags)
+ PostgresqlRequirement.new(tags)
+ when :gpg
+ # output_deprecation("gnupg", tags)
+ GPG2Requirement.new(tags)
+ when :rbenv
+ # output_deprecation("rbenv", tags)
+ RbenvRequirement.new(tags)
else
_parse_symbol_spec(spec, tags)
end