1 |
commit: e819fe84528199b19b564f48573b9b7b6b972b68 |
2 |
Author: Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au> |
3 |
AuthorDate: Tue Aug 18 08:14:26 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 24 13:41:52 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e819fe84 |
7 |
|
8 |
media-gfx/openvdb: Add version 7.0.0 |
9 |
|
10 |
Blender builds against version 7.0.0, but does not build against |
11 |
version 7.1.0 when linking against the openvdb headers, |
12 |
complaining that make_unique is not in std, even though the file |
13 |
includes memory. |
14 |
|
15 |
Given that 7.0.0 is the last version of openvdb that still includes |
16 |
ABI 5 compatiblity, it might be worthwhile to keep it around. |
17 |
|
18 |
Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au> |
19 |
Package-Manager: Portage-2.3.103, Repoman-2.3.23 |
20 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
21 |
|
22 |
media-gfx/openvdb/Manifest | 1 + |
23 |
.../files/openvdb-4.0.2-fix-build-docs.patch | 20 ++++ |
24 |
...-4.0.2-fix-const-correctness-for-unittest.patch | 33 +++++- |
25 |
media-gfx/openvdb/openvdb-7.0.0.ebuild | 116 +++++++++++++++++++++ |
26 |
4 files changed, 165 insertions(+), 5 deletions(-) |
27 |
|
28 |
diff --git a/media-gfx/openvdb/Manifest b/media-gfx/openvdb/Manifest |
29 |
index fa609180181..9a616a88aea 100644 |
30 |
--- a/media-gfx/openvdb/Manifest |
31 |
+++ b/media-gfx/openvdb/Manifest |
32 |
@@ -2,4 +2,5 @@ DIST openvdb-4.0.2-patchset-02.tar.xz 12428 BLAKE2B 2684ddf010df975912fcfc8c4f94 |
33 |
DIST openvdb-4.0.2.tar.gz 1689119 BLAKE2B dbc8d4ab44990440e201327d76bbf9bfe3e8f597505b1d008dedb95dc540277513f465d455079c59820acc5056c9a2edf56235e1097b6c73a1f7dd8c59609c15 SHA512 8e3e12583b81f9b9303b309e839c8321c67b67ff8a0e61bb56c87276bf25c0deff22f5a73c7c5b661b8e5df345bfdabfa6b0aea9bf16fce57d9c53a76751c75d |
34 |
DIST openvdb-5.2.0.tar.gz 1788969 BLAKE2B d146b78dd7db4936779ca214b1f7957d4868bf76aedb95c9a98e21d25983b750337a63bf4bc9ccb438b683988af7a3d708676dcf7b4662c84e4926e8000ceb68 SHA512 69e21190c27a055e476a319b0c2d961303fa2f3fec30bec93ed44072d01816ef89e5e8f0abfc3a22d1c73742aa31284c664596747b49cd985fea1a751776506e |
35 |
DIST openvdb-6.2.1.tar.gz 1935325 BLAKE2B 24ca340e513d2f22521994fbb2315a1c3f817bb35a7402ca481b12444e5ced58dfd773cc07b47a56d1ed9f6951e58cf1ef0b5c35917620b031383faed21c6557 SHA512 f5d830880316b5ca3921c77c75f3a254aba47d144ac6c0223fc2732d99cbd6b7ffb7f27049f8ab3760ad77b3658fc08a82728325ba753bc29932aa46336457de |
36 |
+DIST openvdb-7.0.0.tar.gz 1872744 BLAKE2B e3a8c8d51f77e115d3d397abde0860a6322d56eb6c4795c1ba39539a23aab6cf37602ce7122965fbc3098b15b118b25010263f567e8003363b78c9b7d9d5dfd8 SHA512 f5321b22b10e192012d544cc02921d3d52f621778ec5aa21ba6d450f3e29f2fdbd76486ad390a0c008394dbc6ee4aeecc04527ef30e73adf71c1a08a021746b7 |
37 |
DIST openvdb-7.1.0.tar.gz 1956052 BLAKE2B 7778d67bcc65ecb17b86f6e67a9e5f2d6574de5869a0a9c675ad7bc8540154c0f249a91c68a9da9068a3951b3e919e5676450fcaf13921c6263e7c87012a2f29 SHA512 49806375f7e6d7b12eaba24e672a068531d2f8a05f12eba29069710d2682f9983f9e6ad26047eed4b28e337f8d0e738b90130582863c710e8dd1e720bf0addad |
38 |
|
39 |
diff --git a/media-gfx/openvdb/files/openvdb-4.0.2-fix-build-docs.patch b/media-gfx/openvdb/files/openvdb-4.0.2-fix-build-docs.patch |
40 |
index 25597ec381d..cdbb9440a1a 100644 |
41 |
--- a/media-gfx/openvdb/files/openvdb-4.0.2-fix-build-docs.patch |
42 |
+++ b/media-gfx/openvdb/files/openvdb-4.0.2-fix-build-docs.patch |
43 |
@@ -1,3 +1,23 @@ |
44 |
+When building with doc USE flag enabled, the doc target is not built by |
45 |
+default and the missing docs cause an install failure. |
46 |
+ |
47 |
+This patch ensures that when the doc target is defined, it will be |
48 |
+built. Otherwise it might be possible to fix it using a separate step |
49 |
+in src_compile to build the documentation specifically, prior to running |
50 |
+install. |
51 |
+ |
52 |
+This has been tested and is required on 4.0.2 and 5.2.0, but is not |
53 |
+needed in >=openvdb-6 |
54 |
+ |
55 |
+To reproduce the bug, enable the doc USE flag and emerge openvdb 4 or 5 |
56 |
+without this patch. The install fails as the doc file is missing. |
57 |
+ |
58 |
+To show it is fixed. enable the doc USE flag and this patch and emerge |
59 |
+again. The install succeeds and the documentation can be found at |
60 |
+/usr/share/doc/openvdb-X |
61 |
+ |
62 |
+Patch by Adrian Grigo |
63 |
+ |
64 |
diff -Naur a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt |
65 |
--- a/openvdb/CMakeLists.txt 2020-08-18 12:17:15.261321103 +1000 |
66 |
+++ b/openvdb/CMakeLists.txt 2020-08-18 12:17:37.101397373 +1000 |
67 |
|
68 |
diff --git a/media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch b/media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch |
69 |
index 8d3ef59e3ab..ceda282a2bb 100644 |
70 |
--- a/media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch |
71 |
+++ b/media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch |
72 |
@@ -1,12 +1,35 @@ |
73 |
+Blosc changed the signature of blosc_compcode_to_compname in 1.15 so |
74 |
+that the second parameter is now const char** not char **. This causes |
75 |
+compile failures when using openvdb with earlier versions of blosc. |
76 |
+ |
77 |
+The fix, which is backported from openvdb-7, is to check the blosc |
78 |
+version and cast the char** to const char** for modern versions of |
79 |
+blosc. |
80 |
+ |
81 |
+The bug can be produced by emerging blosc 1.15+, and then openvdb. |
82 |
+Without this patch, the compiler will fail with |
83 |
+error: invalid conversion from ‘char**’ to ‘const char**’ |
84 |
+ |
85 |
+To test that the patch has been properly implemented, emerge modern |
86 |
+blosc and then openvdb with this patch, and the compile will succeed. |
87 |
+ |
88 |
+Fixes bug https://bugs.gentoo.org/734102 |
89 |
+Upstream commit https://github.com/AcademySoftwareFoundation/openvdb/commit/d2e8bd87a63d1e9f66a558ecbb6e6cbd54f7de13 |
90 |
+ |
91 |
diff -Naur a/openvdb/unittest/TestFile.cc b/openvdb/unittest/TestFile.cc |
92 |
---- a/openvdb/unittest/TestFile.cc 2019-09-15 01:05:30.716633230 +0800 |
93 |
-+++ b/openvdb/unittest/TestFile.cc 2019-09-15 01:06:16.126633668 +0800 |
94 |
-@@ -2552,7 +2552,7 @@ |
95 |
+--- a/openvdb/unittest/TestFile.cc 2020-08-19 01:32:17.137844464 +1000 |
96 |
++++ b/openvdb/unittest/TestFile.cc 2020-08-19 01:36:03.698539134 +1000 |
97 |
+@@ -2666,7 +2666,12 @@ |
98 |
|
99 |
for (int compcode = 0; compcode <= BLOSC_ZLIB; ++compcode) { |
100 |
char* compname = nullptr; |
101 |
-- if (0 > blosc_compcode_to_compname(compcode, &compname)) continue; |
102 |
-+ if (0 > blosc_compcode_to_compname(compcode, const_cast<const char **>(&compname))) continue; |
103 |
+- if (0 > blosc_compcode_to_compname(compcode, const_cast<const char **>(&compname))) continue; |
104 |
++#if BLOSC_VERSION_MAJOR > 1 || (BLOSC_VERSION_MAJOR == 1 && BLOSC_VERSION_MINOR >= 15) |
105 |
++ if (0 > blosc_compcode_to_compname(compcode, const_cast<const char**>(&compname))) |
106 |
++#else |
107 |
++ if (0 > blosc_compcode_to_compname(compcode, &compname)) |
108 |
++#endif |
109 |
++ continue; |
110 |
/// @todo This changes the compressor setting globally. |
111 |
if (blosc_set_compressor(compname) < 0) continue; |
112 |
|
113 |
|
114 |
diff --git a/media-gfx/openvdb/openvdb-7.0.0.ebuild b/media-gfx/openvdb/openvdb-7.0.0.ebuild |
115 |
new file mode 100644 |
116 |
index 00000000000..12d084386ef |
117 |
--- /dev/null |
118 |
+++ b/media-gfx/openvdb/openvdb-7.0.0.ebuild |
119 |
@@ -0,0 +1,116 @@ |
120 |
+# Copyright 1999-2020 Gentoo Authors |
121 |
+# Distributed under the terms of the GNU General Public License v2 |
122 |
+ |
123 |
+EAPI=7 |
124 |
+ |
125 |
+CMAKE_MAKEFILE_GENERATOR="emake" |
126 |
+PYTHON_COMPAT=( python3_{7,8} ) |
127 |
+ |
128 |
+inherit cmake flag-o-matic python-single-r1 |
129 |
+ |
130 |
+DESCRIPTION="Library for the efficient manipulation of volumetric data" |
131 |
+HOMEPAGE="https://www.openvdb.org" |
132 |
+SRC_URI="https://github.com/AcademySoftwareFoundation/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
133 |
+ |
134 |
+LICENSE="MPL-2.0" |
135 |
+SLOT="0" |
136 |
+KEYWORDS="~amd64 ~x86" |
137 |
+IUSE="cpu_flags_x86_avx cpu_flags_x86_sse4_2 doc numpy python static-libs test utils abi5-compat abi6-compat abi7-compat" |
138 |
+RESTRICT="!test? ( test )" |
139 |
+ |
140 |
+REQUIRED_USE=" |
141 |
+ numpy? ( python ) |
142 |
+ ^^ ( abi5-compat abi6-compat abi7-compat ) |
143 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
144 |
+" |
145 |
+ |
146 |
+RDEPEND=" |
147 |
+ dev-libs/boost:= |
148 |
+ dev-libs/c-blosc |
149 |
+ dev-libs/jemalloc |
150 |
+ dev-libs/log4cplus |
151 |
+ media-libs/glfw:= |
152 |
+ media-libs/openexr:= |
153 |
+ sys-libs/zlib:= |
154 |
+ x11-libs/libXcursor |
155 |
+ x11-libs/libXi |
156 |
+ x11-libs/libXinerama |
157 |
+ x11-libs/libXrandr |
158 |
+ python? ( |
159 |
+ ${PYTHON_DEPS} |
160 |
+ $(python_gen_cond_dep ' |
161 |
+ dev-libs/boost:=[numpy?,python?,${PYTHON_MULTI_USEDEP}] |
162 |
+ numpy? ( dev-python/numpy[${PYTHON_MULTI_USEDEP}] ) |
163 |
+ ') |
164 |
+ ) |
165 |
+" |
166 |
+ |
167 |
+DEPEND=" |
168 |
+ ${RDEPEND} |
169 |
+ dev-cpp/tbb |
170 |
+ >=dev-util/cmake-3.16.2-r1 |
171 |
+ virtual/pkgconfig |
172 |
+ doc? ( |
173 |
+ app-doc/doxygen |
174 |
+ dev-texlive/texlive-bibtexextra |
175 |
+ dev-texlive/texlive-fontsextra |
176 |
+ dev-texlive/texlive-fontutils |
177 |
+ dev-texlive/texlive-latex |
178 |
+ dev-texlive/texlive-latexextra |
179 |
+ ) |
180 |
+ test? ( dev-util/cppunit ) |
181 |
+" |
182 |
+ |
183 |
+PATCHES=( |
184 |
+ "${FILESDIR}/${PN}-7.1.0-0001-Fix-multilib-header-source.patch" |
185 |
+ "${FILESDIR}/${PN}-7.1.0-0002-Fix-doc-install-dir.patch" |
186 |
+) |
187 |
+ |
188 |
+pkg_setup() { |
189 |
+ use python && python-single-r1_pkg_setup |
190 |
+} |
191 |
+ |
192 |
+src_configure() { |
193 |
+ local myprefix="${EPREFIX}/usr/" |
194 |
+ |
195 |
+ local version |
196 |
+ if use abi5-compat; then |
197 |
+ version=5 |
198 |
+ elif use abi6-compat; then |
199 |
+ version=6 |
200 |
+ elif use abi7-compat; then |
201 |
+ version=7 |
202 |
+ else |
203 |
+ die "Openvdb abi version is not compatible" |
204 |
+ fi |
205 |
+ |
206 |
+ local mycmakeargs=( |
207 |
+ -DCHOST="${CHOST}" |
208 |
+ -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}/" |
209 |
+ -DOPENVDB_ABI_VERSION_NUMBER="${version}" |
210 |
+ -DOPENVDB_BUILD_DOCS=$(usex doc) |
211 |
+ -DOPENVDB_BUILD_PYTHON_MODULE=$(usex python) |
212 |
+ -DOPENVDB_BUILD_UNITTESTS=$(usex test) |
213 |
+ -DOPENVDB_BUILD_VDB_LOD=$(usex !utils) |
214 |
+ -DOPENVDB_BUILD_VDB_RENDER=$(usex !utils) |
215 |
+ -DOPENVDB_BUILD_VDB_VIEW=$(usex !utils) |
216 |
+ -DOPENVDB_CORE_SHARED=ON |
217 |
+ -DOPENVDB_CORE_STATIC=$(usex static-libs) |
218 |
+ -DOPENVDB_ENABLE_RPATH=OFF |
219 |
+ -DUSE_CCACHE=OFF |
220 |
+ -DUSE_COLORED_OUTPUT=ON |
221 |
+ -DUSE_EXR=ON |
222 |
+ -DUSE_LOG4CPLUS=ON |
223 |
+ -DUSE_NUMPY=$(usex numpy) |
224 |
+ -DPYOPENVDB_INSTALL_DIRECTORY="${python_get_sitedir}" |
225 |
+ -DPython_EXECUTABLE="${PYTHON}" |
226 |
+ ) |
227 |
+ |
228 |
+ if use cpu_flags_x86_avx; then |
229 |
+ mycmakeargs+=( -DOPENVDB_SIMD=AVX ) |
230 |
+ elif use cpu_flags_x86_sse4_2; then |
231 |
+ mycmakeargs+=( -DOPENVDB_SIMD=SSE42 ) |
232 |
+ fi |
233 |
+ |
234 |
+ cmake_src_configure |
235 |
+} |