diff options
| author | Mike McQuaid | 2016-07-16 22:14:55 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-07-29 21:21:29 -0600 |
| commit | 369fc93479006dd73207d8bd6f5e9b839b867463 (patch) | |
| tree | 08012c0835c76bd3978f555baea2148e6d1bfb40 /Library | |
| parent | 10ddb2ed974d351d8675216152c18f492e624af4 (diff) | |
| download | brew-369fc93479006dd73207d8bd6f5e9b839b867463.tar.bz2 | |
compat/dependency_collector: cleanup style.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/compat/dependency_collector.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/compat/dependency_collector.rb b/Library/Homebrew/compat/dependency_collector.rb index bce04d047..27236ae4b 100644 --- a/Library/Homebrew/compat/dependency_collector.rb +++ b/Library/Homebrew/compat/dependency_collector.rb @@ -6,12 +6,16 @@ class DependencyCollector def parse_symbol_spec(spec, tags) case spec when :clt + odeprecated "'depends_on :clt'" when :autoconf, :automake, :bsdmake, :libtool + output_deprecation(spec, tags) autotools_dep(spec, tags) when :cairo, :fontconfig, :freetype, :libpng, :pixman + output_deprecation(spec, tags) Dependency.new(spec.to_s, tags) when :libltdl tags << :run + output_deprecation("libtool", tags) Dependency.new("libtool", tags) else _parse_symbol_spec(spec, tags) @@ -22,4 +26,14 @@ class DependencyCollector tags << :build unless tags.include? :run Dependency.new(spec.to_s, tags) end + + def output_deprecation(dependency, tags) + tags_string = if tags.length > 1 + " => [:#{tags.join ", :"}]" + elsif tags.length == 1 + " => :#{tags.first}" + end + odeprecated "'depends_on :#{dependency}'", + "'depends_on \"#{dependency}\"#{tags_string}'" + end end |
