Remove special cases in build-time dep audit

Closes Homebrew/homebrew#23931.
This commit is contained in:
Jack Nagel 2013-11-04 12:00:06 -06:00
parent c556b3dc09
commit 6c3ee52d14
2 changed files with 8 additions and 11 deletions

View File

@ -151,11 +151,7 @@ class FormulaAuditor
case dep.name case dep.name
when *BUILD_TIME_DEPS when *BUILD_TIME_DEPS
next if dep.build? next if dep.build? or dep.run?
next if dep.name == 'autoconf' && f.name =~ /automake/
next if dep.name == 'libtool' && %w{imagemagick libgphoto2 libp11 libextractor}.any? { |n| f.name == n }
next if dep.name =~ /autoconf|pkg-config/ && f.name == 'ruby-build'
problem %{#{dep} dependency should be "depends_on '#{dep}' => :build"} problem %{#{dep} dependency should be "depends_on '#{dep}' => :build"}
when "git", "ruby", "emacs", "mercurial" when "git", "ruby", "emacs", "mercurial"
problem <<-EOS.undent problem <<-EOS.undent

View File

@ -132,14 +132,15 @@ class DependencyCollector
end end
def autotools_dep(spec, tags) def autotools_dep(spec, tags)
unless MacOS::Xcode.provides_autotools? return if MacOS::Xcode.provides_autotools?
case spec
when :libltdl then spec = :libtool
else tags << :build
end
Dependency.new(spec.to_s, tags) if spec == :libltdl
spec = :libtool
tags << :run
end end
tags << :build unless tags.include? :run
Dependency.new(spec.to_s, tags)
end end
def ant_dep(spec, tags) def ant_dep(spec, tags)