summaryrefslogtreecommitdiff
path: root/media-gfx/openvdb/files/openvdb-9.0.0-unconditionally-search-Python-interpreter.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/openvdb/files/openvdb-9.0.0-unconditionally-search-Python-interpreter.patch')
-rw-r--r--media-gfx/openvdb/files/openvdb-9.0.0-unconditionally-search-Python-interpreter.patch57
1 files changed, 26 insertions, 31 deletions
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
index 66c50b485d70..1a24f4c535c3 100644
--- 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
@@ -1,40 +1,35 @@
-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
+https://bugs.gentoo.org/790350
+https://github.com/AcademySoftwareFoundation/openvdb/pull/1275
-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)
-```
+From 86cbe16b5f8bf9df2c3825d7d7d90c58bc0d3391 Mon Sep 17 00:00:00 2001
+From: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
+Date: Wed, 8 Dec 2021 16:57:58 +0000
+Subject: [PATCH] Fixed an issue with find_python and cmake 3.18
-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>
+Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
---
- openvdb/openvdb/python/CMakeLists.txt | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
+ openvdb/openvdb/python/CMakeLists.txt | 10 +++++++++-
+ pendingchanges/cmake_python.txt | 2 ++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/openvdb/openvdb/python/CMakeLists.txt b/openvdb/openvdb/python/CMakeLists.txt
-index 2821efb5..af93976a 100644
+index 2821efb5d..179c0c57d 100644
--- a/openvdb/openvdb/python/CMakeLists.txt
+++ b/openvdb/openvdb/python/CMakeLists.txt
-@@ -98,9 +98,7 @@ endfunction()
+@@ -97,7 +97,15 @@ 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()
-+list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter)
-
- if(USE_NUMPY)
- list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS NumPy)
---
-2.34.1
-
+-set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development)
++
++# @note explicitly only search for Development.Module from 3.18 as searching
++# Development.Embed can cause issues on linux systems where it doesn't exist
++if(${CMAKE_VERSION} VERSION_LESS 3.18)
++ set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development)
++else()
++ set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development.Module)
++endif()
++
+ if(NOT DEFINED PYOPENVDB_INSTALL_DIRECTORY)
+ list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter)
+ endif()