1 |
commit: 1e960a28294ff0eae009fb059dcd1387989edd36 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 31 02:15:08 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 31 02:18:29 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e960a28 |
7 |
|
8 |
media-gfx/openvdb: revbump for build configuration changes; rebase 8.1/9.0 |
9 |
|
10 |
Rebasing on waebbl's changes. |
11 |
|
12 |
See: https://github.com/gentoo/gentoo/pull/22738 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
media-gfx/openvdb/files/openvdb-9.0.0-numpy.patch | 151 +++++++++++++++++++++ |
16 |
...vdb-7.1.0-r3.ebuild => openvdb-7.1.0-r4.ebuild} | 0 |
17 |
...vdb-8.0.1-r2.ebuild => openvdb-8.0.1-r3.ebuild} | 0 |
18 |
media-gfx/openvdb/openvdb-8.1.0.ebuild | 9 +- |
19 |
media-gfx/openvdb/openvdb-9.0.0.ebuild | 11 +- |
20 |
5 files changed, 164 insertions(+), 7 deletions(-) |
21 |
|
22 |
diff --git a/media-gfx/openvdb/files/openvdb-9.0.0-numpy.patch b/media-gfx/openvdb/files/openvdb-9.0.0-numpy.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..972db42b355 |
25 |
--- /dev/null |
26 |
+++ b/media-gfx/openvdb/files/openvdb-9.0.0-numpy.patch |
27 |
@@ -0,0 +1,151 @@ |
28 |
+Grabbed relevant parts from upstream PR for 9.x; it's a variant |
29 |
+of https://github.com/gentoo/gentoo/pull/22738 which wa sfor earlier versions. |
30 |
+ |
31 |
+https://github.com/AcademySoftwareFoundation/openvdb/pull/1237 |
32 |
+ |
33 |
+From 3c5f69efeacca762406a80d74b39b970c7023bd6 Mon Sep 17 00:00:00 2001 |
34 |
+From: Nick Avramoussis <4256455+Idclip@××××××××××××××××××××.com> |
35 |
+Date: Thu, 28 Oct 2021 16:54:10 +0100 |
36 |
+Subject: [PATCH 1/3] Improvements to find_package Python usage. Primarily |
37 |
+ fixes an issues where NumPy needs to be specified along with the Development |
38 |
+ and Interpreter components in a single call |
39 |
+ |
40 |
+Signed-off-by: Nick Avramoussis <4256455+Idclip@××××××××××××××××××××.com> |
41 |
+--- |
42 |
+ openvdb/openvdb/python/CMakeLists.txt | 97 +++++++++++++-------------- |
43 |
+ 1 file changed, 46 insertions(+), 51 deletions(-) |
44 |
+ |
45 |
+diff --git a/openvdb/openvdb/python/CMakeLists.txt b/openvdb/openvdb/python/CMakeLists.txt |
46 |
+index 7b36379f9..5e9141e8c 100644 |
47 |
+--- a/openvdb/openvdb/python/CMakeLists.txt |
48 |
++++ b/openvdb/openvdb/python/CMakeLists.txt |
49 |
+@@ -55,25 +55,39 @@ endif() |
50 |
+ # be provided to find_package(Python) with differing major versions. e.g. |
51 |
+ # calls to find_package(Python 2.7) fails if python3 is found on the system. |
52 |
+ function(OPENVDB_CHECK_PYTHON_VERSION) |
53 |
+- set(_PY_VERSION ${ARGV0}) |
54 |
+- set(_PY_PATH ${ARGV1}) |
55 |
+- if(NOT _PY_VERSION) |
56 |
+- message(FATAL_ERROR "Could NOT find Python (Required is at least version " |
57 |
+- "\"${MINIMUM_PYTHON_VERSION}\")" |
58 |
+- ) |
59 |
+- elseif(_PY_VERSION VERSION_LESS MINIMUM_PYTHON_VERSION) |
60 |
+- message(FATAL_ERROR "Could NOT find Python: Found unsuitable version \"${_PY_VERSION}\"" |
61 |
+- "but required is at least \"${MINIMUM_PYTHON_VERSION}\" (found ${_PY_PATH})" |
62 |
+- ) |
63 |
+- else() |
64 |
+- message(STATUS "Found Python: ${_PY_PATH}) (found suitable version \"${_PY_VERSION}\", " |
65 |
+- "minimum required is \"${MINIMUM_PYTHON_VERSION}\")" |
66 |
++ set(PY_TARGET ${ARGV0}) |
67 |
++ set(PY_TARGET_VERSION ${ARGV1}) |
68 |
++ set(PY_TARGET_INCLUDES ${ARGV2}) |
69 |
++ set(MIN_VERSION ${ARGV3}) |
70 |
++ set(FUTURE_MIN_VERSION ${ARGV4}) |
71 |
++ |
72 |
++ if(NOT TARGET ${PY_TARGET}) |
73 |
++ message(FATAL_ERROR "Could NOT find ${PY_TARGET} (Required is at least version " |
74 |
++ "\"${MIN_VERSION}\")" |
75 |
+ ) |
76 |
+ endif() |
77 |
++ |
78 |
++ if(PY_TARGET_VERSION AND MIN_VERSION) |
79 |
++ if(PY_TARGET_VERSION VERSION_LESS MIN_VERSION) |
80 |
++ message(FATAL_ERROR "Could NOT find ${PY_TARGET}: Found unsuitable version " |
81 |
++ "\"${PY_TARGET_VERSION}\" but required is at least \"${MIN_VERSION}\" (found ${PY_TARGET_INCLUDES})" |
82 |
++ ) |
83 |
++ endif() |
84 |
++ endif() |
85 |
++ |
86 |
++ message(STATUS "Found ${PY_TARGET}: ${PY_TARGET_INCLUDES}) (found suitable " |
87 |
++ "version \"${PY_TARGET_VERSION}\", minimum required is \"${MIN_VERSION}\")" |
88 |
++ ) |
89 |
++ |
90 |
++ if(OPENVDB_FUTURE_DEPRECATION AND PY_TARGET_VERSION AND FUTURE_MIN_VERSION) |
91 |
++ if(PY_TARGET_VERSION VERSION_LESS FUTURE_MIN_VERSION) |
92 |
++ message(DEPRECATION "Support for ${PY_TARGET} versions < ${FUTURE_MIN_VERSION} " |
93 |
++ "is deprecated and will be removed.") |
94 |
++ endif() |
95 |
++ endif() |
96 |
+ endfunction() |
97 |
+ |
98 |
+ # Configure Python and Numpy. Note that: |
99 |
+-# - find_package(Python NumPy) requires CMake >= 3.14 |
100 |
+ # - find_package(Python Development) target Python::Module requires CMake >= 3.15 |
101 |
+ # - find_package(Python Development.Module) requires CMake >= 3.18 |
102 |
+ # To ensure consistent versions between components Interpreter, Compiler, |
103 |
+@@ -85,38 +99,30 @@ endfunction() |
104 |
+ set(OPENVDB_PYTHON_DEPS) |
105 |
+ set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development) |
106 |
+ if(NOT DEFINED PYOPENVDB_INSTALL_DIRECTORY) |
107 |
+- list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter) |
108 |
++ list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter) |
109 |
+ endif() |
110 |
+ |
111 |
+-find_package(Python QUIET COMPONENTS ${OPENVDB_PYTHON_REQUIRED_COMPONENTS}) |
112 |
+-OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${Python_INCLUDE_DIRS}) |
113 |
+- |
114 |
+ if(USE_NUMPY) |
115 |
+- find_package(Python QUIET COMPONENTS NumPy) |
116 |
+- if(NOT TARGET Python::NumPy) |
117 |
+- message(FATAL_ERROR "Could NOT find NumPy (Required is at least version " |
118 |
+- "\"${MINIMUM_NUMPY_VERSION}\")" |
119 |
+- ) |
120 |
+- elseif(Python_NumPy_VERSION VERSION_LESS MINIMUM_NUMPY_VERSION) |
121 |
+- message(FATAL_ERROR "Could NOT find NumPy: Found unsuitable version \"${Python_NumPy_VERSION}\"" |
122 |
+- "but required is at least \"${MINIMUM_NUMPY_VERSION}\" (found ${Python_NumPy_INCLUDE_DIRS})" |
123 |
+- ) |
124 |
+- else() |
125 |
+- message(STATUS "Found NumPy: ${Python_NumPy_INCLUDE_DIRS} (found suitable " |
126 |
+- "version \"${Python_NumPy_VERSION}\", minimum required is " |
127 |
+- "\"${MINIMUM_NUMPY_VERSION}\")" |
128 |
+- ) |
129 |
+- endif() |
130 |
+- list(APPEND OPENVDB_PYTHON_DEPS Python::NumPy) |
131 |
++ list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS NumPy) |
132 |
+ endif() |
133 |
+ |
134 |
++# Make sure find_package(Python) is only ever invoked once with all required components |
135 |
++find_package(Python COMPONENTS ${OPENVDB_PYTHON_REQUIRED_COMPONENTS}) |
136 |
++ |
137 |
++openvdb_check_python_version(Python::Module |
138 |
++ "${Python_VERSION}" |
139 |
++ "${Python_INCLUDE_DIRS}" |
140 |
++ "${MINIMUM_PYTHON_VERSION}" |
141 |
++ "${FUTURE_MINIMUM_PYTHON_VERSION}") |
142 |
++list(APPEND OPENVDB_PYTHON_DEPS Python::Module) |
143 |
++ |
144 |
+ if(USE_NUMPY) |
145 |
+- if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_NUMPY_VERSION) |
146 |
+- if(Python_NumPy_VERSION VERSION_LESS FUTURE_MINIMUM_NUMPY_VERSION) |
147 |
+- message(DEPRECATION "Support for NumPy versions < ${FUTURE_MINIMUM_NUMPY_VERSION} " |
148 |
+- "is deprecated and will be removed.") |
149 |
+- endif() |
150 |
+- endif() |
151 |
++ openvdb_check_python_version(Python::NumPy |
152 |
++ "${Python_NumPy_VERSION}" |
153 |
++ "${Python_NumPy_INCLUDE_DIRS}" |
154 |
++ "${MINIMUM_NUMPY_VERSION}" |
155 |
++ "${FUTURE_MINIMUM_NUMPY_VERSION}") |
156 |
++ list(APPEND OPENVDB_PYTHON_DEPS Python::NumPy) |
157 |
+ endif() |
158 |
+ |
159 |
+ if(TARGET openvdb_shared AND NOT Boost_USE_STATIC_LIBS) |
160 |
+@@ -230,17 +236,6 @@ elseif(WIN32) |
161 |
+ set_target_properties(pyopenvdb PROPERTIES SUFFIX ".pyd") # .pyd on windows |
162 |
+ endif() |
163 |
+ |
164 |
+-if(TARGET Python::Module) |
165 |
+- list(APPEND OPENVDB_PYTHON_DEPS Python::Module) |
166 |
+-else() |
167 |
+- if(APPLE) |
168 |
+- target_include_directories(pyopenvdb SYSTEM PUBLIC ${Python_INCLUDE_DIRS}) |
169 |
+- target_link_options(pyopenvdb PUBLIC -undefined dynamic_lookup) |
170 |
+- else() |
171 |
+- list(APPEND OPENVDB_PYTHON_DEPS Python::Python) |
172 |
+- endif() |
173 |
+-endif() |
174 |
+- |
175 |
+ target_link_libraries(pyopenvdb PUBLIC |
176 |
+ ${OPENVDB_LIB} |
177 |
+ ${OPENVDB_PYTHON_DEPS} |
178 |
+ |
179 |
|
180 |
diff --git a/media-gfx/openvdb/openvdb-7.1.0-r3.ebuild b/media-gfx/openvdb/openvdb-7.1.0-r4.ebuild |
181 |
similarity index 100% |
182 |
rename from media-gfx/openvdb/openvdb-7.1.0-r3.ebuild |
183 |
rename to media-gfx/openvdb/openvdb-7.1.0-r4.ebuild |
184 |
|
185 |
diff --git a/media-gfx/openvdb/openvdb-8.0.1-r2.ebuild b/media-gfx/openvdb/openvdb-8.0.1-r3.ebuild |
186 |
similarity index 100% |
187 |
rename from media-gfx/openvdb/openvdb-8.0.1-r2.ebuild |
188 |
rename to media-gfx/openvdb/openvdb-8.0.1-r3.ebuild |
189 |
|
190 |
diff --git a/media-gfx/openvdb/openvdb-8.1.0.ebuild b/media-gfx/openvdb/openvdb-8.1.0.ebuild |
191 |
index 72ac356edca..fef7bc659a9 100644 |
192 |
--- a/media-gfx/openvdb/openvdb-8.1.0.ebuild |
193 |
+++ b/media-gfx/openvdb/openvdb-8.1.0.ebuild |
194 |
@@ -67,6 +67,7 @@ BDEPEND=" |
195 |
|
196 |
PATCHES=( |
197 |
"${FILESDIR}/${PN}-7.1.0-0001-Fix-multilib-header-source.patch" |
198 |
+ "${FILESDIR}/${PN}-8.0.1-add-consistency-for-NumPy-find_package-call.patch" |
199 |
"${FILESDIR}/${PN}-8.1.0-glfw-libdir.patch" |
200 |
) |
201 |
|
202 |
@@ -94,9 +95,9 @@ src_configure() { |
203 |
-DOPENVDB_ABI_VERSION_NUMBER="${version}" |
204 |
-DOPENVDB_BUILD_DOCS=$(usex doc) |
205 |
-DOPENVDB_BUILD_UNITTESTS=$(usex test) |
206 |
- -DOPENVDB_BUILD_VDB_LOD=$(usex !utils) |
207 |
- -DOPENVDB_BUILD_VDB_RENDER=$(usex !utils) |
208 |
- -DOPENVDB_BUILD_VDB_VIEW=$(usex !utils) |
209 |
+ -DOPENVDB_BUILD_VDB_LOD=$(usex utils) |
210 |
+ -DOPENVDB_BUILD_VDB_RENDER=$(usex utils) |
211 |
+ -DOPENVDB_BUILD_VDB_VIEW=$(usex utils) |
212 |
-DOPENVDB_CORE_SHARED=ON |
213 |
-DOPENVDB_CORE_STATIC=$(usex static-libs) |
214 |
-DOPENVDB_ENABLE_RPATH=OFF |
215 |
@@ -113,8 +114,10 @@ src_configure() { |
216 |
mycmakeargs+=( |
217 |
-DOPENVDB_BUILD_PYTHON_MODULE=ON |
218 |
-DUSE_NUMPY=$(usex numpy) |
219 |
+ -DOPENVDB_BUILD_PYTHON_UNITTESTS=$(usex test) |
220 |
-DPYOPENVDB_INSTALL_DIRECTORY="$(python_get_sitedir)" |
221 |
-DPython_EXECUTABLE="${PYTHON}" |
222 |
+ -DPython_INCLUDE_DIR="$(python_get_includedir)" |
223 |
) |
224 |
fi |
225 |
|
226 |
|
227 |
diff --git a/media-gfx/openvdb/openvdb-9.0.0.ebuild b/media-gfx/openvdb/openvdb-9.0.0.ebuild |
228 |
index 8f85563995d..278d5807af5 100644 |
229 |
--- a/media-gfx/openvdb/openvdb-9.0.0.ebuild |
230 |
+++ b/media-gfx/openvdb/openvdb-9.0.0.ebuild |
231 |
@@ -12,7 +12,7 @@ HOMEPAGE="https://www.openvdb.org" |
232 |
SRC_URI="https://github.com/AcademySoftwareFoundation/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
233 |
|
234 |
LICENSE="MPL-2.0" |
235 |
-SLOT="0" |
236 |
+SLOT="0/9" |
237 |
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
238 |
IUSE="cpu_flags_x86_avx cpu_flags_x86_sse4_2 blosc doc numpy python static-libs test utils zlib abi6-compat abi7-compat +abi8-compat" |
239 |
RESTRICT="!test? ( test )" |
240 |
@@ -65,6 +65,7 @@ BDEPEND=" |
241 |
PATCHES=( |
242 |
"${FILESDIR}/${PN}-7.1.0-0001-Fix-multilib-header-source.patch" |
243 |
"${FILESDIR}/${PN}-8.1.0-glfw-libdir.patch" |
244 |
+ "${FILESDIR}/${PN}-9.0.0-numpy.patch" |
245 |
) |
246 |
|
247 |
pkg_setup() { |
248 |
@@ -91,9 +92,9 @@ src_configure() { |
249 |
-DOPENVDB_ABI_VERSION_NUMBER="${version}" |
250 |
-DOPENVDB_BUILD_DOCS=$(usex doc) |
251 |
-DOPENVDB_BUILD_UNITTESTS=$(usex test) |
252 |
- -DOPENVDB_BUILD_VDB_LOD=$(usex !utils) |
253 |
- -DOPENVDB_BUILD_VDB_RENDER=$(usex !utils) |
254 |
- -DOPENVDB_BUILD_VDB_VIEW=$(usex !utils) |
255 |
+ -DOPENVDB_BUILD_VDB_LOD=$(usex utils) |
256 |
+ -DOPENVDB_BUILD_VDB_RENDER=$(usex utils) |
257 |
+ -DOPENVDB_BUILD_VDB_VIEW=$(usex utils) |
258 |
-DOPENVDB_CORE_SHARED=ON |
259 |
-DOPENVDB_CORE_STATIC=$(usex static-libs) |
260 |
-DOPENVDB_ENABLE_RPATH=OFF |
261 |
@@ -109,8 +110,10 @@ src_configure() { |
262 |
mycmakeargs+=( |
263 |
-DOPENVDB_BUILD_PYTHON_MODULE=ON |
264 |
-DUSE_NUMPY=$(usex numpy) |
265 |
+ -DOPENVDB_BUILD_PYTHON_UNITTESTS=$(usex test) |
266 |
-DPYOPENVDB_INSTALL_DIRECTORY="$(python_get_sitedir)" |
267 |
-DPython_EXECUTABLE="${PYTHON}" |
268 |
+ -DPython_INCLUDE_DIR="$(python_get_includedir)" |
269 |
) |
270 |
fi |