summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-10 04:29:46 +0000
committerSam James <sam@gentoo.org>2021-12-10 04:29:46 +0000
commit9d065d7d4ab901612eb897b36caa3e0d8a0e7820 (patch)
tree90b20cb239002b80bd2a48ca7c0c89708e6e82eb /media-gfx/openvdb
parentx11-misc/screenkey: update metadata (diff)
downloadgentoo-9d065d7d4ab901612eb897b36caa3e0d8a0e7820.tar.gz
gentoo-9d065d7d4ab901612eb897b36caa3e0d8a0e7820.tar.bz2
gentoo-9d065d7d4ab901612eb897b36caa3e0d8a0e7820.zip
media-gfx/openvdb: use upstream patch for Python detection issue
Bug: https://bugs.gentoo.org/790350 Bug: https://github.com/AcademySoftwareFoundation/openvdb/pull/1275 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx/openvdb')
-rw-r--r--media-gfx/openvdb/files/openvdb-9.0.0-unconditionally-search-Python-interpreter.patch57
-rw-r--r--media-gfx/openvdb/openvdb-9.0.0.ebuild1
2 files changed, 26 insertions, 32 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()
diff --git a/media-gfx/openvdb/openvdb-9.0.0.ebuild b/media-gfx/openvdb/openvdb-9.0.0.ebuild
index 60c18372ac5d..e40833eff061 100644
--- a/media-gfx/openvdb/openvdb-9.0.0.ebuild
+++ b/media-gfx/openvdb/openvdb-9.0.0.ebuild
@@ -121,7 +121,6 @@ src_configure() {
-DUSE_NUMPY=$(usex numpy)
-DOPENVDB_BUILD_PYTHON_UNITTESTS=$(usex test)
-DPYOPENVDB_INSTALL_DIRECTORY="$(python_get_sitedir)"
- -DPython_EXECUTABLE="${PYTHON}"
-DPython_INCLUDE_DIR="$(python_get_includedir)"
)
fi