brew audit - check for depends_on 'gfortran'

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Charlie Sharpsteen 2011-03-10 12:26:29 -08:00 committed by Adam Vandenberg
parent 8991d9bf15
commit 0e5436d4ab

View File

@ -6,7 +6,7 @@ def ff
return ARGV.formulae
end
def audit_formula_text text
def audit_formula_text name, text
problems = []
# Commented-out cmake support from default template
@ -98,6 +98,11 @@ def audit_formula_text text
end
end
# Formula depends_on gfortran
if text =~ /\s*depends_on\s*(\'|\")gfortran(\'|\")\s*$/
problems << " * Use ENV.fortran during install instead of depends_on 'gfortran'"
end unless name == "gfortran" # Gfortran itself has this text in the caveats
return problems
end
@ -230,7 +235,7 @@ module Homebrew extend self
# Don't try remaining audits on text in __END__
text_without_patch = (text.split("__END__")[0]).strip()
problems += audit_formula_text(text_without_patch)
problems += audit_formula_text(f.name, text_without_patch)
problems += audit_formula_options(f, text_without_patch)
unless problems.empty?