1 |
commit: b44368f21076a1620b2bf87d0d358a41552fff05 |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Thu Oct 28 10:14:27 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 31 02:18:26 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b44368f2 |
7 |
|
8 |
media-gfx/openvdb: patch to find numpy |
9 |
|
10 |
- adds consistency in the find_package call for NumPy by adding the |
11 |
same components like in the find_package call for Python |
12 |
- additionally pass -DPython_INCLUDE_DIR to cmake |
13 |
- add an option for python unittests when USE=test is set |
14 |
- remove flag-o-matic inherit, which isn't needed according to pkgcheck |
15 |
- change the negation on the utils USE flag to build the utilities if |
16 |
the USE flag is set. |
17 |
|
18 |
Bug: https://bugs.gentoo.org/788886 |
19 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
20 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
21 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
22 |
|
23 |
...dd-consistency-for-NumPy-find_package-call.patch | 21 +++++++++++++++++++++ |
24 |
media-gfx/openvdb/openvdb-8.0.1-r2.ebuild | 11 +++++++---- |
25 |
2 files changed, 28 insertions(+), 4 deletions(-) |
26 |
|
27 |
diff --git a/media-gfx/openvdb/files/openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch b/media-gfx/openvdb/files/openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..87d1d24755b |
30 |
--- /dev/null |
31 |
+++ b/media-gfx/openvdb/files/openvdb-8.0.1-add-consistency-for-NumPy-find_package-call.patch |
32 |
@@ -0,0 +1,21 @@ |
33 |
+From: Bernd Waibel <waebbl-gentoo@××××××.net> |
34 |
+Date: Thu, 28 Oct 2021 11:34:16 +0200 |
35 |
+Subject: [PATCH] add consistency for NumPy find_package call |
36 |
+ |
37 |
+Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
38 |
+ |
39 |
+diff --git a/openvdb/openvdb/python/CMakeLists.txt b/openvdb/openvdb/python/CMakeLists.txt |
40 |
+index b473beb..b468d4f 100644 |
41 |
+--- a/openvdb/openvdb/python/CMakeLists.txt |
42 |
++++ b/openvdb/openvdb/python/CMakeLists.txt |
43 |
+@@ -94,7 +94,7 @@ else() |
44 |
+ OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${Python_INCLUDE_DIRS}) |
45 |
+ |
46 |
+ if(USE_NUMPY) |
47 |
+- find_package(Python QUIET COMPONENTS NumPy) |
48 |
++ find_package(Python QUIET COMPONENTS ${OPENVDB_PYTHON_REQUIRED_COMPONENTS} NumPy) |
49 |
+ if(NOT TARGET Python::NumPy) |
50 |
+ message(FATAL_ERROR "Could NOT find NumPy (Required is at least version " |
51 |
+ "\"${MINIMUM_NUMPY_VERSION}\")" |
52 |
+-- |
53 |
+2.33.1 |
54 |
|
55 |
diff --git a/media-gfx/openvdb/openvdb-8.0.1-r2.ebuild b/media-gfx/openvdb/openvdb-8.0.1-r2.ebuild |
56 |
index fc19c87ea4c..0afc20a97e0 100644 |
57 |
--- a/media-gfx/openvdb/openvdb-8.0.1-r2.ebuild |
58 |
+++ b/media-gfx/openvdb/openvdb-8.0.1-r2.ebuild |
59 |
@@ -5,7 +5,7 @@ EAPI=7 |
60 |
|
61 |
PYTHON_COMPAT=( python3_{7,8,9} ) |
62 |
|
63 |
-inherit cmake flag-o-matic python-single-r1 |
64 |
+inherit cmake python-single-r1 |
65 |
|
66 |
DESCRIPTION="Library for the efficient manipulation of volumetric data" |
67 |
HOMEPAGE="https://www.openvdb.org" |
68 |
@@ -66,6 +66,7 @@ BDEPEND=" |
69 |
PATCHES=( |
70 |
"${FILESDIR}/${PN}-7.1.0-0001-Fix-multilib-header-source.patch" |
71 |
"${FILESDIR}/${P}-glfw-libdir.patch" |
72 |
+ "${FILESDIR}/${P}-add-consistency-for-NumPy-find_package-call.patch" |
73 |
) |
74 |
|
75 |
pkg_setup() { |
76 |
@@ -92,9 +93,9 @@ src_configure() { |
77 |
-DOPENVDB_ABI_VERSION_NUMBER="${version}" |
78 |
-DOPENVDB_BUILD_DOCS=$(usex doc) |
79 |
-DOPENVDB_BUILD_UNITTESTS=$(usex test) |
80 |
- -DOPENVDB_BUILD_VDB_LOD=$(usex !utils) |
81 |
- -DOPENVDB_BUILD_VDB_RENDER=$(usex !utils) |
82 |
- -DOPENVDB_BUILD_VDB_VIEW=$(usex !utils) |
83 |
+ -DOPENVDB_BUILD_VDB_LOD=$(usex utils) |
84 |
+ -DOPENVDB_BUILD_VDB_RENDER=$(usex utils) |
85 |
+ -DOPENVDB_BUILD_VDB_VIEW=$(usex utils) |
86 |
-DOPENVDB_CORE_SHARED=ON |
87 |
-DOPENVDB_CORE_STATIC=$(usex static-libs) |
88 |
-DOPENVDB_ENABLE_RPATH=OFF |
89 |
@@ -108,8 +109,10 @@ src_configure() { |
90 |
mycmakeargs+=( |
91 |
-DOPENVDB_BUILD_PYTHON_MODULE=ON |
92 |
-DUSE_NUMPY=$(usex numpy) |
93 |
+ -DOPENVDB_BUILD_PYTHON_UNITTESTS=$(usex test) |
94 |
-DPYOPENVDB_INSTALL_DIRECTORY="$(python_get_sitedir)" |
95 |
-DPython_EXECUTABLE="${PYTHON}" |
96 |
+ -DPython_INCLUDE_DIR="$(python_get_includedir)" |
97 |
) |
98 |
fi |