class Openvdb < Formula desc "Sparse volume processing toolkit" homepage "https://www.openvdb.org/" url "https://github.com/AcademySoftwareFoundation/openvdb/archive/v6.2.1.tar.gz" sha256 "d4dd17ad571d4dd048f010e6f4b7657391960ed73523ed1716a17e7cf1806f71" head "https://github.com/AcademySoftwareFoundation/openvdb.git" bottle do sha256 "3bd3b1a0572827e3904945d4f5251a4f946a5776b25a64668a7c27ed52d56f26" => :catalina sha256 "1a2e126f54fc18e62f6591f2edcc54f6e9bfcddf88c8fdba77d13d4539fe8e0a" => :mojave sha256 "a5d74669be61a935aca1d9151c5dff04c854f4a1976f421c15e1ebcc6ae3b0da" => :high_sierra end depends_on "doxygen" => :build depends_on "boost" depends_on "c-blosc" depends_on "glfw" depends_on "ilmbase" depends_on "jemalloc" depends_on "openexr" depends_on "tbb" resource "test_file" do url "https://nexus.aswf.io/content/repositories/releases/io/aswf/openvdb/models/cube.vdb/1.0.0/cube.vdb-1.0.0.zip" sha256 "05476e84e91c0214ad7593850e6e7c28f777aa4ff0a1d88d91168a7dd050f922" end def install ENV.cxx11 # Adjust hard coded paths in Makefile args = [ "DESTDIR=#{prefix}", "BLOSC_INCL_DIR=#{Formula["c-blosc"].opt_include}", "BLOSC_LIB_DIR=#{Formula["c-blosc"].opt_lib}", "BOOST_INCL_DIR=#{Formula["boost"].opt_include}", "BOOST_LIB_DIR=#{Formula["boost"].opt_lib}", "BOOST_THREAD_LIB=-lboost_thread-mt", "CONCURRENT_MALLOC_LIB_DIR=#{Formula["jemalloc"].opt_lib}", "CPPUNIT_INCL_DIR=", # Do not use cppunit "CPPUNIT_LIB_DIR=", "DOXYGEN=doxygen", "EXR_INCL_DIR=#{Formula["openexr"].opt_include}/OpenEXR", "EXR_LIB_DIR=#{Formula["openexr"].opt_lib}", "LOG4CPLUS_INCL_DIR=", # Do not use log4cplus "LOG4CPLUS_LIB_DIR=", "NUMPY_INCL_DIR=", "PYTHON_VERSION=", "TBB_INCL_DIR=#{Formula["tbb"].opt_include}", "TBB_LIB_DIR=#{Formula["tbb"].opt_lib}", "GLFW_INCL_DIR=#{Formula["glfw"].opt_include}", "GLFW_LIB_DIR=#{Formula["glfw"].opt_lib}", "GLFW_LIB=-lglfw", ] ENV.append_to_cflags "-I #{buildpath}" cd "openvdb" do system "make", "install", *args end end test do resource("test_file").stage testpath system "#{bin}/vdb_print", "-m", "cube.vdb" end end