diff options
Diffstat (limited to 'media-gfx/openvdb/files')
7 files changed, 267 insertions, 0 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 new file mode 100644 index 000000000000..cdbb9440a1a4 --- /dev/null +++ b/media-gfx/openvdb/files/openvdb-4.0.2-fix-build-docs.patch @@ -0,0 +1,32 @@ +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 +@@ -394,7 +394,7 @@ + FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config ${DOXYGEN_CONFIG_CONTENT} ) + FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config "OUTPUT_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}/doc\n" ) + +- ADD_CUSTOM_TARGET ( doc ++ ADD_CUSTOM_TARGET ( doc ALL + ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + COMMENT "Generating API documentation with Doxygen" VERBATIM 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 new file mode 100644 index 000000000000..cb2660329948 --- /dev/null +++ b/media-gfx/openvdb/files/openvdb-4.0.2-fix-const-correctness-for-unittest.patch @@ -0,0 +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 2020-08-19 02:11:48.945711312 +1000 ++++ b/openvdb/unittest/TestFile.cc 2020-08-19 02:13:31.106074899 +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 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/files/openvdb-5.2.0-use-pkgconfig-for-ilmbase-and-openexr.patch b/media-gfx/openvdb/files/openvdb-5.2.0-use-pkgconfig-for-ilmbase-and-openexr.patch index c3999e54f9cf..dd0b83540aa3 100644 --- a/media-gfx/openvdb/files/openvdb-5.2.0-use-pkgconfig-for-ilmbase-and-openexr.patch +++ b/media-gfx/openvdb/files/openvdb-5.2.0-use-pkgconfig-for-ilmbase-and-openexr.patch @@ -1,3 +1,11 @@ +This patch is an updated version of the patch created in dracwyrm's +patchset for openvdb 4.0.2 which uses PkgConfig to ensure that the +correct IlmBase and OpenEXR dependencies are found. + +In subsequent versions this functionality is taken over by +altering the directory the header files are searched for in +multilib-header-source patch by Bernd Waibel + diff -urN a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt --- a/openvdb/CMakeLists.txt 2018-08-28 12:20:33.000000000 +0100 +++ b/openvdb/CMakeLists.txt 2018-08-28 12:25:19.807755722 +0100 diff --git a/media-gfx/openvdb/files/openvdb-6.2.1-fix-multilib-header-source.patch b/media-gfx/openvdb/files/openvdb-6.2.1-fix-multilib-header-source.patch new file mode 100644 index 000000000000..e8cfac755d3e --- /dev/null +++ b/media-gfx/openvdb/files/openvdb-6.2.1-fix-multilib-header-source.patch @@ -0,0 +1,38 @@ +This patch changes the default location that the header files look for +IlmBaseConfig.h as in Gentoo the version containg the ILMBASE_VERSION_MAJOR +and ILMBASE_VERSION_MINOR is stored under /usr/include/chost. + +Without this patch, compilation fails as it is unable to identify the +required IlmBase version. + +Based on the fix multilib header patch for 7.1.0 by Bernd Waibel + +diff -Naur a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake +--- a/cmake/FindIlmBase.cmake 2020-02-02 01:03:55.000000000 +0800 ++++ b/cmake/FindIlmBase.cmake 2020-02-02 01:09:05.000000000 +0800 +@@ -168,9 +168,15 @@ + PATH_SUFFIXES include/OpenEXR OpenEXR + ) + ++if(EXISTS "/usr/include/${CHOST}/OpenEXR/IlmBaseConfig.h") ++ set(_ILMBASE_HEADERS "/usr/include/${CHOST}/OpenEXR") ++else() ++ set(_ILMBASE_HEADERS ${IlmBase_INCLUDE_DIR}) ++endif() ++ + if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h") + # Get the ILMBASE version information from the config header +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" ++ file(STRINGS "${_ILMBASE_HEADERS}/IlmBaseConfig.h" + _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR " + ) + string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" +@@ -178,7 +184,7 @@ + ) + string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR) + +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" ++ file(STRINGS "${_ILMBASE_HEADERS}/IlmBaseConfig.h" + _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR " + ) + string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" diff --git a/media-gfx/openvdb/files/openvdb-6.2.1-use-gnuinstalldirs.patch b/media-gfx/openvdb/files/openvdb-6.2.1-use-gnuinstalldirs.patch new file mode 100644 index 000000000000..ac73d82f9c34 --- /dev/null +++ b/media-gfx/openvdb/files/openvdb-6.2.1-use-gnuinstalldirs.patch @@ -0,0 +1,54 @@ +diff -Naur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2020-01-08 22:16:00.493079361 +0800 ++++ b/CMakeLists.txt 2020-01-08 22:16:44.790285583 +0800 +@@ -252,6 +252,8 @@ + + enable_testing() + ++INCLUDE ( GNUInstallDirs ) ++ + # Add our cmake modules + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +diff -Naur a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt +--- a/openvdb/CMakeLists.txt 2020-01-08 22:16:07.362646127 +0800 ++++ b/openvdb/CMakeLists.txt 2020-01-08 22:19:54.638308684 +0800 +@@ -492,7 +492,7 @@ + install(TARGETS + openvdb_static + DESTINATION +- lib ++ ${CMAKE_INSTALL_LIBDIR} + ) + endif() + +@@ -500,14 +500,14 @@ + if(WIN32) + install(TARGETS + openvdb_shared +- RUNTIME DESTINATION bin COMPONENT Runtime +- ARCHIVE DESTINATION lib COMPONENT Runtime ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime + ) + else() + install(TARGETS + openvdb_shared + DESTINATION +- lib ++ ${CMAKE_INSTALL_LIBDIR} + ) + endif() + endif() +diff -Naur a/openvdb/python/CMakeLists.txt b/openvdb/python/CMakeLists.txt +--- a/openvdb/python/CMakeLists.txt 2020-01-08 22:16:14.452199013 +0800 ++++ b/openvdb/python/CMakeLists.txt 2020-01-08 22:21:45.311324663 +0800 +@@ -232,7 +232,7 @@ + ${PYOPENVDB_INSTALL_DIRECTORY} + ) + +-install(FILES ${PYTHON_PUBLIC_INCLUDE_NAMES} DESTINATION include/openvdb/python) ++install(FILES ${PYTHON_PUBLIC_INCLUDE_NAMES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openvdb/python) + + # pytest + diff --git a/media-gfx/openvdb/files/openvdb-7.1.0-0001-Fix-multilib-header-source.patch b/media-gfx/openvdb/files/openvdb-7.1.0-0001-Fix-multilib-header-source.patch new file mode 100644 index 000000000000..13d0f45fabf4 --- /dev/null +++ b/media-gfx/openvdb/files/openvdb-7.1.0-0001-Fix-multilib-header-source.patch @@ -0,0 +1,75 @@ +From 7558089b3dae599ffc80329da3a5c1decf882ca7 Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl@gmail.com> +Date: Fri, 28 Feb 2020 17:01:25 +0100 +Subject: [PATCH] Fix multilib header source + +Signed-off-by: Bernd Waibel <waebbl@gmail.com> +--- + cmake/FindIlmBase.cmake | 10 ++++++++-- + cmake/FindOpenEXR.cmake | 10 ++++++++-- + 2 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake +index f20f803..bb85019 100644 +--- a/cmake/FindIlmBase.cmake ++++ b/cmake/FindIlmBase.cmake +@@ -168,9 +168,15 @@ find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h + PATH_SUFFIXES include/OpenEXR OpenEXR + ) + ++if(EXISTS "/usr/include/${CHOST}/OpenEXR/IlmBaseConfig.h") ++ set(_ILMBASE_HEADERS "/usr/include/${CHOST}/OpenEXR") ++else() ++ set(_ILMBASE_HEADERS ${IlmBase_INCLUDE_DIR}) ++endif() ++ + if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h") + # Get the ILMBASE version information from the config header +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" ++ file(STRINGS "${_ILMBASE_HEADERS}/IlmBaseConfig.h" + _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR " + ) + string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" +@@ -178,7 +184,7 @@ if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h") + ) + string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR) + +- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h" ++ file(STRINGS "${_ILMBASE_HEADERS}/IlmBaseConfig.h" + _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR " + ) + string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" +diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake +index d0d356f..0c5dd7b 100644 +--- a/cmake/FindOpenEXR.cmake ++++ b/cmake/FindOpenEXR.cmake +@@ -161,9 +161,15 @@ find_path(OpenEXR_INCLUDE_DIR OpenEXRConfig.h + PATH_SUFFIXES include/OpenEXR OpenEXR + ) + ++if(EXISTS "/usr/include/${CHOST}/OpenEXR/OpenEXRConfig.h") ++ set(_OPENEXR_HEADERS "/usr/include/${CHOST}/OpenEXR") ++else() ++ set(_OPENEXR_HEADERS "${OpenEXR_INCLUDE_DIR}") ++endif() ++ + if(EXISTS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h") + # Get the EXR version information from the config header +- file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h" ++ file(STRINGS "${_OPENEXR_HEADERS}/OpenEXRConfig.h" + _openexr_version_major_string REGEX "#define OPENEXR_VERSION_MAJOR " + ) + string(REGEX REPLACE "#define OPENEXR_VERSION_MAJOR" "" +@@ -171,7 +177,7 @@ if(EXISTS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h") + ) + string(STRIP "${_openexr_version_major_string}" OpenEXR_VERSION_MAJOR) + +- file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h" ++ file(STRINGS "${_OPENEXR_HEADERS}/OpenEXRConfig.h" + _openexr_version_minor_string REGEX "#define OPENEXR_VERSION_MINOR " + ) + string(REGEX REPLACE "#define OPENEXR_VERSION_MINOR" "" +-- +2.25.1 + + diff --git a/media-gfx/openvdb/files/openvdb-7.1.0-0002-Fix-doc-install-dir.patch b/media-gfx/openvdb/files/openvdb-7.1.0-0002-Fix-doc-install-dir.patch new file mode 100644 index 000000000000..73d4b1ccd422 --- /dev/null +++ b/media-gfx/openvdb/files/openvdb-7.1.0-0002-Fix-doc-install-dir.patch @@ -0,0 +1,25 @@ +From 66dec67036116243893fdf74060e55b70f65ab17 Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl@gmail.com> +Date: Fri, 28 Feb 2020 21:51:30 +0100 +Subject: [PATCH] Fix doc install dir + +Signed-off-by: Bernd Waibel <waebbl@gmail.com> +--- + doc/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index 1cf58ea..a6bd849 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -64,5 +64,5 @@ add_custom_target(doc ALL + ) + + # Suppress "Installing..." messages for all but one of the hundreds of generated files. +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openvdb/doc/html/index.html DESTINATION doc/html) +-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/openvdb/doc/html DESTINATION doc MESSAGE_NEVER) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openvdb/doc/html/index.html DESTINATION ${CMAKE_INSTALL_DOCDIR}/html) ++install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/openvdb/doc/html DESTINATION ${CMAKE_INSTALL_DOCDIR} MESSAGE_NEVER) +-- +2.25.1 + |