# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
PortGroup cmake 1.1
PortGroup cxx11 1.1
PortGroup active_variants 1.1
github.setup AcademySoftwareFoundation openvdb 6.0.0 v
homepage http://www.openvdb.org/
categories graphics
license MPL-2
maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
description sparse volume data structure and tools
long_description OpenVDB is an open source C++ library comprising a novel hierarchical data structure \
and a large suite of tools for the efficient storage and manipulation of \
sparse volumetric data discretized on three-dimensional grids.
platforms darwin
checksums rmd160 5923bb445dbd9b55ef84a35ad4beebb072bc6677 \
sha256 9e7940c628ff2c8d47bc07d09f26c9e19370bc0807f91f15b7fa45f581c308c7 \
size 1808199
# openvdb/python/CMakeLists.txt has incorrect (for MacPorts) boost python file name
# Python calls libraries that require C++11
# Include correct Python Boost libraries
# avoid
# ccache: error: Failed to create directory ${prefix}/var/macports/build/.ccache/tmp: Operation not permitted
patchfiles-append patch-boost_python_name.diff \
patch-python_cxx11.diff \
patch-boost_python_libs.diff \
patch-no_ccache.diff
configure.env-append BLOSC_ROOT=${prefix} \
TBB_ROOT=${prefix} \
GLFW3_ROOT=${prefix} \
ILMBASE_ROOT=${prefix} \
OPENEXR_ROOT=${prefix}
depends_lib-append port:zlib \
port:boost \
port:blosc \
port:tbb \
path:lib/pkgconfig/glfw3.pc:glfw \
port:ilmbase \
port:openexr
# FindOpenEXR.cmake guesses wrong on how to include version number in library name
# use GLFW version 3
# use latest ABI version (default is 3)
configure.args-append -DOPENEXR_NAMESPACE_VERSIONING=OFF \
-DUSE_GLFW3=ON \
-DOPENVDB_ABI_VERSION_NUMBER=[lindex [split ${version} .] 0]
# do not "Build the OpenVDB unit tests" (avoid dependency on cppunit)
configure.args-append -DOPENVDB_BUILD_UNITTESTS=OFF
variant python27 description {Build the Python 2.7 bindings} conflicts python36 python37 {
depends_lib-append \
port:python27 \
port:py27-numpy
configure.args-append \
-DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7 \
-DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/Headers \
-DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/2.7/Python \
-DPYOPENVDB_INSTALL_DIRECTORY=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7
require_active_variants boost python27
}
variant python36 description {Build the Python 3.6 bindings} conflicts python27 python37 {
depends_lib-append \
port:python36 \
port:py36-numpy
configure.args-append \
-DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/3.6/bin/python3.6 \
-DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/3.6/Headers \
-DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/3.6/Python \
-DPYOPENVDB_INSTALL_DIRECTORY=${frameworks_dir}/Python.framework/Versions/3.6/lib/python3.6
require_active_variants boost python36
}
variant python37 description {Build the Python 3.7 bindings} conflicts python27 python36 {
depends_lib-append \
port:python37 \
port:py37-numpy
configure.args-append \
-DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/3.7/bin/python3.7 \
-DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/3.7/Headers \
-DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/3.7/Python \
-DPYOPENVDB_INSTALL_DIRECTORY=${frameworks_dir}/Python.framework/Versions/3.7/lib/python3.7
require_active_variants boost python37