summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Grigo <agrigo2001@yahoo.com.au>2020-08-18 18:14:26 +1000
committerSam James <sam@gentoo.org>2020-08-24 14:41:52 +0100
commite819fe84528199b19b564f48573b9b7b6b972b68 (patch)
treefa45d21340ad0063a08e0c125e60dce8d04ba0b0 /media-gfx/openvdb/files
parentmedia-gfx/openvdb: Version bump to openvdb-7.1.0 (diff)
downloadgentoo-e819fe84528199b19b564f48573b9b7b6b972b68.tar.gz
gentoo-e819fe84528199b19b564f48573b9b7b6b972b68.tar.bz2
gentoo-e819fe84528199b19b564f48573b9b7b6b972b68.zip
media-gfx/openvdb: Add version 7.0.0
Blender builds against version 7.0.0, but does not build against version 7.1.0 when linking against the openvdb headers, complaining that make_unique is not in std, even though the file includes memory. Given that 7.0.0 is the last version of openvdb that still includes ABI 5 compatiblity, it might be worthwhile to keep it around. Signed-off-by: Adrian Grigo <agrigo2001@yahoo.com.au> Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx/openvdb/files')
-rw-r--r--media-gfx/openvdb/files/openvdb-4.0.2-fix-build-docs.patch20
-rw-r--r--media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch33
2 files changed, 48 insertions, 5 deletions
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
index 25597ec381d7..cdbb9440a1a4 100644
--- 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
@@ -1,3 +1,23 @@
+When building with doc USE flag enabled, the doc target is not built by
+default and the missing docs cause an install failure.
+
+This patch ensures that when the doc target is defined, it will be
+built. Otherwise it might be possible to fix it using a separate step
+in src_compile to build the documentation specifically, prior to running
+install.
+
+This has been tested and is required on 4.0.2 and 5.2.0, but is not
+needed in >=openvdb-6
+
+To reproduce the bug, enable the doc USE flag and emerge openvdb 4 or 5
+without this patch. The install fails as the doc file is missing.
+
+To show it is fixed. enable the doc USE flag and this patch and emerge
+again. The install succeeds and the documentation can be found at
+/usr/share/doc/openvdb-X
+
+Patch by Adrian Grigo
+
diff -Naur a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
--- a/openvdb/CMakeLists.txt 2020-08-18 12:17:15.261321103 +1000
+++ b/openvdb/CMakeLists.txt 2020-08-18 12:17:37.101397373 +1000
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
index 8d3ef59e3ab1..ceda282a2bbd 100644
--- 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
@@ -1,12 +1,35 @@
+Blosc changed the signature of blosc_compcode_to_compname in 1.15 so
+that the second parameter is now const char** not char **. This causes
+compile failures when using openvdb with earlier versions of blosc.
+
+The fix, which is backported from openvdb-7, is to check the blosc
+version and cast the char** to const char** for modern versions of
+blosc.
+
+The bug can be produced by emerging blosc 1.15+, and then openvdb.
+Without this patch, the compiler will fail with
+error: invalid conversion from ‘char**’ to ‘const char**’
+
+To test that the patch has been properly implemented, emerge modern
+blosc and then openvdb with this patch, and the compile will succeed.
+
+Fixes bug https://bugs.gentoo.org/734102
+Upstream commit https://github.com/AcademySoftwareFoundation/openvdb/commit/d2e8bd87a63d1e9f66a558ecbb6e6cbd54f7de13
+
diff -Naur a/openvdb/unittest/TestFile.cc b/openvdb/unittest/TestFile.cc
---- a/openvdb/unittest/TestFile.cc 2019-09-15 01:05:30.716633230 +0800
-+++ b/openvdb/unittest/TestFile.cc 2019-09-15 01:06:16.126633668 +0800
-@@ -2552,7 +2552,7 @@
+--- a/openvdb/unittest/TestFile.cc 2020-08-19 01:32:17.137844464 +1000
++++ b/openvdb/unittest/TestFile.cc 2020-08-19 01:36:03.698539134 +1000
+@@ -2666,7 +2666,12 @@
for (int compcode = 0; compcode <= BLOSC_ZLIB; ++compcode) {
char* compname = nullptr;
-- if (0 > blosc_compcode_to_compname(compcode, &compname)) continue;
-+ if (0 > blosc_compcode_to_compname(compcode, const_cast<const char **>(&compname))) continue;
+- if (0 > blosc_compcode_to_compname(compcode, const_cast<const char **>(&compname))) continue;
++#if BLOSC_VERSION_MAJOR > 1 || (BLOSC_VERSION_MAJOR == 1 && BLOSC_VERSION_MINOR >= 15)
++ if (0 > blosc_compcode_to_compname(compcode, const_cast<const char**>(&compname)))
++#else
++ if (0 > blosc_compcode_to_compname(compcode, &compname))
++#endif
++ continue;
/// @todo This changes the compressor setting globally.
if (blosc_set_compressor(compname) < 0) continue;