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.3.0-source.tgz"
|
|
sha256 "54a236f5708bc105d5b60ddb2b95ea7062537ccd2720860377994c1a9bb86429"
|
|
head "https://gitlab.onelab.info/gmsh/gmsh.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "312cc434ac2434b38d704da9f9d3e2c870724c4ada3ed606b175b50ddab8f3a0" => :mojave
|
|
sha256 "eb51f2ee1c641429bd6d2172301a62b6c5ea5b1224540b2f40002dc6ae6689b8" => :high_sierra
|
|
sha256 "1bf3095bf1f023dbdc51b9b3dabee776f1893769e7941323ab49c651d0637e19" => :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
|