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
when *BUILD_TIME_DEPS
next if dep.build?
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'
next if dep.build? or dep.run?
problem %{#{dep} dependency should be "depends_on '#{dep}' => :build"}
when "git", "ruby", "emacs", "mercurial"
problem <<-EOS.undent

View File

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