
Per requirements.rb: > XXX If the satisfy block returns a Pathname, then make sure that it > remains available on the PATH. This makes requirements like > satisfy { which("executable") } > work, even under superenv where "executable" wouldn't normally be on the > PATH. > This is undocumented magic and it should be removed, but we need to add > a way to declare path-based requirements that work with superenv first. Fixes homebrew/homebrew-python#170. Closes Homebrew/homebrew#38448.
14 lines
201 B
Ruby
14 lines
201 B
Ruby
require 'requirement'
|
|
|
|
class FortranDependency < Requirement
|
|
fatal true
|
|
|
|
default_formula 'gcc'
|
|
|
|
env { ENV.fortran }
|
|
|
|
satisfy :build_env => false do
|
|
which(ENV["FC"] || "gfortran")
|
|
end
|
|
end
|