homebrew-core/Formula/opensubdiv.rb

51 lines
1.4 KiB
Ruby

class Opensubdiv < Formula
desc "Open-source subdivision surface library"
homepage "https://graphics.pixar.com/opensubdiv/docs/intro.html"
url "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v3_4_4.tar.gz"
sha256 "20d49f80a2b778ad4d01f091ad88d8c2f91cf6c7363940c6213241ce6f1048fb"
license "Apache-2.0"
livecheck do
url :stable
regex(/^v?(\d+(?:[._]\d+)+)$/i)
end
bottle do
sha256 arm64_big_sur: "76d36c038038fd7008964ec8d06f36b2970e56deda06e35096ab59cf02e056d9"
sha256 big_sur: "2e1d8e64192097735c133a6b8282c8d204e3955b9359a85b51b129c7c8d1efe6"
sha256 catalina: "3c25d8912c5751dda7134cd15b6841acead81b1d86b017acdc4e89fab9527a9b"
sha256 mojave: "f335e92fcfd6f03e1c7348dc28b221fd38dfcb0d1bd27c8c5270c711b3019561"
end
depends_on "cmake" => :build
depends_on "glfw"
def install
glfw = Formula["glfw"]
args = std_cmake_args + %W[
-DNO_CLEW=1
-DNO_CUDA=1
-DNO_DOC=1
-DNO_EXAMPLES=1
-DNO_OMP=1
-DNO_OPENCL=1
-DNO_PTEX=1
-DNO_TBB=1
-DGLFW_LOCATION=#{glfw.opt_prefix}
]
mkdir "build" do
system "cmake", "..", *args
system "make"
system "make", "install"
pkgshare.install bin/"tutorials/hbr_tutorial_0"
rm_rf "#{bin}/tutorials"
end
end
test do
output = shell_output("#{pkgshare}/hbr_tutorial_0")
assert_match "Created a pyramid with 5 faces and 5 vertices", output
end
end