homebrew-core/Formula/opensubdiv.rb

38 lines
977 B
Ruby
Raw Normal View History

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_3_3.tar.gz"
sha256 "2dc81b3a085e692cca3166ac88751e4674a9ddf5b5d7935adf677bb2bd3f2d2f"
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