<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/a5861e92fc642b89aac9c7991cab2cfc85093383">https://github.com/macports/macports-ports/commit/a5861e92fc642b89aac9c7991cab2cfc85093383</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 a5861e92fc6 openvdb: add new variants +nanovdb, +utils, etc.
</span>a5861e92fc6 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit a5861e92fc642b89aac9c7991cab2cfc85093383
</span>Author: jasonliu-- <jasonliu--@users.noreply.github.com>
AuthorDate: Tue Jul 18 19:39:46 2023 -0400
<span style='display:block; white-space:pre;color:#404040;'> openvdb: add new variants +nanovdb, +utils, etc.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> * This commit enables the building of one of the subcomponents of
</span><span style='display:block; white-space:pre;color:#404040;'> OpenVDB, called NanoVDB. It has been added to the default variants
</span><span style='display:block; white-space:pre;color:#404040;'> because at least one port that depends on OpenVDB, Blender, is already
</span><span style='display:block; white-space:pre;color:#404040;'> able to use NanoVDB for GPU-accelerated real-time rendering of
</span><span style='display:block; white-space:pre;color:#404040;'> volumetric effects.
</span><span style='display:block; white-space:pre;color:#404040;'> * Made dependencies on port:imath and port:openexr into an (optional)
</span><span style='display:block; white-space:pre;color:#404040;'> variant. Previously, these were set as hard dependencies in the
</span><span style='display:block; white-space:pre;color:#404040;'> Portfile, but they weren't actually being used because the -DUSE_EXR
</span><span style='display:block; white-space:pre;color:#404040;'> CMake option wasn't set to ON.
</span><span style='display:block; white-space:pre;color:#404040;'> * Removed building the Python module from the default variants. None of
</span><span style='display:block; white-space:pre;color:#404040;'> the ports that use OpenVDB as a dependency are using the Python
</span><span style='display:block; white-space:pre;color:#404040;'> module.
</span>---
graphics/openvdb/Portfile | 166 +++++++++++++++++++++++++++++++++++++---------
1 file changed, 136 insertions(+), 30 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 6d577c6ddbc..415d4ee8ece 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,14 +8,14 @@ PortGroup compiler_blacklist_versions 1.0
</span> PortGroup boost 1.0
github.setup AcademySoftwareFoundation openvdb 10.0.1 v
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 6
</span> categories graphics
platforms darwin
license {MPL-2 LGPL-2.1+}
maintainers {mcalhoun @MarcusCalhoun-Lopez} \
@jasonliu-- openmaintainer
<span style='display:block; white-space:pre;background:#ffe0e0;'>-homepage https://www.openvdb.org/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://www.${name}.org/
</span> description sparse volumetric data structure and tools
long_description OpenVDB is an open source C++ library \
comprising a novel hierarchical data structure \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -42,13 +42,15 @@ depends_build-append port:pkgconfig
</span> depends_lib-append port:zlib \
port:blosc \
port:tbb \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- path:lib/pkgconfig/glfw3.pc:glfw \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:imath \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:openexr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:lib/pkgconfig/glfw3.pc:glfw
</span>
configure.args-append -DTBB_INCLUDEDIR=${prefix}/libexec/tbb/include \
-DTBB_LIBRARYDIR=${prefix}/libexec/tbb/lib
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Disable building command-line tools.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# We control whether to build them using the +utils variant below.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append -DOPENVDB_BUILD_BINARIES=OFF
</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
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -62,11 +64,6 @@ configure.args-append -DOPENVDB_SIMD=AVX
</span> # Disable CMake uninstall target
configure.args-append -DOPENVDB_ENABLE_UNINSTALL=OFF
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# OpenVDB Core: binary command-line tools
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.args-append -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:#ffe0e0;'>-
</span> pre-test {
if {![variant_isset tests]} {
ui_error "'tests' variant must be activated to enable test support"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -74,17 +71,75 @@ pre-test {
</span> }
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# All of the CMake module files are getting installed, regardless of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# whether the option has been enabled or not. This issue has been
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# reported (and a patch has been submitted) upstream:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/AcademySoftwareFoundation/openvdb/pull/1643
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# If and when the patch gets accepted and merged into upstream, the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# following code should be deleted from this Portfile when the patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# gets incorporated into a future upstream release.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set lib_cmake_path ${prefix}/lib/cmake/OpenVDB
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset logging]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}$lib_cmake_path/FindLog4cplus.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset openexr]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}$lib_cmake_path/FindIlmBase.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}$lib_cmake_path/FindOpenEXR.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset jemalloc]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}$lib_cmake_path/FindJemalloc.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset utils]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}$lib_cmake_path/OpenVDBUtils.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}$lib_cmake_path/OpenVDBHoudiniSetup.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}$lib_cmake_path/OpenVDBMayaSetup.cmake
</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;'>+############################ OpenVDB Core ############################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> variant tests description {Build unit tests} {
depends_lib-append port:gtest
configure.args-append -DOPENVDB_BUILD_UNITTESTS=ON
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset nanovdb]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DNANOVDB_BUILD_UNITTESTS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> test.run yes
}
variant docs description {Build documentation} {
depends_build-append path:bin/doxygen:doxygen
configure.args-append -DOPENVDB_BUILD_DOCS=ON \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -DOPENVDB_DOXYGEN_HOUDINI=OFF \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- -DOPENVDB_DOXYGEN_AX=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;'>+ -DOPENVDB_DOXYGEN_HOUDINI=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![variant_isset nanovdb]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DOPENVDB_DOXYGEN_NANOVDB=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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant nanovdb description {Build the NanoVDB library} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DOPENVDB_BUILD_NANOVDB=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DNANOVDB_BUILD_TOOLS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DNANOVDB_USE_INTRINSICS=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DNANOVDB_USE_OPENVDB=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;'>+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;'>+variant openexr description {Build with OpenEXR support} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:imath \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:openexr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DUSE_EXR=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;'>+variant png description {Build with PNG support} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:libpng
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DUSE_PNG=ON
</span> }
variant jemalloc \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -94,14 +149,74 @@ variant jemalloc \
</span> configure.args-append -DCONCURRENT_MALLOC=Jemalloc
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-variant logging description {Build and enable logging support} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib-append port:log4cplus
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-append -DUSE_LOG4CPLUS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+############### OpenVDB Binaries (command-line tools) ################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant utils description {Build OpenVDB command-line tools} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DOPENVDB_BUILD_BINARIES=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DOPENVDB_BUILD_BINARIES=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset nanovdb]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DNANOVDB_BUILD_TOOLS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DNANOVDB_BUILD_TOOLS=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;'>+ 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;'>+ -DOPENVDB_BUILD_VDB_TOOL=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # OpenVDB tool (vdb_tool) options
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset tests]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DBUILD_TEST=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset nanovdb]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DOPENVDB_TOOL_USE_NANO=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset png]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DOPENVDB_TOOL_USE_PNG=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # There is currently a configure error when trying to build vdb_tool
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # using OpenEXR. This issue has already been reported upstream:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://github.com/AcademySoftwareFoundation/openvdb/issues/1541
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# if {[variant_isset openexr]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# configure.args-append -DOPENVDB_TOOL_USE_EXR=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset jpg]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DOPENVDB_TOOL_USE_JPG=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[variant_isset alembic]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DOPENVDB_TOOL_USE_ABC=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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant jpg requires utils \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description {Build OpenVDB tool (vdb_tool) with JPG support} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:libjpeg-turbo
</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 alembic requires utils \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description {Build OpenVDB tool (vdb_tool) with Alembic support} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:alembic
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-default_variants +docs +jemalloc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+############################## NanoVDB ###############################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant examples requires nanovdb description {Build NanoVDB examples} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DNANOVDB_BUILD_EXAMPLES=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set python_suffixes {27 37 38 39 310 311}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant benchmark requires nanovdb examples \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description {Build NanoVDB benchmark in examples} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</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 -DNANOVDB_BUILD_BENCHMARK=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;'>+############################# PyOpenVDB ##############################
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set python_suffixes {27 38 39 310 311}
</span> set python_ports {}
foreach s $python_suffixes {
lappend python_ports python$s
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -113,7 +228,7 @@ foreach s $python_suffixes {
</span> set i [lsearch -exact $python_ports $p]
set c [lreplace $python_ports $i $i]
variant $p conflicts {*}${c} \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- description "Build the pyopenvdb Python ${v} module" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description "Build the PyOpenVDB Python ${v} module" \
</span> "
depends_lib-append port:${p} \
port:py${s}-numpy
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -126,7 +241,7 @@ foreach s $python_suffixes {
</span>
post-patch {
reinplace s|__MACPORTS_PYTHON_VERSION__|${v}|g \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/openvdb/openvdb/python/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/${name}/${name}/python/CMakeLists.txt
</span> }
configure.args-append -DOPENVDB_BUILD_PYTHON_MODULE=ON \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -134,14 +249,5 @@ foreach s $python_suffixes {
</span> "
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set set_python_default yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-foreach s $python_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:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# this default version should stay synchronized with default
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# 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-append +python311
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default_variants +docs +nanovdb +examples +openexr +jemalloc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ +utils +png +jpg +alembic
</span></pre><pre style='margin:0'>
</pre>