aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/vtk/files')
-rw-r--r--sci-libs/vtk/files/vtk-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch18
-rw-r--r--sci-libs/vtk/files/vtk-9.0.1-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch32
-rw-r--r--sci-libs/vtk/files/vtk-9.0.3-IO-FFMPEG-support-FFmpeg-5.0-API-changes.patch141
-rw-r--r--sci-libs/vtk/files/vtk-9.1.0-Change-or-scope-struct-names-to-avoid-conflicts.patch127
-rw-r--r--sci-libs/vtk/files/vtk-9.1.0-adjust-to-find-binaries.patch25
-rw-r--r--sci-libs/vtk/files/vtk-9.1.0-avoid-naming-collision-with-netcdf-4.9.0.patch26
6 files changed, 369 insertions, 0 deletions
diff --git a/sci-libs/vtk/files/vtk-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch b/sci-libs/vtk/files/vtk-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
new file mode 100644
index 000000000..b46748735
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
@@ -0,0 +1,18 @@
+--- VTK-8.2.0/ThirdParty/freetype/vtk_freetype.h.in.orig 2019-01-30 18:15:13.000000000 +0100
++++ VTK-8.2.0/ThirdParty/freetype/vtk_freetype.h.in 2020-10-17 00:03:32.730820908 +0200
+@@ -20,6 +20,15 @@
+
+ #ifdef VTK_USE_SYSTEM_FREETYPE
+ # include <ft2build.h>
++/* FT_CALLBACK_DEF no longer exported since freetype-2.10.3 */
++/* has been moved to <freetype/internal/compiler-macros.h> */
++# ifndef FT_CALLBACK_DEF
++# ifdef __cplusplus
++# define FT_CALLBACK_DEF( x ) extern "C" x
++# else
++# define FT_CALLBACK_DEF( x ) static x
++# endif
++# endif /* FT_CALLBACK_DEF */
+ #else
+ # include <vtkfreetype/include/ft2build.h>
+ #endif
diff --git a/sci-libs/vtk/files/vtk-9.0.1-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch b/sci-libs/vtk/files/vtk-9.0.1-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch
new file mode 100644
index 000000000..2514dac63
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.1-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch
@@ -0,0 +1,32 @@
+From 33d9b7ded14ce36e3f63810f3403623ee5c2059c Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 10 Jan 2021 20:29:56 +0100
+Subject: [PATCH] fix kepler compute_arch if CUDA toolkit >=11 is used.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ .../vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake b/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake
+index ff0b2581..e565e783 100644
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake
+@@ -229,8 +229,12 @@ if(VTKm_ENABLE_CUDA)
+ if(VTKm_CUDA_Architecture STREQUAL "fermi")
+ set(arch_flags --generate-code=arch=compute_20,code=sm_20)
+ elseif(VTKm_CUDA_Architecture STREQUAL "kepler")
+- set(arch_flags --generate-code=arch=compute_30,code=sm_30
+- --generate-code=arch=compute_35,code=sm_35)
++ if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
++ set(arch_flags --generate-code=arch=compute_30,code=sm_30
++ --generate-code=arch=compute_35,code=sm_35)
++ else()
++ set(arch_flags --generate-code=arch=compute_35,code=sm_35)
++ endif()
+ elseif(VTKm_CUDA_Architecture STREQUAL "maxwell")
+ set(arch_flags --generate-code=arch=compute_50,code=sm_50)
+ elseif(VTKm_CUDA_Architecture STREQUAL "pascal")
+--
+2.30.0
+
diff --git a/sci-libs/vtk/files/vtk-9.0.3-IO-FFMPEG-support-FFmpeg-5.0-API-changes.patch b/sci-libs/vtk/files/vtk-9.0.3-IO-FFMPEG-support-FFmpeg-5.0-API-changes.patch
new file mode 100644
index 000000000..276831d84
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.3-IO-FFMPEG-support-FFmpeg-5.0-API-changes.patch
@@ -0,0 +1,141 @@
+From https://gitlab.kitware.com/ben.boeckel/vtk/-/commit/bad8f3e9d0aad03e8f2aff9524cb3c5f2d10ccaf
+From: Ben Boeckel <ben.boeckel@kitware.com>
+Date: Fri, 28 Jan 2022 10:44:28 -0500
+Subject: [PATCH] IO/FFMPEG: support FFmpeg 5.0 API changes
+
+Fixes: #18445
+--- /dev/null
++++ b/Documentation/release/dev/ffmpeg-5.0.md
+@@ -0,0 +1,3 @@
++## FFmpeg 5.0 support
++
++FFmpeg 5.0 API changes are now supported.
+--- a/IO/FFMPEG/CMakeLists.txt
++++ b/IO/FFMPEG/CMakeLists.txt
+@@ -6,7 +6,9 @@ vtk_module_find_package(
+ avformat
+ avcodec
+ avutil
+- swscale)
++ swscale
++ OPTIONAL_COMPONENTS
++ swresample)
+
+ set(classes
+ vtkFFMPEGWriter)
+@@ -21,6 +23,17 @@ if (NOT FFMPEG_VERSION VERSION_LESS "3.1")
+ vtkFFMPEGVideoSource)
+ endif ()
+
++set(ffmpeg_libraries)
++if (NOT FFMPEG_VERSION VERSION_LESS "5.0")
++ if (NOT FFMPEG_swresample_FOUND)
++ message(FATAL_ERROR
++ "FFMPEG 5.0 requires the `swresample` library.")
++ endif ()
++
++ list(APPEND ffmpeg_libraries
++ FFMPEG::swresample)
++endif ()
++
+ vtk_module_add_module(VTK::IOFFMPEG
+ CLASSES ${classes})
+ vtk_module_link(VTK::IOFFMPEG
+@@ -28,4 +41,5 @@ vtk_module_link(VTK::IOFFMPEG
+ FFMPEG::avformat
+ FFMPEG::avcodec
+ FFMPEG::avutil
+- FFMPEG::swscale)
++ FFMPEG::swscale
++ ${ffmpeg_libraries})
+--- a/IO/FFMPEG/vtkFFMPEGVideoSource.cxx
++++ b/IO/FFMPEG/vtkFFMPEGVideoSource.cxx
+@@ -205,7 +205,7 @@ void vtkFFMPEGVideoSource::Initialize()
+
+ this->Internal->VideoStream = fcontext->streams[this->Internal->VideoStreamIndex];
+
+- AVCodec* dec = avcodec_find_decoder(this->Internal->VideoStream->codecpar->codec_id);
++ const AVCodec* dec = avcodec_find_decoder(this->Internal->VideoStream->codecpar->codec_id);
+ if (!dec)
+ {
+ vtkErrorMacro("Failed to find codec for video");
+@@ -271,7 +271,7 @@ void vtkFFMPEGVideoSource::Initialize()
+ {
+ this->Internal->AudioStream = fcontext->streams[this->Internal->AudioStreamIndex];
+
+- AVCodec* adec = avcodec_find_decoder(this->Internal->AudioStream->codecpar->codec_id);
++ const AVCodec* adec = avcodec_find_decoder(this->Internal->AudioStream->codecpar->codec_id);
+ if (!adec)
+ {
+ vtkErrorMacro("Failed to find codec for audio");
+--- a/IO/FFMPEG/vtkFFMPEGWriter.cxx
++++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx
+@@ -21,10 +21,17 @@
+
+ extern "C"
+ {
++#include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+ #include <libswscale/swscale.h>
+ }
+
++#if LIBAVFORMAT_VERSION_MAJOR < 59
++#define vtk_ff_const59
++#else
++#define vtk_ff_const59 const
++#endif
++
+ #if defined(LIBAVFORMAT_VERSION_MAJOR) && LIBAVFORMAT_VERSION_MAJOR >= 57
+ extern "C"
+ {
+@@ -51,7 +58,7 @@ private:
+
+ AVFormatContext* avFormatContext;
+
+- AVOutputFormat* avOutputFormat;
++ vtk_ff_const59 AVOutputFormat* avOutputFormat;
+
+ AVStream* avStream;
+
+@@ -115,15 +122,9 @@ int vtkFFMPEGWriterInternal::Start()
+ return 0;
+ }
+
+- if (this->Writer->GetCompression())
+- {
+- // choose a codec that is easily playable on windows
+- this->avOutputFormat->video_codec = AV_CODEC_ID_MJPEG;
+- }
+- else
+- {
+- this->avOutputFormat->video_codec = AV_CODEC_ID_RAWVIDEO;
+- }
++ enum AVCodecID video_codec = this->Writer->GetCompression()
++ ? AV_CODEC_ID_MJPEG // choose a codec that is easily playable on windows
++ : AV_CODEC_ID_RAWVIDEO;
+
+ // create the format context that wraps all of the media output structures
+ if (avformat_alloc_output_context2(
+@@ -133,8 +134,8 @@ int vtkFFMPEGWriterInternal::Start()
+ return 0;
+ }
+
+- AVCodec* codec;
+- if (!(codec = avcodec_find_encoder(this->avOutputFormat->video_codec)))
++ vtk_ff_const59 AVCodec* codec;
++ if (!(codec = avcodec_find_encoder(video_codec)))
+ {
+ vtkGenericWarningMacro(<< "Failed to get video codec.");
+ return 0;
+@@ -155,7 +156,7 @@ int vtkFFMPEGWriterInternal::Start()
+ return 0;
+ }
+
+- this->avStream->codecpar->codec_id = static_cast<AVCodecID>(this->avOutputFormat->video_codec);
++ this->avStream->codecpar->codec_id = video_codec;
+ this->avStream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ this->avStream->codecpar->width = this->Dim[0];
+ this->avStream->codecpar->height = this->Dim[1];
+--
+2.35.1
+
diff --git a/sci-libs/vtk/files/vtk-9.1.0-Change-or-scope-struct-names-to-avoid-conflicts.patch b/sci-libs/vtk/files/vtk-9.1.0-Change-or-scope-struct-names-to-avoid-conflicts.patch
new file mode 100644
index 000000000..24804ca2d
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.1.0-Change-or-scope-struct-names-to-avoid-conflicts.patch
@@ -0,0 +1,127 @@
+From https://gitlab.kitware.com/vtk/vtk/-/commit/0322b938968eebee585ad7efb93bbdade7106355
+
+https://bugs.gentoo.org/863038
+https://gitlab.kitware.com/vtk/vtk/-/issues/18638
+
+From: Aron Helser <aron.helser@kitware.com>
+Date: Mon, 15 Aug 2022 10:06:13 -0400
+Subject: [PATCH 16/30] Change or scope struct names to avoid conflicts.
+
+(cherry picked from commit b79eb46bf5a4277cafc1ed2bd47fd3ffc28a5b3f)
+--- a/IO/AMR/vtkAMRFlashReader.cxx
++++ b/IO/AMR/vtkAMRFlashReader.cxx
+@@ -153,7 +153,7 @@ void vtkAMRFlashReader::ComputeStats(
+
+ for (int i = 0; i < internal->NumberOfBlocks; ++i)
+ {
+- Block& theBlock = internal->Blocks[i];
++ FlashReaderBlock& theBlock = internal->Blocks[i];
+ double* gridMin = theBlock.MinBounds;
+ if (gridMin[0] < min[0])
+ {
+@@ -193,7 +193,7 @@ int vtkAMRFlashReader::FillMetaData()
+
+ for (int i = 0; i < this->Internal->NumberOfBlocks; ++i)
+ {
+- Block& theBlock = this->Internal->Blocks[i];
++ FlashReaderBlock& theBlock = this->Internal->Blocks[i];
+
+ // Start numbering levels from 0!
+ int level = this->Internal->Blocks[i].Level - 1;
+--- a/IO/AMR/vtkAMRFlashReaderInternal.cxx
++++ b/IO/AMR/vtkAMRFlashReaderInternal.cxx
+@@ -692,7 +692,7 @@ void vtkFlashReaderInternal::GetBlockMinMaxGlobalDivisionIds()
+
+ for (int b = 0; b < this->NumberOfBlocks; b++)
+ {
+- Block& B = this->Blocks[b];
++ FlashReaderBlock& B = this->Blocks[b];
+
+ for (int d = 0; d < 3; d++)
+ {
+--- a/IO/AMR/vtkAMRFlashReaderInternal.h
++++ b/IO/AMR/vtkAMRFlashReaderInternal.h
+@@ -74,7 +74,7 @@ typedef struct tagFlashReaderSimulationParameters
+ double RedShift;
+ } FlashReaderSimulationParameters;
+
+-typedef struct tagBlock
++typedef struct tagFlashReaderBlock
+ {
+ int Index; // Id of the block
+ int Level; // LOD level
+@@ -88,7 +88,7 @@ typedef struct tagBlock
+ double Center[3]; // center of the block
+ double MinBounds[3]; // lower left of the bounding box
+ double MaxBounds[3]; // upper right of the bounding box
+-} Block;
++} FlashReaderBlock;
+
+ typedef struct tagFlashReaderSimulationInformation
+ {
+@@ -152,7 +152,7 @@ public:
+ FlashReaderSimulationInformation SimulationInformation; // CFD simulation
+
+ // blocks
+- std::vector<Block> Blocks;
++ std::vector<FlashReaderBlock> Blocks;
+ std::vector<int> LeafBlocks;
+ std::vector<std::string> AttributeNames;
+
+--- a/IO/AMR/vtkAMRVelodyneReader.cxx
++++ b/IO/AMR/vtkAMRVelodyneReader.cxx
+@@ -219,7 +219,7 @@ int vtkAMRVelodyneReader::FillMetaData()
+ double spacing[3];
+ for (int i = 0; i < this->Internal->nBlocks; i++)
+ {
+- Block& theBlock = this->Internal->Blocks[i];
++ vtkAMRVelodyneReaderInternal::Block& theBlock = this->Internal->Blocks[i];
+ int level = theBlock.Level;
+ int id = theBlock.Index;
+ CalculateBlockDims(this->Internal->blockDims.data(), theBlock.isFull, dims);
+@@ -243,7 +243,7 @@ vtkUniformGrid* vtkAMRVelodyneReader::GetAMRGrid(const int blockIdx)
+ {
+ return nullptr;
+ }
+- Block& theBlock = this->Internal->Blocks[blockIdx];
++ vtkAMRVelodyneReaderInternal::Block& theBlock = this->Internal->Blocks[blockIdx];
+ int dims[3];
+ CalculateBlockDims(this->Internal->blockDims.data(), theBlock.isFull, dims);
+ vtkUniformGrid* ug = vtkUniformGrid::New();
+--- a/IO/AMR/vtkAMRVelodyneReaderInternal.h
++++ b/IO/AMR/vtkAMRVelodyneReaderInternal.h
+@@ -48,24 +48,20 @@
+ //================================================================================
+ // INTERNAL VELODYNE READER
+ //================================================================================
+-typedef struct tagVelodyneSimParameters
+-{
+- double Time;
+- int CycleTime;
+-} VelodneSimParameters;
+
+-typedef struct tagBlock
+-{
+- int Index;
+- int dSetLoc;
+- int Level;
+- double Origin[3];
+- bool isFull;
+- bool isLeaf;
+-} Block;
+ class vtkAMRVelodyneReaderInternal
+ {
+ public:
++ typedef struct tagVelodyneBlock
++ {
++ int Index;
++ int dSetLoc;
++ int Level;
++ double Origin[3];
++ bool isFull;
++ bool isLeaf;
++ } Block;
++
+ vtkAMRVelodyneReaderInternal();
+ ~vtkAMRVelodyneReaderInternal();
+ void SetFileName(VTK_FILEPATH VTK_FUTURE_CONST char* fileName);
diff --git a/sci-libs/vtk/files/vtk-9.1.0-adjust-to-find-binaries.patch b/sci-libs/vtk/files/vtk-9.1.0-adjust-to-find-binaries.patch
new file mode 100644
index 000000000..10d6d251e
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.1.0-adjust-to-find-binaries.patch
@@ -0,0 +1,25 @@
+From e59b8ff7b83cd6a58c226cb4f5d9661bcb29002b Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Thu, 31 Mar 2022 08:05:17 +0200
+Subject: [PATCH] adjust to find binaries
+
+Add compatibility for qt-5.15.3 with no qtchooser installed. QtCore exports
+Qt5::{qmake,moc,rcc} which we use to get the path for binaries.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/GUISupport/QtQuick/qml/CMakeLists.txt
++++ b/GUISupport/QtQuick/qml/CMakeLists.txt
+@@ -60,8 +60,8 @@ file(GENERATE
+ # Generate the qmltypes file for the VTK QML plugin
+
+ # First, find the qmlplugindump executable
+-get_target_property(qt_core_location "Qt${vtk_qt_major_version}::Core" LOCATION)
+-get_filename_component(qt_bin_dir "${qt_core_location}" PATH)
++get_target_property(qt_qmake_location "Qt${vtk_qt_major_version}::qmake" LOCATION)
++get_filename_component(qt_bin_dir "${qt_qmake_location}" PATH)
+ if (APPLE)
+ get_filename_component(qt_bin_dir "${qt_bin_dir}" PATH)
+ endif ()
+--
+2.35.1
+
diff --git a/sci-libs/vtk/files/vtk-9.1.0-avoid-naming-collision-with-netcdf-4.9.0.patch b/sci-libs/vtk/files/vtk-9.1.0-avoid-naming-collision-with-netcdf-4.9.0.patch
new file mode 100644
index 000000000..7549c240e
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.1.0-avoid-naming-collision-with-netcdf-4.9.0.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/851594
+
+From b155e9716a1cf4a03948c01f49c4097e466da4f0 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Mon, 20 Jun 2022 07:07:19 +0200
+Subject: [PATCH] avoid naming collision with netcdf-4.9.0
+
+The identifier has already been #defined with netcdf-4.9.0. To avoid
+conflicts guard the declaration.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c
++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c
+@@ -1770,7 +1770,9 @@ void ex__compress_variable(int exoid, int varid, int type)
+ */
+
+ /* const int NC_SZIP_EC = 4; */ /* Selects entropy coding method for szip. */
++#ifndef NC_SZIP_NN
+ const int NC_SZIP_NN = 32; /* Selects nearest neighbor coding method for szip. */
++#endif
+ /* Even and between 4 and 32; typical values are 8, 10, 16, 32 */
+ const int SZIP_PIXELS_PER_BLOCK =
+ file->compression_level == 0 ? 32 : file->compression_level;
+--
+2.35.1
+