Add :fortran requirement

This commit is contained in:
Adam Vandenberg 2013-06-23 18:35:20 -07:00
parent 4c26224a24
commit 0f1d491d81
3 changed files with 28 additions and 2 deletions

View File

@ -93,6 +93,7 @@ class DependencyCollector
when :macos then MinimumMacOSRequirement.new(tags)
when :mysql then MysqlDependency.new(tags)
when :postgresql then PostgresqlDependency.new(tags)
when :fortran then FortranRequired.new(tags)
when :tex then TeXDependency.new(tags)
when :clt then CLTDependency.new(tags)
when :arch then ArchRequirement.new(tags)

View File

@ -1,9 +1,10 @@
require 'requirement'
require 'requirements/fortran_dependency'
require 'requirements/language_module_dependency'
require 'requirements/x11_dependency'
require 'requirements/macos_requirement'
require 'requirements/mpi_dependency'
require 'requirements/python_dependency'
require 'requirements/macos_requirement'
require 'requirements/x11_dependency'
class XcodeDependency < Requirement
fatal true

View File

@ -0,0 +1,24 @@
require 'requirement'
class FortranRequired < 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