Add :fortran requirement
This commit is contained in:
parent
4c26224a24
commit
0f1d491d81
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
24
Library/Homebrew/requirements/fortran_dependency.rb
Normal file
24
Library/Homebrew/requirements/fortran_dependency.rb
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user