aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorCharlie Sharpsteen2011-03-10 12:26:29 -0800
committerAdam Vandenberg2011-03-12 13:30:12 -0800
commit36737a5f684e34b37be64483678124610782485f (patch)
tree2c1ceae06cf7d57d4533b01258a59c530e5fb8ef /Library
parentb02519199a0b6ba88ae41bc1ab1ad1719fb14159 (diff)
downloadhomebrew-36737a5f684e34b37be64483678124610782485f.tar.bz2
brew audit - check for depends_on 'gfortran'
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-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?