<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ef8aff60875fa76bcc4c1f102d52e24b3cddd929">https://github.com/macports/macports-ports/commit/ef8aff60875fa76bcc4c1f102d52e24b3cddd929</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new ef8aff60875 openvdb: rewrite Portfile, add new variants, enable features
</span>ef8aff60875 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ef8aff60875fa76bcc4c1f102d52e24b3cddd929
</span>Author: Jason Liu <jasonliu--@users.noreply.github.com>
AuthorDate: Tue Dec 7 13:43:51 2021 -0500
<span style='display:block; white-space:pre;color:#404040;'> openvdb: rewrite Portfile, add new variants, enable features
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This commit is a fairly significant rewrite of the Portfile. After digging more deeply into the OpenVDB source code and documentation, it turns out that the Portfile is only performing a very minimal build. There are some features, such as support for hardware intrinsics, which are strongly recommended by the upstream authors, but are not enabled by default. I have added variants so that users can control some of these options from the 'port' command.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> I have added the new jemalloc variant to the default variants, since using jemalloc is strongly recommended by the upstream devs. I have added the new docs variant to the default variants, as suggested by the Best Practices section of the MacPorts Guide.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> In addition, I'm not sure why building the Python bindings is the default variant. Currently, the two ports that depend on openvdb are openimageio and blender. OpenImageIO doesn't need the Python module. I will need to check to see whether Blender somehow uses pyopenvdb (I'm doubtful: I believe that Blender links directly to libopenvdb.dylib at build time, which would likely be more performant than making calls to the Python module at run time), but I currently believe that the Python [...]
</span>---
graphics/openvdb/Portfile | 136 ++++++++++++++++++++++++++++++----------------
1 file changed, 90 insertions(+), 46 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/openvdb/Portfile b/graphics/openvdb/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index d67e164c694..c4b917ba270 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/openvdb/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/openvdb/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -8,40 +8,36 @@ PortGroup compiler_blacklist_versions 1.0
</span> PortGroup boost 1.0
github.setup AcademySoftwareFoundation openvdb 8.0.0 v
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories graphics
platforms darwin
license {MPL-2 LGPL-2.1+}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-maintainers {mcalhoun @MarcusCalhoun-Lopez} {@jasonliu--} openmaintainer
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-description sparse volumetric data structure and tools
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-long_description OpenVDB is an open source C++ library comprising a novel hierarchical data structure \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- and a large suite of tools for the efficient storage and manipulation of \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sparse volumetric data discretized on three-dimensional grids.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {mcalhoun @MarcusCalhoun-Lopez} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @jasonliu-- openmaintainer
</span>
homepage https://www.openvdb.org/
<span style='display:block; white-space:pre;background:#e0ffe0;'>+description sparse volumetric data structure and tools
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description OpenVDB is an open source C++ library \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ comprising a novel hierarchical data structure \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and a large suite of tools for the efficient \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ storage and manipulation of sparse volumetric \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ data discretized on three-dimensional grids. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ It was developed by DreamWorks Animation for \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ use in volumetric applications typically \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ encountered in computer-generated graphics and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ animation.
</span>
checksums rmd160 68e677f58b7fea6dc4bd8e6d55c531205195625c \
sha256 28a811bae32b62a2080aad4776c91d4453a7d52e2edbe1ab4a21783ec4aaa6bb \
size 2287123
compiler.cxx_standard 2014
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# error: cannot refer to variable template 'Contains' without a template argument list
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# error: cannot refer to variable template 'Contains' without a template
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# argument list
</span> # static_assert(NodeChainType::template Contains<NonConstNodeType>,
# ~~~~~~~~~~~~~~~ ^
compiler.blacklist-append {clang < 800}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# Find correct Python version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles-append patch-python_version.diff
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.env-append BLOSC_ROOT=${prefix} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- TBB_ROOT=${prefix} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- GLFW3_ROOT=${prefix} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ILMBASE_ROOT=${prefix} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- OPENEXR_ROOT=${prefix} \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ZLIB_ROOT=${prefix}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> depends_build-append port:pkgconfig
depends_lib-append port:zlib \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -51,56 +47,104 @@ depends_lib-append port:zlib \
</span> port:ilmbase \
port:openexr
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# OpenVDB Core: binary command-line tools
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append -DOPENVDB_BUILD_VDB_LOD=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOPENVDB_BUILD_VDB_RENDER=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOPENVDB_BUILD_VDB_VIEW=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DUSE_EXR=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # avoid
# ccache: error: Failed to create directory
# ${prefix}/var/macports/build/.ccache/tmp: Operation not permitted
# use latest ABI version (default is 3)
configure.args-append -DUSE_CCACHE=OFF \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -DOPENVDB_ABI_VERSION_NUMBER=[lindex [split ${version} .] 0] \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DOPENVDB_BUILD_VDB_LOD=ON \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DOPENVDB_BUILD_VDB_RENDER=ON \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DOPENVDB_BUILD_VDB_VIEW=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOPENVDB_ABI_VERSION_NUMBER=[lindex [split ${version} .] 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Enable SIMD compiler flags
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append -DOPENVDB_SIMD=AVX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-test {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset tests]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "'tests' variant must be activated to enable test support"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ error "Please enable the 'tests' variant and try again"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant tests description {Build unit tests} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:gtest
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DOPENVDB_BUILD_UNITTESTS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# do not "Build the OpenVDB unit tests" (avoid dependency on GoogleTest)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.args-append -DOPENVDB_BUILD_UNITTESTS=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant docs description {Build documentation} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:doxygen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|doc/html|share/doc/${name}/html|" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/doc/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -E \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "s|(DESTINATION )doc( MESSAGE_NEVER)|\\1share/doc/${name}\\2|" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/doc/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DOPENVDB_BUILD_DOCS=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOPENVDB_DOXYGEN_HOUDINI=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOPENVDB_DOXYGEN_AX=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant jemalloc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description {Use jemalloc as the concurrent memory allocator} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:jemalloc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DCONCURRENT_MALLOC=Jemalloc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set pythons_suffixes {27 36 37 38 39}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant logging description {Build and enable logging support} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:log4cplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DUSE_LOG4CPLUS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default_variants +docs +jemalloc
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set pythons_ports {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend pythons_ports python${s}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set python_suffixes {27 36 37 38 39}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set python_ports {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s $python_suffixes {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend python_ports python$s
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set p python${s}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set v [string index ${s} 0].[string index ${s} 1]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set i [lsearch -exact ${pythons_ports} ${p}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set c [lreplace ${pythons_ports} ${i} ${i}]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- variant ${p} description "Build the Python ${v} bindings" conflicts {*}${c} "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s $python_suffixes {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set p python$s
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set v [string index $s 0].[string index $s 1]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set i [lsearch -exact $python_ports $p]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set c [lreplace $python_ports $i $i]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant $p conflicts {*}${c} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description "Build the pyopenvdb Python ${v} module" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "
</span> depends_lib-append port:${p} \
port:py${s}-numpy
<span style='display:block; white-space:pre;background:#ffe0e0;'>- boost.require_numpy yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ boost.require_numpy yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ require_active_variants [boost::depends_portname] ${p}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ require_active_variants [boost::depends_portname]-numpy ${p}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-append -DOPENVDB_BUILD_PYTHON_MODULE=ON \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DUSE_NUMPY=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Find correct Python version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-python_version.diff
</span>
post-patch {
reinplace s|__MACPORTS_PYTHON_VERSION__|${v}|g \
${worksrcpath}/openvdb/openvdb/python/CMakeLists.txt
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- require_active_variants [boost::depends_portname] ${p}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- require_active_variants [boost::depends_portname]-numpy ${p}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DOPENVDB_BUILD_PYTHON_MODULE=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DUSE_NUMPY=ON
</span> "
}
set set_python_default yes
<span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach s ${pythons_suffixes} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[variant_isset python${s}]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set set_python_default no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach s $python_suffixes {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset python$s]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set set_python_default no
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# this default version should stay synchronized with default boost python variant
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${set_python_default}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_variants +python39
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# this default version should stay synchronized with default
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# boost python variant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {$set_python_default} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default_variants-append +python39
</span> }
</pre><pre style='margin:0'>
</pre>