brew/Library/Homebrew/requirements/fortran_dependency.rb
Jack Nagel 3abd9455a3 Rename Fortran requirement to fix option generation
So, `depends_on :fortran => :optional` will generate "--with-fortran"
rather than "--with-fortranRequired".
2013-06-25 21:12:15 -05:00

25 lines
467 B
Ruby

require 'requirement'
class FortranDependency < Requirement
fatal true
default_formula 'gfortran'
env { ENV.fortran }
satisfy :build_env => false do
(ENV['FC'] || which('gfortran')) ? true : false
end
def message; <<-EOS.undent
Fortran is required to install.
You can install this with Homebrew using:
brew install gfortran
Or you can use an external compiler by setting:
FC=<path-to-fortran-compiler>
EOS
end
end