53 lines
1.5 KiB
Ruby
53 lines
1.5 KiB
Ruby
class Gmsh < Formula
|
|
desc "3D finite element grid generator with CAD engine"
|
|
homepage "https://gmsh.info/"
|
|
url "https://gmsh.info/src/gmsh-4.2.3-source.tgz"
|
|
sha256 "58a8c8828b66e77680b52feb8a91fb4790d0a93906e411f3bfa1928864e52858"
|
|
head "https://gitlab.onelab.info/gmsh/gmsh.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "a07f8f04a788c6a444a700800b7d353a41e3b20b5e67ab086fafd23cbe62649f" => :mojave
|
|
sha256 "0c4a368ac3bb8c72e4f2a2e44bac79daadb2828447165e0ed2e49db0133a7b1f" => :high_sierra
|
|
sha256 "b7d6e26fb366e4aee94027f8983235610ff2063b3a72102284fae17b2bda47d2" => :sierra
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "cairo"
|
|
depends_on "fltk"
|
|
depends_on "gcc" # for gfortran
|
|
depends_on "open-mpi"
|
|
depends_on "opencascade"
|
|
|
|
def install
|
|
args = std_cmake_args + %W[
|
|
-DENABLE_OS_SPECIFIC_INSTALL=0
|
|
-DGMSH_BIN=#{bin}
|
|
-DGMSH_LIB=#{lib}
|
|
-DGMSH_DOC=#{pkgshare}/gmsh
|
|
-DGMSH_MAN=#{man}
|
|
-DENABLE_BUILD_LIB=ON
|
|
-DENABLE_BUILD_SHARED=ON
|
|
-DENABLE_NATIVE_FILE_CHOOSER=ON
|
|
-DENABLE_PETSC=OFF
|
|
-DENABLE_SLEPC=OFF
|
|
-DENABLE_OCC=ON
|
|
]
|
|
|
|
ENV["CASROOT"] = Formula["opencascade"].opt_prefix
|
|
|
|
mkdir "build" do
|
|
system "cmake", "..", *args
|
|
system "make"
|
|
system "make", "install"
|
|
|
|
# Move onelab.py into libexec instead of bin
|
|
mkdir_p libexec
|
|
mv bin/"onelab.py", libexec
|
|
end
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/gmsh", "#{share}/doc/gmsh/tutorial/t1.geo", "-parse_and_exit"
|
|
end
|
|
end
|