-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmcfost.rb
33 lines (29 loc) · 1012 Bytes
/
mcfost.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# mcfost homebrew install script
class Mcfost < Formula
desc "Monte Carlo Radiative Transfer code"
homepage "https://ipag.osug.fr/~pintec/mcfost/docs/html/index.html"
url "https://github.com/cpinte/mcfost.git", :branch => "main"
version "4.1.03"
# specifying --HEAD installs from danieljprice fork (hack)
head "https://github.com/danieljprice/mcfost.git", :branch => "main"
depends_on "cfitsio"
depends_on "gcc"
depends_on "hdf5"
depends_on "sprng2"
depends_on "voro-dev"
def install
ENV.deparallelize
Dir.chdir("src/")
mkdir_p lib.to_s # equivalent to mkdir -p #{lib}
mkdir_p include.to_s
system "make", "all", "SYSTEM=gfortran", "MCFOST_INSTALL=#{HOMEBREW_PREFIX}", \
"MCFOST_NO_XGBOOST=yes", "MCFOST_GIT=1", "CXX=#{ENV.cxx}", \
"INCLUDE=-I#{HOMEBREW_PREFIX}/include", "LIBS=#{HOMEBREW_PREFIX}/lib"
bin.install "mcfost"
lib.install "libmcfost.a"
include.install "mcfost2phantom.mod"
end
test do
system "false"
end
end