[packages/openvdb] - updated dependencies, fixed build with tbb 2013 and python module

qboosh qboosh at pld-linux.org
Mon Jun 22 20:07:57 CEST 2026


commit 912d77dbff3871a0527b51742b42ee9baa5a86dd
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jun 22 20:08:22 2026 +0200

    - updated dependencies, fixed build with tbb 2013 and python module

 openvdb-nanovdb-python-update.patch | 11 ++++++++
 openvdb-tbb.patch                   | 10 ++++++++
 openvdb.spec                        | 50 +++++++++++++++++++++----------------
 3 files changed, 49 insertions(+), 22 deletions(-)
---
diff --git a/openvdb.spec b/openvdb.spec
index d02992e..75a1945 100644
--- a/openvdb.spec
+++ b/openvdb.spec
@@ -2,47 +2,48 @@
 #
 # Conditional build:
 %bcond_with	apidocs		# API documentation (gs permission errors as of 10.0.1)
-%bcond_with	llvm		# OpenVDB AX (requires LLVM in [10..14])
+%bcond_with	llvm		# OpenVDB AX (requires LLVM in [18..21])
 %bcond_without	static_libs	# static libraries
 %bcond_with	avx		# AVX x86 SIMD instructions
 %bcond_with	sse4		# SSE4.2 x86 SIMD instructions
-%bcond_with	python3	# CPython 3.x binding
+%bcond_without	python3		# CPython 3.x binding
 
 Summary:	C++ library for sparse volumetric data discretized on three-dimensional grids
 Summary(pl.UTF-8):	Biblioteka C++ do rzadkich danych wolumetrycznych dyskretyzowanych na siatkach trójwymiarowych
 Name:		openvdb
 Version:	13.0.0
 Release:	1
-License:	MPL v2.0
+License:	Apache v2.0
 Group:		Libraries
 #Source0Download: https://github.com/AcademySoftwareFoundation/openvdb/releases
 Source0:	https://github.com/AcademySoftwareFoundation/openvdb/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	7a10f529ed12d9e3ed6d3fd50f157378
+Patch0:		%{name}-tbb.patch
+Patch1:		%{name}-nanovdb-python-update.patch
 URL:		https://www.openvdb.org/
 BuildRequires:	Imath-devel >= 3.2
-BuildRequires:	OpenEXR-devel >= 3.1
-BuildRequires:	boost-devel >= 1.73
+BuildRequires:	OpenEXR-devel >= 3.2
+BuildRequires:	boost-devel >= 1.82
 BuildRequires:	c-blosc-devel >= 1.17.0
-BuildRequires:	cmake >= 3.18
+BuildRequires:	cmake >= 3.24
 %{?with_apidocs:BuildRequires:	doxygen >= 1.8.8}
 %{?with_apidocs:BuildRequires:	ghostscript}
-BuildRequires:	glfw-devel >= 3.2
+BuildRequires:	glfw-devel >= 3.3
 BuildRequires:	libpng-devel
-BuildRequires:	libstdc++-devel >= 6:9.3.1
+BuildRequires:	libstdc++-devel >= 6:11.2.1
 %if %{with llvm}
-BuildRequires:	llvm-devel >= 10.0.0
-BuildRequires:	llvm-devel < 15
+BuildRequires:	llvm-devel >= 18.0.0
+BuildRequires:	llvm-devel < 22
 %endif
-BuildRequires:	log4cplus-devel >= 1.1.2
+BuildRequires:	log4cplus-devel >= 2.0
 BuildRequires:	pkgconfig
 %if %{with python3}
-BuildRequires:	python3-devel >= 1:3.9.1
-BuildRequires:	python3-numpy-devel >= 1.20.0
-BuildRequires:	python3-pybind11 >= 2.9.1
+BuildRequires:	python3-devel >= 1:3.11
+BuildRequires:	python3-nanobind >= 2.5.0
 %endif
 BuildRequires:	rpm-build >= 4.6
-BuildRequires:	rpmbuild(macros) >= 1.605
-BuildRequires:	tbb-devel >= 2020.2
+BuildRequires:	rpmbuild(macros) >= 2.047
+BuildRequires:	tbb-devel >= 2020.3
 BuildRequires:	zlib-devel >= 1.2.7
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -73,10 +74,10 @@ Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki OpenVDB
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
 Requires:	Imath-devel >= 3.1
-Requires:	OpenEXR-devel >= 3.1
-Requires:	boost-devel >= 1.73
-Requires:	libstdc++-devel >= 6:9.3.1
-Requires:	tbb-devel >= 2020.2
+Requires:	OpenEXR-devel >= 3.2
+Requires:	boost-devel >= 1.82
+Requires:	libstdc++-devel >= 6:11.2.1
+Requires:	tbb-devel >= 2020.3
 
 %description devel
 Header files for OpenVDB library.
@@ -122,6 +123,8 @@ Dokumentacja API biblioteki OpenVDB.
 
 %prep
 %setup -q
+%patch -P0 -p1
+%patch -P1 -p1
 
 %build
 %ifarch %{ix86} x32
@@ -130,10 +133,11 @@ CXXFLAGS="%{rpmcxxflags} --param ggc-min-expand=20 --param ggc-min-heapsize=6553
 %endif
 %cmake -B build \
 	-DCMAKE_INSTALL_DOCDIR=%{_docdir}/openvdb \
+	-DNANOVDB_BUILD_PYTHON_MODULE=%{__ON_OFF python3} \
 	%{?with_llvm:-DOPENVDB_BUILD_AX=ON} \
 	%{?with_apidocs:-DOPENVDB_BUILD_DOCS=ON} \
 	-DOPENVDB_BUILD_NANOVDB=ON \
-	%{cmake_on_off python3 OPENVDB_BUILD_PYTHON_MODULE} \
+	-DOPENVDB_BUILD_PYTHON_MODULE=%{__ON_OFF python3} \
 	-DOPENVDB_ENABLE_RPATH=OFF \
 %if %{with avx}
 	-DOPENVDB_SIMD=AVX \
@@ -145,6 +149,7 @@ CXXFLAGS="%{rpmcxxflags} --param ggc-min-expand=20 --param ggc-min-heapsize=6553
 	-DUSE_EXR=ON \
 	-DUSE_LOG4CPLUS=ON \
 	-DUSE_PNG=ON \
+	-Dnanobind_DIR=%{py3_sitescriptdir}/nanobind/cmake
 
 %{__make} -C build
 
@@ -185,7 +190,8 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-pyopenvdb
 %defattr(644,root,root,755)
-%attr(755,root,root) %{py3_sitedir}/pyopenvdb.cpython-*.so
+%attr(755,root,root) %{py3_sitedir}/nanovdb.cpython-*.so
+%attr(755,root,root) %{py3_sitedir}/openvdb.cpython-*.so
 %endif
 
 %if %{with apidocs}
diff --git a/openvdb-nanovdb-python-update.patch b/openvdb-nanovdb-python-update.patch
new file mode 100644
index 0000000..7fac110
--- /dev/null
+++ b/openvdb-nanovdb-python-update.patch
@@ -0,0 +1,11 @@
+--- openvdb-13.0.0/nanovdb/nanovdb/python/PyIO.cc.orig	2026-06-22 19:30:09.598873204 +0200
++++ openvdb-13.0.0/nanovdb/nanovdb/python/PyIO.cc	2026-06-22 19:31:37.865061691 +0200
+@@ -39,7 +39,7 @@ void defineFileGridMetaData(nb::module_&
+         .def_prop_ro("tileCount",
+                      [](io::FileMetaData& metaData) { return std::make_tuple(metaData.tileCount[0], metaData.tileCount[1], metaData.tileCount[2]); })
+         .def_ro("codec", &io::FileMetaData::codec)
+-        .def_ro("padding", &io::FileMetaData::padding)
++        .def_ro("blindDataCount", &io::FileMetaData::blindDataCount)
+         .def_ro("version", &io::FileMetaData::version);
+ 
+     nb::bind_vector<std::vector<io::FileMetaData>>(m, "FileMetaDataVector");
diff --git a/openvdb-tbb.patch b/openvdb-tbb.patch
new file mode 100644
index 0000000..479e1b8
--- /dev/null
+++ b/openvdb-tbb.patch
@@ -0,0 +1,10 @@
+--- openvdb-13.0.0/openvdb/openvdb/thread/Threading.h.orig	2026-06-21 20:14:02.186013581 +0200
++++ openvdb-13.0.0/openvdb/openvdb/thread/Threading.h	2026-06-21 20:14:13.222620457 +0200
+@@ -22,6 +22,7 @@
+ ///   software doesn't need to provide compile time defines.
+ #include <tbb/blocked_range.h>
+ #include <tbb/task.h>
++#include <tbb/task_arena.h>
+ #include <tbb/task_group.h>
+ 
+ namespace openvdb {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openvdb.git/commitdiff/912d77dbff3871a0527b51742b42ee9baa5a86dd



More information about the pld-cvs-commit mailing list