diff options
Diffstat (limited to 'Library/Homebrew/compat/dependency_collector.rb')
| -rw-r--r-- | Library/Homebrew/compat/dependency_collector.rb | 64 |
1 files changed, 22 insertions, 42 deletions
diff --git a/Library/Homebrew/compat/dependency_collector.rb b/Library/Homebrew/compat/dependency_collector.rb index 652cf370b..1c91f2283 100644 --- a/Library/Homebrew/compat/dependency_collector.rb +++ b/Library/Homebrew/compat/dependency_collector.rb @@ -27,57 +27,42 @@ class DependencyCollector odeprecated "'depends_on :tex'" TeXRequirement.new(tags) when :autoconf, :automake, :bsdmake, :libtool - output_deprecation(spec, tags) + output_deprecation(spec) autotools_dep(spec, tags) when :cairo, :fontconfig, :freetype, :libpng, :pixman - output_deprecation(spec, tags) + output_deprecation(spec) Dependency.new(spec.to_s, tags) when :ant, :expat - # output_deprecation(spec, tags) + output_deprecation(spec) Dependency.new(spec.to_s, tags) when :libltdl tags << :run - output_deprecation("libtool", tags) + output_deprecation("libtool") Dependency.new("libtool", tags) when :apr - output_deprecation(spec, tags, "apr-util") + output_deprecation(spec, "apr-util") Dependency.new("apr-util", tags) when :fortran - # output_deprecation(spec, tags, "gcc") - FortranRequirement.new(tags) + output_deprecation(spec, "gcc") + Dependency.new("gcc", tags) when :gpg - # output_deprecation(spec, tags, "gnupg") - GPG2Requirement.new(tags) + output_deprecation(spec, "gnupg") + Dependency.new("gnupg", tags) when :hg - # output_deprecation(spec, tags, "mercurial") - MercurialRequirement.new(tags) + output_deprecation(spec, "mercurial") + Dependency.new("mercurial", tags) when :mpi - # output_deprecation(spec, tags, "open-mpi") - MPIRequirement.new(*tags) - when :emacs - # output_deprecation(spec, tags) - EmacsRequirement.new(tags) - when :mysql - # output_deprecation(spec, tags) - MysqlRequirement.new(tags) - when :perl - # output_deprecation(spec, tags) - PerlRequirement.new(tags) - when :postgresql - # output_deprecation(spec, tags) - PostgresqlRequirement.new(tags) + output_deprecation(spec, "open-mpi") + Dependency.new("open-mpi", tags) when :python, :python2 - # output_deprecation(spec, tags) - PythonRequirement.new(tags) + output_deprecation(spec, "python") + Dependency.new("python", tags) when :python3 - # output_deprecation(spec, tags) - Python3Requirement.new(tags) - when :rbenv - # output_deprecation(spec, tags) - RbenvRequirement.new(tags) - when :ruby - # output_deprecation(spec, tags) - RubyRequirement.new(tags) + output_deprecation(spec, "python3") + Dependency.new("python3", tags) + when :emacs, :mysql, :perl, :postgresql, :rbenv, :ruby + output_deprecation(spec) + Dependency.new(spec, tags) else _parse_symbol_spec(spec, tags) end @@ -88,13 +73,8 @@ class DependencyCollector Dependency.new(spec.to_s, tags) end - def output_deprecation(dependency, tags, new_dependency = dependency) - tags_string = if tags.length > 1 - " => [:#{tags.join ", :"}]" - elsif tags.length == 1 - " => :#{tags.first}" - end + def output_deprecation(dependency, new_dependency = dependency) odeprecated "'depends_on :#{dependency}'", - "'depends_on \"#{new_dependency}\"#{tags_string}'" + "'depends_on \"#{new_dependency}\"'" end end |
