aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharlie Sharpsteen2011-03-10 12:26:29 -0800
committerAdam Vandenberg2011-03-12 13:30:12 -0800
commit0e5436d4abb120fbe101533f300d97e5688e7cd3 (patch)
treeb8436172f56a9212bf78140f19218f177381d785
parent8991d9bf15678fd236b2c70b5f7e5a825e122d7e (diff)
downloadbrew-0e5436d4abb120fbe101533f300d97e5688e7cd3.tar.bz2
brew audit - check for depends_on 'gfortran'
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rwxr-xr-xLibrary/Homebrew/cmd/audit.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 049260d47..354858b07 100755
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -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?