summaryrefslogtreecommitdiff
path: root/media-gfx/openvdb/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /media-gfx/openvdb/files
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'media-gfx/openvdb/files')
-rw-r--r--media-gfx/openvdb/files/openvdb-8.2.0-fix-finding-ilmbase-if-imath-and-ilmbase-are-installed.patch37
-rw-r--r--media-gfx/openvdb/files/openvdb-8.2.0-unconditionally-search-Python-interpreter.patch34
-rw-r--r--media-gfx/openvdb/files/openvdb-9.0.0-numpy.patch2
-rw-r--r--media-gfx/openvdb/files/openvdb-9.0.0-unconditionally-search-Python-interpreter.patch40
4 files changed, 112 insertions, 1 deletions
diff --git a/media-gfx/openvdb/files/openvdb-8.2.0-fix-finding-ilmbase-if-imath-and-ilmbase-are-installed.patch b/media-gfx/openvdb/files/openvdb-8.2.0-fix-finding-ilmbase-if-imath-and-ilmbase-are-installed.patch
new file mode 100644
index 000000000000..88752e9fa0eb
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-8.2.0-fix-finding-ilmbase-if-imath-and-ilmbase-are-installed.patch
@@ -0,0 +1,37 @@
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sat, 4 Dec 2021 20:16:42 +0100
+Subject: [PATCH] fix finding ilmbase if imath and ilmbase are installed
+
+If both, ilmbase-2.5 and imath-3 are installed, the configuration fails
+if OPENVDB_BUILD_BINARIES and OPENVDB_BUILD_RENDER are set.
+The patch adds an additional guard based on the USE_IMATH_HALF option
+being set and thus decide whether to search for and use imath or ilmbase.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/openvdb/openvdb/cmd/CMakeLists.txt
++++ b/openvdb/openvdb/cmd/CMakeLists.txt
+@@ -81,12 +81,17 @@ endif()
+ #### vdb_render
+
+ if(OPENVDB_BUILD_VDB_RENDER)
+- find_package(Imath CONFIG)
+- if (NOT TARGET Imath::Imath)
++ if(USE_IMATH_HALF)
++ find_package(Imath CONFIG)
++ if (NOT TARGET Imath::Imath)
++ find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half Iex IlmThread Imath)
++ find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED COMPONENTS IlmImf)
++ else()
++ find_package(OpenEXR CONFIG)
++ endif()
++ else()
+ find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED COMPONENTS Half Iex IlmThread Imath)
+ find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED COMPONENTS IlmImf)
+- else()
+- find_package(OpenEXR CONFIG)
+ endif()
+
+ set(VDB_RENDER_SOURCE_FILES openvdb_render.cc)
+--
+2.34.1
+
diff --git a/media-gfx/openvdb/files/openvdb-8.2.0-unconditionally-search-Python-interpreter.patch b/media-gfx/openvdb/files/openvdb-8.2.0-unconditionally-search-Python-interpreter.patch
new file mode 100644
index 000000000000..933d2965b2bc
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-8.2.0-unconditionally-search-Python-interpreter.patch
@@ -0,0 +1,34 @@
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sat, 4 Dec 2021 20:45:49 +0100
+Subject: [PATCH] unconditionally search Python interpreter
+
+When setting PYOPENVDB_INSTALL_DIRECTORY, CMake would fail with:
+```
+-- Could NOT find Python (missing: Python_LIBRARIES Development Development.Module Development.Embed) (found version "3.9.9")
+CMake Error at openvdb/openvdb/python/CMakeLists.txt:65 (message):
+ Could NOT find Python::Module (Required is at least version "2.7")
+Call Stack (most recent call first):
+ openvdb/openvdb/python/CMakeLists.txt:112 (openvdb_check_python_version)
+ ```
+
+It seems like we always need to search for the interpreter.
+
+Bug: https://bugs.gentoo.org/790350
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/openvdb/openvdb/python/CMakeLists.txt
++++ b/openvdb/openvdb/python/CMakeLists.txt
+@@ -73,10 +73,7 @@ endfunction()
+ # target but this was only added in CMake 3.15. See:
+ # https://github.com/AcademySoftwareFoundation/openvdb/issues/886
+ set(OPENVDB_PYTHON_DEPS)
+-set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development)
+-if(NOT DEFINED PYOPENVDB_INSTALL_DIRECTORY)
+- list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter)
+-endif()
++set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development Interpreter)
+
+ if(${CMAKE_VERSION} VERSION_LESS 3.14)
+ find_package(Python QUIET COMPONENTS ${OPENVDB_PYTHON_REQUIRED_COMPONENTS})
+--
+2.34.1
+
diff --git a/media-gfx/openvdb/files/openvdb-9.0.0-numpy.patch b/media-gfx/openvdb/files/openvdb-9.0.0-numpy.patch
index 972db42b3556..5fa90a7b6524 100644
--- a/media-gfx/openvdb/files/openvdb-9.0.0-numpy.patch
+++ b/media-gfx/openvdb/files/openvdb-9.0.0-numpy.patch
@@ -1,5 +1,5 @@
Grabbed relevant parts from upstream PR for 9.x; it's a variant
-of https://github.com/gentoo/gentoo/pull/22738 which wa sfor earlier versions.
+of https://github.com/gentoo/gentoo/pull/22738 which was for earlier versions.
https://github.com/AcademySoftwareFoundation/openvdb/pull/1237
diff --git a/media-gfx/openvdb/files/openvdb-9.0.0-unconditionally-search-Python-interpreter.patch b/media-gfx/openvdb/files/openvdb-9.0.0-unconditionally-search-Python-interpreter.patch
new file mode 100644
index 000000000000..66c50b485d70
--- /dev/null
+++ b/media-gfx/openvdb/files/openvdb-9.0.0-unconditionally-search-Python-interpreter.patch
@@ -0,0 +1,40 @@
+From e9b193cc3481c4e157aa39e753ce49a0da69bb2b Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 2 Dec 2021 02:16:15 +0000
+Subject: [PATCH] cmake: unconditionally search for Python interpreter
+
+When setting PYOPENVDB_INSTALL_DIRECTORY, CMake would fail with:
+```
+-- Could NOT find Python (missing: Python_LIBRARIES Development Development.Module Development.Embed) (found version "3.9.9")
+CMake Error at openvdb/openvdb/python/CMakeLists.txt:65 (message):
+ Could NOT find Python::Module (Required is at least version "2.7")
+Call Stack (most recent call first):
+ openvdb/openvdb/python/CMakeLists.txt:112 (openvdb_check_python_version)
+```
+
+It seems like we always need to search for the interpreter.
+
+Bug: https://bugs.gentoo.org/790350
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ openvdb/openvdb/python/CMakeLists.txt | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/openvdb/openvdb/python/CMakeLists.txt b/openvdb/openvdb/python/CMakeLists.txt
+index 2821efb5..af93976a 100644
+--- a/openvdb/openvdb/python/CMakeLists.txt
++++ b/openvdb/openvdb/python/CMakeLists.txt
+@@ -98,9 +98,7 @@ endfunction()
+ # https://github.com/AcademySoftwareFoundation/openvdb/issues/886
+ set(OPENVDB_PYTHON_DEPS)
+ set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development)
+-if(NOT DEFINED PYOPENVDB_INSTALL_DIRECTORY)
+- list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter)
+-endif()
++list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter)
+
+ if(USE_NUMPY)
+ list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS NumPy)
+--
+2.34.1
+