homebrew-core/Formula/gmsh.rb
luz.paz 26551f2e18
gmsh 4.1.4
Closes #36710.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
2019-02-05 11:16:41 +08:00

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.1.4-source.tgz"
sha256 "9a67092b878f88ff68d7bc563c4fdacfbd2aa66a5d55ea175233f464bd4b37c0"
head "https://gitlab.onelab.info/gmsh/gmsh.git"
bottle do
cellar :any
sha256 "c4676ca21be5de4ea9e75ca17ee29ff63e9d7ee50f67ff5479ab3141b97a5423" => :mojave
sha256 "c88413df8c3805fb75f191c718a70eca36d55d1e0d949450077dffd90b0dd32d" => :high_sierra
sha256 "e29e03668717e5eec526d51e57db0e0e0da3460f4430b1f4534c0c2aae322869" => :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