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
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')
-rw-r--r--media-gfx/openvdb/Manifest1
-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
-rw-r--r--media-gfx/openvdb/openvdb-7.0.0.ebuild116
4 files changed, 165 insertions, 5 deletions
diff --git a/media-gfx/openvdb/Manifest b/media-gfx/openvdb/Manifest
index fa6091801818..9a616a88aea5 100644
--- a/media-gfx/openvdb/Manifest
+++ b/media-gfx/openvdb/Manifest
@@ -2,4 +2,5 @@ DIST openvdb-4.0.2-patchset-02.tar.xz 12428 BLAKE2B 2684ddf010df975912fcfc8c4f94
DIST openvdb-4.0.2.tar.gz 1689119 BLAKE2B dbc8d4ab44990440e201327d76bbf9bfe3e8f597505b1d008dedb95dc540277513f465d455079c59820acc5056c9a2edf56235e1097b6c73a1f7dd8c59609c15 SHA512 8e3e12583b81f9b9303b309e839c8321c67b67ff8a0e61bb56c87276bf25c0deff22f5a73c7c5b661b8e5df345bfdabfa6b0aea9bf16fce57d9c53a76751c75d
DIST openvdb-5.2.0.tar.gz 1788969 BLAKE2B d146b78dd7db4936779ca214b1f7957d4868bf76aedb95c9a98e21d25983b750337a63bf4bc9ccb438b683988af7a3d708676dcf7b4662c84e4926e8000ceb68 SHA512 69e21190c27a055e476a319b0c2d961303fa2f3fec30bec93ed44072d01816ef89e5e8f0abfc3a22d1c73742aa31284c664596747b49cd985fea1a751776506e
DIST openvdb-6.2.1.tar.gz 1935325 BLAKE2B 24ca340e513d2f22521994fbb2315a1c3f817bb35a7402ca481b12444e5ced58dfd773cc07b47a56d1ed9f6951e58cf1ef0b5c35917620b031383faed21c6557 SHA512 f5d830880316b5ca3921c77c75f3a254aba47d144ac6c0223fc2732d99cbd6b7ffb7f27049f8ab3760ad77b3658fc08a82728325ba753bc29932aa46336457de
+DIST openvdb-7.0.0.tar.gz 1872744 BLAKE2B e3a8c8d51f77e115d3d397abde0860a6322d56eb6c4795c1ba39539a23aab6cf37602ce7122965fbc3098b15b118b25010263f567e8003363b78c9b7d9d5dfd8 SHA512 f5321b22b10e192012d544cc02921d3d52f621778ec5aa21ba6d450f3e29f2fdbd76486ad390a0c008394dbc6ee4aeecc04527ef30e73adf71c1a08a021746b7
DIST openvdb-7.1.0.tar.gz 1956052 BLAKE2B 7778d67bcc65ecb17b86f6e67a9e5f2d6574de5869a0a9c675ad7bc8540154c0f249a91c68a9da9068a3951b3e919e5676450fcaf13921c6263e7c87012a2f29 SHA512 49806375f7e6d7b12eaba24e672a068531d2f8a05f12eba29069710d2682f9983f9e6ad26047eed4b28e337f8d0e738b90130582863c710e8dd1e720bf0addad
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;
diff --git a/media-gfx/openvdb/openvdb-7.0.0.ebuild b/media-gfx/openvdb/openvdb-7.0.0.ebuild
new file mode 100644
index 000000000000..12d084386ef8
--- /dev/null
+++ b/media-gfx/openvdb/openvdb-7.0.0.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit cmake flag-o-matic python-single-r1
+
+DESCRIPTION="Library for the efficient manipulation of volumetric data"
+HOMEPAGE="https://www.openvdb.org"
+SRC_URI="https://github.com/AcademySoftwareFoundation/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_avx cpu_flags_x86_sse4_2 doc numpy python static-libs test utils abi5-compat abi6-compat abi7-compat"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ numpy? ( python )
+ ^^ ( abi5-compat abi6-compat abi7-compat )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ dev-libs/boost:=
+ dev-libs/c-blosc
+ dev-libs/jemalloc
+ dev-libs/log4cplus
+ media-libs/glfw:=
+ media-libs/openexr:=
+ sys-libs/zlib:=
+ x11-libs/libXcursor
+ x11-libs/libXi
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-libs/boost:=[numpy?,python?,${PYTHON_MULTI_USEDEP}]
+ numpy? ( dev-python/numpy[${PYTHON_MULTI_USEDEP}] )
+ ')
+ )
+"
+
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/tbb
+ >=dev-util/cmake-3.16.2-r1
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ dev-texlive/texlive-bibtexextra
+ dev-texlive/texlive-fontsextra
+ dev-texlive/texlive-fontutils
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )
+ test? ( dev-util/cppunit )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-7.1.0-0001-Fix-multilib-header-source.patch"
+ "${FILESDIR}/${PN}-7.1.0-0002-Fix-doc-install-dir.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local myprefix="${EPREFIX}/usr/"
+
+ local version
+ if use abi5-compat; then
+ version=5
+ elif use abi6-compat; then
+ version=6
+ elif use abi7-compat; then
+ version=7
+ else
+ die "Openvdb abi version is not compatible"
+ fi
+
+ local mycmakeargs=(
+ -DCHOST="${CHOST}"
+ -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}/"
+ -DOPENVDB_ABI_VERSION_NUMBER="${version}"
+ -DOPENVDB_BUILD_DOCS=$(usex doc)
+ -DOPENVDB_BUILD_PYTHON_MODULE=$(usex python)
+ -DOPENVDB_BUILD_UNITTESTS=$(usex test)
+ -DOPENVDB_BUILD_VDB_LOD=$(usex !utils)
+ -DOPENVDB_BUILD_VDB_RENDER=$(usex !utils)
+ -DOPENVDB_BUILD_VDB_VIEW=$(usex !utils)
+ -DOPENVDB_CORE_SHARED=ON
+ -DOPENVDB_CORE_STATIC=$(usex static-libs)
+ -DOPENVDB_ENABLE_RPATH=OFF
+ -DUSE_CCACHE=OFF
+ -DUSE_COLORED_OUTPUT=ON
+ -DUSE_EXR=ON
+ -DUSE_LOG4CPLUS=ON
+ -DUSE_NUMPY=$(usex numpy)
+ -DPYOPENVDB_INSTALL_DIRECTORY="${python_get_sitedir}"
+ -DPython_EXECUTABLE="${PYTHON}"
+ )
+
+ if use cpu_flags_x86_avx; then
+ mycmakeargs+=( -DOPENVDB_SIMD=AVX )
+ elif use cpu_flags_x86_sse4_2; then
+ mycmakeargs+=( -DOPENVDB_SIMD=SSE42 )
+ fi
+
+ cmake_src_configure
+}