64 lines
2.7 KiB
Ruby
64 lines
2.7 KiB
Ruby
class Opencascade < Formula
|
|
desc "3D modeling and numerical simulation software for CAD/CAM/CAE"
|
|
homepage "https://dev.opencascade.org/"
|
|
url "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_5_1;sf=tgz"
|
|
version "7.5.1"
|
|
sha256 "3a43d8b50df78ade72786fa63bc8808deac6380189333663e7b4ef8558ae7739"
|
|
license "LGPL-2.1-only"
|
|
|
|
livecheck do
|
|
url "https://dev.opencascade.org/release"
|
|
regex(/href=.*?opencascade[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 arm64_big_sur: "c3d77a1512b8174f092084426a9b7cfb64e539032c05fbe1cbc02f090f2aff4a"
|
|
sha256 big_sur: "f2a959da9687c5751d4b495314a2012e00bc7540e8e3f2e5ef27170e7b1af9e9"
|
|
sha256 catalina: "c8ea1d7020c634be8551478a869622c2f778b14b2a1ed1a90a471ccf6562dbce"
|
|
sha256 mojave: "8e64a1430d98aaa46a752b6479b9ddd986df497d4d00850bd02d609e59053e06"
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "doxygen" => :build
|
|
depends_on "rapidjson" => :build
|
|
depends_on "freeimage"
|
|
depends_on "freetype"
|
|
depends_on "tbb"
|
|
depends_on "tcl-tk"
|
|
|
|
def install
|
|
tcltk = Formula["tcl-tk"]
|
|
system "cmake", ".",
|
|
"-DUSE_FREEIMAGE=ON",
|
|
"-DUSE_RAPIDJSON=ON",
|
|
"-DUSE_TBB=ON",
|
|
"-DINSTALL_DOC_Overview=ON",
|
|
"-D3RDPARTY_FREEIMAGE_DIR=#{Formula["freeimage"].opt_prefix}",
|
|
"-D3RDPARTY_FREETYPE_DIR=#{Formula["freetype"].opt_prefix}",
|
|
"-D3RDPARTY_RAPIDJSON_DIR=#{Formula["rapidjson"].opt_prefix}",
|
|
"-D3RDPARTY_RAPIDJSON_INCLUDE_DIR=#{Formula["rapidjson"].opt_include}",
|
|
"-D3RDPARTY_TBB_DIR=#{Formula["tbb"].opt_prefix}",
|
|
"-D3RDPARTY_TCL_DIR:PATH=#{tcltk.opt_prefix}",
|
|
"-D3RDPARTY_TK_DIR:PATH=#{tcltk.opt_prefix}",
|
|
"-D3RDPARTY_TCL_INCLUDE_DIR:PATH=#{tcltk.opt_include}",
|
|
"-D3RDPARTY_TK_INCLUDE_DIR:PATH=#{tcltk.opt_include}",
|
|
"-D3RDPARTY_TCL_LIBRARY_DIR:PATH=#{tcltk.opt_lib}",
|
|
"-D3RDPARTY_TK_LIBRARY_DIR:PATH=#{tcltk.opt_lib}",
|
|
"-D3RDPARTY_TCL_LIBRARY:FILEPATH=#{tcltk.opt_lib}/libtcl#{tcltk.version.major_minor}.dylib",
|
|
"-D3RDPARTY_TK_LIBRARY:FILEPATH=#{tcltk.opt_lib}/libtk#{tcltk.version.major_minor}.dylib",
|
|
"-DCMAKE_INSTALL_RPATH:FILEPATH=#{lib}",
|
|
*std_cmake_args
|
|
system "make", "install"
|
|
|
|
bin.env_script_all_files(libexec/"bin", CASROOT: prefix)
|
|
|
|
# Some apps expect resources in legacy ${CASROOT}/src directory
|
|
prefix.install_symlink pkgshare/"resources" => "src"
|
|
end
|
|
|
|
test do
|
|
output = shell_output("#{bin}/DRAWEXE -c \"pload ALL\"")
|
|
assert_equal "1", output.chomp
|
|
end
|
|
end
|