67 lines
2.2 KiB
Ruby
67 lines
2.2 KiB
Ruby
class Openvdb < Formula
|
|
desc "Sparse volume processing toolkit"
|
|
homepage "https://www.openvdb.org/"
|
|
url "https://github.com/AcademySoftwareFoundation/openvdb/archive/v7.0.0.tar.gz"
|
|
sha256 "97bc8ae35ef7ccbf49a4e25cb73e8c2eccae6b235bac86f2150707efcd1e910d"
|
|
revision 1
|
|
head "https://github.com/AcademySoftwareFoundation/openvdb.git"
|
|
|
|
bottle do
|
|
sha256 "d2d9f1a4dd5983cd22eab1b569c6c50ae501584cab1812a1d3ad36f57a3eb0f2" => :catalina
|
|
sha256 "a9f7ebf1aec1579173f4923b6ce5e107a60631e47ab3ffeeb0c3656fe97fefcb" => :mojave
|
|
sha256 "8ff45c14d9d2d7c499834a775d1796dbeff7f985a25a4023f184a96a361594a6" => :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
|
|
# 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
|