diff --git a/scripts/install_boost.sh b/scripts/install_boost.sh index 61213b7..ec9999d 100755 --- a/scripts/install_boost.sh +++ b/scripts/install_boost.sh @@ -109,21 +109,21 @@ fi # https://github.com/boostorg/python/commit/660487c43fde76f3e64f1cb2e644500da92fe582 if [[ (${major} -eq 1) && (${minor} -le 66) ]]; then # Boost <= 1.66.x cd ${src_dir}/libs/python - patch -t -p1 < ${script_dir}/patches/boost_166-python37-unicode-as-string.patch + patch -t -p1 < ${script_dir}/patches/boost/1.66/boost_166-python37-unicode-as-string.patch fi # Patch for serialization in Boost <= 1.64.x # https://github.com/boostorg/serialization/commit/1d86261581230e2dc5d617a9b16287d326f3e229 if [[ (${major} -eq 1) && (${minor} -le 64) ]]; then # Boost <= 1.64.x cd ${src_dir} - patch -t -p2 < ${script_dir}/patches/boost_164-serialization-array-wrapper.patch + patch -t -p2 < ${script_dir}/patches/boost/1.64/boost_164-serialization-array-wrapper.patch fi # Patch for pthread in 1.69.x <= Boost <= 1.72.x # https://github.com/boostorg/thread/pull/297/commits/74fb0a26099bc51d717f5f154b37231ce7df3e98 if [[ (${major} -eq 1) && (${minor} -ge 69) && (${minor} -le 72) ]]; then # 1.69.x <= Boost <= 1.72.x cd ${src_dir} - patch -t -p2 < ${script_dir}/patches/boost_169-pthread.patch + patch -t -p2 < ${script_dir}/patches/boost/1.69/boost_169-pthread.patch fi # Build and install diff --git a/scripts/install_vtk.sh b/scripts/install_vtk.sh index be0d22c..4c40b95 100755 --- a/scripts/install_vtk.sh +++ b/scripts/install_vtk.sh @@ -98,49 +98,128 @@ cd ${base_dir}/src/vtk src_dir=$(pwd)/VTK-${version} mkdir -p ${src_dir} -if [[ ${major} -lt 6 || (${major} -eq 6 && ${minor} -eq 0) ]]; then # VTK <= 6.0.x - wget -nc http://www.vtk.org/files/release/${major}.${minor}/vtk-${version}.tar.gz - tar -xzf vtk-${version}.tar.gz -C ${src_dir} --strip-components=1 +wget -nc https://github.com/Kitware/VTK/archive/v${version}.tar.gz +tar -xzf v${version}.tar.gz -C ${src_dir} --strip-components=1 -else # VTK > 6.0.x - wget -nc https://github.com/Kitware/VTK/archive/v${version}.tar.gz - tar -xzf v${version}.tar.gz -C ${src_dir} --strip-components=1 -fi - -# VTK 6.3.x patches: https://sources.debian.org/patches/vtk6/6.3.0%2Bdfsg2-8.1/ +# VTK 6.3.x patches: https://sources.debian.org/patches/vtk6/ if [[ ${major} -eq 6 && ${minor} -eq 3 ]]; then # VTK == 6.3.x cd ${src_dir} - patch -t -p1 < ${script_dir}/patches/vtk6.3.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/10_allpatches.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/20_soversion-sharedlib.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/30_matplotlib.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/60_use_system_mpi4py.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/70_fix_ftbfs_gcc49.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/90_gdal-2.0.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/95_ffmpeg_2.9.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/97_fix_latex_doxygen.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/99-hdf5-1.10-compatibility + patch -t -p1 < ${script_dir}/patches/vtk/6.3/100_javac-heap.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/101_java_install_path.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/105_unforce_embedded_glew.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/106_install_doxygen_scripts_in_nodoc_build.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/108_Doxygen-use-mathjax.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/109_infovis_boost.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/110_remove_nonfree_from_build.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/120_fix_ftbfs_qtpainter.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/new-freetype.patch + patch -t -p1 < ${script_dir}/patches/vtk/6.3/vtk6-gcc11-support.patch fi -# VTK 7.1.x patches: https://sources.debian.org/patches/vtk7/7.1.1%2Bdfsg2-10.2/ +# VTK 7.1.x patches: https://sources.debian.org/patches/vtk7/ if [[ ${major} -eq 7 && ${minor} -eq 1 ]]; then # VTK == 7.1.x cd ${src_dir} - patch -t -p1 < ${script_dir}/patches/vtk7.1.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/10_allpatches.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/20_soversion-sharedlib.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/30_matplotlib.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/40_use_system_sqlite.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/60_use_system_mpi4py.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/70_fix_ftbfs_gcc49.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/80_fix_arm_compilation.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/99-hdf5-1.10-compatibility + patch -t -p1 < ${script_dir}/patches/vtk/7.1/100_javac-heap.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/101_java_install_path.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/105_unforce_embedded_glew.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/106_install_doxygen_scripts_in_nodoc_build.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/108_Doxygen-use-mathjax.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/109_java-jar-nonjavafiles.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/110_python-371.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/111_fix_perl.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/112_riscv_support.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/113_fix_python_equal.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/115_support-gcc10.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/mysq8_my_bool.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/gcc-11.patch + patch -t -p1 < ${script_dir}/patches/vtk/7.1/ffmpeg-5.patch fi -# VTK 8.2.x patches: https://sources.debian.org/patches/vtk7/7.1.1%2Bdfsg2-10.2/ +# VTK 8.1.x patches +if [[ ${major} -eq 8 && ${minor} -eq 1 ]]; then # VTK == 8.1.x + cd ${src_dir} + patch -t -p1 < ${script_dir}/patches/vtk/8.1/20_soversion-sharedlib.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/30_matplotlib.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/60_use_system_mpi4py.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/70_vtk8_fix_ftbfs_gcc49.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/100_javac-heap.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/101_java_install_path.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/106_install_doxygen_scripts_in_nodoc_build.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/108_Doxygen-use-mathjax.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/109_java-jar-nonjavafiles.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/110_python-371.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/111_fix_perl.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/112_riscv_support.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/113_vtk8_fix_python_equal.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/115_support-gcc10.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/mysq8_my_bool.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.1/vtk8-gcc-11-exodus.patch +fi + +# VTK 8.2.x patches if [[ ${major} -eq 8 && ${minor} -eq 2 ]]; then # VTK == 8.2.x cd ${src_dir} - patch -t -p1 < ${script_dir}/patches/vtk8.2.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/20_soversion-sharedlib.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/30_matplotlib.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/60_vtk8_use_system_mpi4py.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/70_vtk8_fix_ftbfs_gcc49.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/100_javac-heap.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/101_java_install_path.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/106_install_doxygen_scripts_in_nodoc_build.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/108_Doxygen-use-mathjax.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/109_java-jar-nonjavafiles.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/110_python-371.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/111_fix_perl.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/112_riscv_support.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/113_vtk8_fix_python_equal.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/115_support-gcc10.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/mysq8_my_bool.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch + patch -t -p1 < ${script_dir}/patches/vtk/8.2/vtk8-gcc-11-exodus.patch fi -# VTK 9.0.x patches: https://sources.debian.org/patches/vtk9/9.0.1%2Bdfsg1-8/ +# VTK 9.0.x patches: https://sources.debian.org/patches/vtk9/ if [[ ${major} -eq 9 && ${minor} -eq 0 ]]; then # VTK == 9.0.x cd ${src_dir} - patch -t -p1 < ${script_dir}/patches/vtk9.0-fix-limits.patch + patch -t -p1 < ${script_dir}/patches/vtk/9.0/50_fix_python-modules_path.patch + patch -t -p1 < ${script_dir}/patches/vtk/9.0/70_fix_python_numpy_warning.patch + patch -t -p1 < ${script_dir}/patches/vtk/9.0/fix-limits.patch fi -# VTK 9.1.x patches: https://sources.debian.org/patches/vtk9/9.1.0%2Breally9.1.0%2Bdfsg2-7.1/ +# VTK 9.1.x patches: https://sources.debian.org/patches/vtk9/ if [[ ${major} -eq 9 && ${minor} -eq 1 ]]; then # VTK == 9.1.x cd ${src_dir} patch -t -p1 < ${script_dir}/patches/vtk/9.1/gcc-13.patch fi -# VTK 9.2.x patches: https://sources.debian.org/patches/vtk9/9.1.0%2Breally9.1.0%2Bdfsg2-7.1/ +# VTK 9.2.x patches if [[ ${major} -eq 9 && ${minor} -eq 2 ]]; then # VTK == 9.2.x cd ${src_dir} - patch -t -p1 < ${script_dir}/patches/vtk/9.1/gcc-13.patch + patch -t -p1 < ${script_dir}/patches/vtk/9.2/gcc-13.patch fi # Build and install @@ -150,14 +229,14 @@ mkdir -p ${install_dir} mkdir -p ${src_dir}-build cd ${src_dir}-build cmake \ - -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${install_dir} \ + -DCMAKE_INSTALL_RPATH=${install_dir}/lib/vtk-${major}.${minor} \ -DBUILD_EXAMPLES=OFF \ + -DBUILD_SHARED_LIBS=ON \ -DBUILD_TESTING=OFF \ -DBUILD_DOCUMENTATION=OFF \ -DVTK_INSTALL_NO_DOCUMENTATION=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${install_dir} \ - -DCMAKE_INSTALL_RPATH=${install_dir}/lib/vtk-${major}.${minor} \ ${src_dir} && \ make -j ${parallel} && \ make install diff --git a/scripts/patches/boost_164-serialization-array-wrapper.patch b/scripts/patches/boost/1.64/boost_164-serialization-array-wrapper.patch similarity index 100% rename from scripts/patches/boost_164-serialization-array-wrapper.patch rename to scripts/patches/boost/1.64/boost_164-serialization-array-wrapper.patch diff --git a/scripts/patches/boost_166-python37-unicode-as-string.patch b/scripts/patches/boost/1.66/boost_166-python37-unicode-as-string.patch similarity index 100% rename from scripts/patches/boost_166-python37-unicode-as-string.patch rename to scripts/patches/boost/1.66/boost_166-python37-unicode-as-string.patch diff --git a/scripts/patches/boost_169-pthread.patch b/scripts/patches/boost/1.69/boost_169-pthread.patch similarity index 100% rename from scripts/patches/boost_169-pthread.patch rename to scripts/patches/boost/1.69/boost_169-pthread.patch diff --git a/scripts/patches/vtk/6.3/100_javac-heap.patch b/scripts/patches/vtk/6.3/100_javac-heap.patch new file mode 100644 index 0000000..a6e8a7f --- /dev/null +++ b/scripts/patches/vtk/6.3/100_javac-heap.patch @@ -0,0 +1,18 @@ +Description: set JVM max memory to 1024m. +Author: Matthias Klose +Acked-By: Anton Gladky +Last-Update: 2016-02-12 + +Index: VTK-6.3.0/Wrapping/Java/CMakeLists.txt +=================================================================== +--- VTK-6.3.0.orig/Wrapping/Java/CMakeLists.txt ++++ VTK-6.3.0/Wrapping/Java/CMakeLists.txt +@@ -80,6 +80,8 @@ if(APPLE) + set(JAVAC_OPTIONS -J-Xmx512m) + endif() + ++set(JAVAC_OPTIONS -J-Xmx1024m) ++ + get_property(java_modules GLOBAL PROPERTY VTK_JAVA_WRAPPED) + foreach(module IN LISTS java_modules) + if(NOT ${module}_EXCLUDE_FROM_WRAPPING) diff --git a/scripts/patches/vtk/6.3/101_java_install_path.patch b/scripts/patches/vtk/6.3/101_java_install_path.patch new file mode 100644 index 0000000..18af20a --- /dev/null +++ b/scripts/patches/vtk/6.3/101_java_install_path.patch @@ -0,0 +1,21 @@ +Description: Install Java modules in the correct path + This patch corrects the installation of the native Java modules + to go to the path given by the Debian Java Policy. This helps + to later use the simple install file to get them to the right + location in the package. +Author: Gert Wollny + +Index: VTK-6.3.0/CMakeLists.txt +=================================================================== +--- VTK-6.3.0.orig/CMakeLists.txt ++++ VTK-6.3.0/CMakeLists.txt +@@ -207,7 +207,7 @@ else() + endif() + + # default to not using the system GLEW as ours has fixes in it right now +-set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" FORCE) ++set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" ON) + + set(VTK_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) + diff --git a/scripts/patches/vtk/6.3/106_install_doxygen_scripts_in_nodoc_build.patch b/scripts/patches/vtk/6.3/106_install_doxygen_scripts_in_nodoc_build.patch new file mode 100644 index 0000000..0305d4f --- /dev/null +++ b/scripts/patches/vtk/6.3/106_install_doxygen_scripts_in_nodoc_build.patch @@ -0,0 +1,146 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -546,9 +546,7 @@ + + # The doxygen documentation needs to be aware of all modules. + option(BUILD_DOCUMENTATION "Build the VTK documentation" OFF) +-if(BUILD_DOCUMENTATION) +- add_subdirectory(Utilities/Doxygen) +-endif() ++add_subdirectory(Utilities/Doxygen) + + # If python wrapping and testing is enabled then add driver scripts to run + # tests. Note: Many pythong tests used to be automatically converted from TCL +--- a/Utilities/Doxygen/CMakeLists.txt ++++ b/Utilities/Doxygen/CMakeLists.txt +@@ -1,69 +1,72 @@ + # + # Build the documentation + # +-find_package(Doxygen REQUIRED) +-find_package(Perl REQUIRED) +-find_package(HTMLHelp) +- +-option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) +-option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) +-option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) +-mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) +-if(DOXYGEN_SHORT_NAMES) +- set(DOXYGEN_SHORT_NAMES YES) +-else() +- set(DOXYGEN_SHORT_NAMES NO) +-endif() +-if(DOXYGEN_GENERATE_HTMLHELP) +- set(DOXYGEN_GENERATE_HTMLHELP YES) +-else() +- set(DOXYGEN_GENERATE_HTMLHELP NO) +-endif() +- +-# +-# Configure the script and the doxyfile, then add target +-# +-set(HAVE_DOT_YESNO NO) +-if(DOT) +- set(HAVE_DOT_YESNO YES) +- if(NOT DOT_PATH) +- get_filename_component(DOT_PATH ${DOT} PATH) ++if (BUILD_DOCUMENTATION) ++ find_package(Doxygen REQUIRED) ++ find_package(Perl REQUIRED) ++ find_package(HTMLHelp) ++ ++ option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) ++ option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) ++ option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) ++ mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) ++ if(DOXYGEN_SHORT_NAMES) ++ set(DOXYGEN_SHORT_NAMES YES) ++ else() ++ set(DOXYGEN_SHORT_NAMES NO) + endif() +-endif() +- +-# Build up a list of all module source directories. Note that this should be +-# all source directories and so does not use the normal variables. +-unset(VTK_MODULE_DIRS_DOXYGEN) +-file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") +-foreach(module ${src}) +- get_filename_component(module_BASE ${module} PATH) +- if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") +- # Skip the utilities and third parties directories. ++ if(DOXYGEN_GENERATE_HTMLHELP) ++ set(DOXYGEN_GENERATE_HTMLHELP YES) + else() +- # Use both the source and binary directories, this ensures that +- # generated files will be included, but they may then be architecture, +- # build configuration and/or compiler specific. All source directories +- # are included whether the module is enabled or not. +- set(VTK_MODULE_DIRS_DOXYGEN +- "${VTK_MODULE_DIRS_DOXYGEN} ++ set(DOXYGEN_GENERATE_HTMLHELP NO) ++ endif() ++ ++ # ++ # Configure the script and the doxyfile, then add target ++ # ++ set(HAVE_DOT_YESNO NO) ++ if(DOT) ++ set(HAVE_DOT_YESNO YES) ++ if(NOT DOT_PATH) ++ get_filename_component(DOT_PATH ${DOT} PATH) ++ endif() ++ endif() ++ ++ # Build up a list of all module source directories. Note that this should be ++ # all source directories and so does not use the normal variables. ++ unset(VTK_MODULE_DIRS_DOXYGEN) ++ file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") ++ foreach(module ${src}) ++ get_filename_component(module_BASE ${module} PATH) ++ if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") ++ # Skip the utilities and third parties directories. ++ else() ++ # Use both the source and binary directories, this ensures that ++ # generated files will be included, but they may then be architecture, ++ # build configuration and/or compiler specific. All source directories ++ # are included whether the module is enabled or not. ++ set(VTK_MODULE_DIRS_DOXYGEN ++ "${VTK_MODULE_DIRS_DOXYGEN} + \"${VTK_SOURCE_DIR}/${module_BASE}\" + \"${VTK_BINARY_DIR}/${module_BASE}\"") +- endif() +-endforeach() ++ endif() ++ endforeach() ++ ++ configure_file( ++ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in ++ ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) ++ ++ configure_file( ++ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in ++ ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake ++ @ONLY) ++ ++ add_custom_target(DoxygenDoc ++ ${CMAKE_COMMAND} ++ -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake ++ DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) + +-configure_file( +- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in +- ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) +- +-configure_file( +- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in +- ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake +- @ONLY) +- +-add_custom_target(DoxygenDoc +- ${CMAKE_COMMAND} +- -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake +- DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) ++endif() + + if(NOT VTK_INSTALL_NO_DOCUMENTATION) + macro(__vtk_install_documentation_files glob) diff --git a/scripts/patches/vtk/6.3/108_Doxygen-use-mathjax.patch b/scripts/patches/vtk/6.3/108_Doxygen-use-mathjax.patch new file mode 100644 index 0000000..236c423 --- /dev/null +++ b/scripts/patches/vtk/6.3/108_Doxygen-use-mathjax.patch @@ -0,0 +1,28 @@ +--- a/Utilities/Doxygen/CMakeLists.txt ++++ b/Utilities/Doxygen/CMakeLists.txt +@@ -52,6 +52,13 @@ + endif() + endforeach() + ++ FIND_PATH(MATHJAX_CODEFILE MathJax.js ++ PATHS ++ /usr/share/mathjax/ ++ /usr/share/javascript/ ++ /usr/share/javascript/mathjax/ ++ ) ++ + configure_file( + ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in + ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) +--- a/Utilities/Doxygen/doxyfile.in ++++ b/Utilities/Doxygen/doxyfile.in +@@ -19,6 +19,9 @@ + GENERATE_TAGFILE = "@VTK_BINARY_DIR@/Utilities/Doxygen/vtk@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@.tag" + + PDF_HYPERLINKS = YES ++USE_MATHJAX = YES ++MATHJAX_RELPATH = @MATHJAX_CODEFILE@ ++ + + HAVE_DOT = @HAVE_DOT_YESNO@ + DOT_PATH = "@DOT_PATH@" diff --git a/scripts/patches/vtk/6.3/109_infovis_boost.patch b/scripts/patches/vtk/6.3/109_infovis_boost.patch new file mode 100644 index 0000000..4e8ce7a --- /dev/null +++ b/scripts/patches/vtk/6.3/109_infovis_boost.patch @@ -0,0 +1,14 @@ +Description: Enable Infovis Boost support +Author: Maurice Bremond +Debian-Bug: https://bugs.debian.org/857124 + +--- a/Infovis/Layout/module.cmake ++++ b/Infovis/Layout/module.cmake +@@ -6,6 +6,7 @@ + vtkImagingHybrid + vtkFiltersModeling + vtkInfovisCore ++ vtkInfovisBoostGraphAlgorithms + TEST_DEPENDS + vtkRenderingLabel + vtkRendering${VTK_RENDERING_BACKEND} diff --git a/scripts/patches/vtk/6.3/10_allpatches.patch b/scripts/patches/vtk/6.3/10_allpatches.patch new file mode 100644 index 0000000..788f74c --- /dev/null +++ b/scripts/patches/vtk/6.3/10_allpatches.patch @@ -0,0 +1,45 @@ +Description: + TODO: Put a short summary on the line above and replace this paragraph + with a longer explanation of this change. Complete the meta-information + with other relevant fields (see below for details). To make it easier, the + information below has been extracted from the changelog. Adjust it or drop + it. + . + vtk (5.8.0-13) unstable; urgency=low + . + * Make sure to include VTK/QT cmake file. Closes: #656115 + * Revert back to libtiff4-dev and use libtiff-dev in d/control. Closes: #674998 + * Fix tkInt.h installation, using proper cmake magic. Closes: #674169 + * Make sure to discover init.tcl properly. Closes: #673245 +Author: Mathieu Malaterre +Bug-Debian: http://bugs.debian.org/656115 +Bug-Debian: http://bugs.debian.org/673245 +Bug-Debian: http://bugs.debian.org/674169 +Bug-Debian: http://bugs.debian.org/674998 + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +Index: VTK-6.2.0/Wrapping/Tcl/vtkTkAppInit.cxx +=================================================================== +--- VTK-6.2.0.orig/Wrapping/Tcl/vtkTkAppInit.cxx ++++ VTK-6.2.0/Wrapping/Tcl/vtkTkAppInit.cxx +@@ -165,6 +165,8 @@ int Tcl_AppInit(Tcl_Interp *interp) + // Help Tcl find the Tcl/Tk helper files. + const char* relative_dirs[] = + { ++ "../share/tcltk", ++ "../../share/tcltk", + "TclTk/lib", + ".." VTK_INSTALL_TCL_DIR, + 0 diff --git a/scripts/patches/vtk/6.3/110_remove_nonfree_from_build.patch b/scripts/patches/vtk/6.3/110_remove_nonfree_from_build.patch new file mode 100644 index 0000000..6d5bbb4 --- /dev/null +++ b/scripts/patches/vtk/6.3/110_remove_nonfree_from_build.patch @@ -0,0 +1,108 @@ +Author: Gert Wollny +Description: Remove reverences to vtkHAVSVolumeMapper + The license of the related files is not clear. + +--- a/Rendering/VolumeOpenGL/CMakeLists.txt ++++ b/Rendering/VolumeOpenGL/CMakeLists.txt +@@ -1,7 +1,6 @@ + include(vtkObjectFactory) + + set(Module_SRCS +- vtkOpenGLHAVSVolumeMapper.cxx + vtkOpenGLProjectedAAHexahedraMapper.cxx + vtkOpenGLProjectedTetrahedraMapper.cxx + vtkOpenGLRayCastImageDisplayHelper.cxx +@@ -45,13 +44,6 @@ + vtkGPUVolumeRayCastMapper_FourComponentsFS.glsl + vtkGPUVolumeRayCastMapper_NoShadeFS.glsl + vtkGPUVolumeRayCastMapper_ShadeFS.glsl +- vtkHAVSVolumeMapper_kbufferVP.asm +- vtkHAVSVolumeMapper_k2FP.asm +- vtkHAVSVolumeMapper_k2BeginFP.asm +- vtkHAVSVolumeMapper_k2EndFP.asm +- vtkHAVSVolumeMapper_k6FP.asm +- vtkHAVSVolumeMapper_k6BeginFP.asm +- vtkHAVSVolumeMapper_k6EndFP.asm + vtkProjectedAAHexahedraMapper_VS.glsl + vtkProjectedAAHexahedraMapper_GS.glsl + vtkProjectedAAHexahedraMapper_FS.glsl +@@ -83,7 +75,6 @@ + + # Nwo for the object factory. + set(opengl_overrides +- HAVSVolumeMapper + ProjectedAAHexahedraMapper + ProjectedTetrahedraMapper + RayCastImageDisplayHelper +--- a/Examples/Infovis/Python/vtklibrary.xml ++++ b/Examples/Infovis/Python/vtklibrary.xml +@@ -2382,10 +2382,6 @@ + + + +- +- +- +- + + + +--- a/Examples/Infovis/Python/vtkclasses.xml ++++ b/Examples/Infovis/Python/vtkclasses.xml +@@ -555,10 +555,6 @@ + + + +- +- +- +- + + + +--- a/Examples/GUI/Qt/GraphicsView/vtkclasses.xml ++++ b/Examples/GUI/Qt/GraphicsView/vtkclasses.xml +@@ -555,10 +555,6 @@ + + + +- +- +- +- + + + +--- a/Examples/GUI/Qt/GraphicsView/vtklibrary.xml ++++ b/Examples/GUI/Qt/GraphicsView/vtklibrary.xml +@@ -2382,10 +2382,6 @@ + + + +- +- +- +- + + + +--- a/Rendering/Volume/CMakeLists.txt ++++ b/Rendering/Volume/CMakeLists.txt +@@ -61,7 +61,6 @@ + # only some volume mappers are supported for the OpenGL2 backend + if(NOT VTK_RENDERING_BACKEND STREQUAL "OpenGL2") + set(Module_SRCS ${Module_SRCS} +- vtkHAVSVolumeMapper.cxx + vtkProjectedAAHexahedraMapper.cxx + vtkVolumeTextureMapper2D.cxx + vtkVolumeTextureMapper3D.cxx +--- a/Rendering/Volume/Testing/Cxx/CMakeLists.txt ++++ b/Rendering/Volume/Testing/Cxx/CMakeLists.txt +@@ -38,7 +38,6 @@ + PreIntegrationIncremental.cxx + PreIntegrationNonIncremental.cxx + TestGPURayCastCompositeShadeMask.cxx # This test depends on vtkOpenGLExtensionManager +- TestHAVSVolumeMapper.cxx + TestProjectedHexahedra.cxx + TestProp3DFollower.cxx + TestTM3DLightComponents.cxx diff --git a/scripts/patches/vtk/6.3/120_fix_ftbfs_qtpainter.patch b/scripts/patches/vtk/6.3/120_fix_ftbfs_qtpainter.patch new file mode 100644 index 0000000..3a7db78 --- /dev/null +++ b/scripts/patches/vtk/6.3/120_fix_ftbfs_qtpainter.patch @@ -0,0 +1,33 @@ +Description: Fix compilation with new QT +Author: Gianfranco Costamagna +Acked-By: Anton Gladky +Bug-Debian: https://bugs.debian.org/975135 +Bug-Debian: https://bugs.debian.org/976424 +Last-Update: 2020-12-05 + +Index: vtk6/Rendering/Qt/vtkQtLabelRenderStrategy.cxx +=================================================================== +--- vtk6.orig/Rendering/Qt/vtkQtLabelRenderStrategy.cxx ++++ vtk6/Rendering/Qt/vtkQtLabelRenderStrategy.cxx +@@ -13,7 +13,7 @@ + + =========================================================================*/ + #include "vtkQtLabelRenderStrategy.h" +- ++#include + #include "vtkCoordinate.h" + #include "vtkImageData.h" + #include "vtkLabeledDataMapper.h" +Index: vtk6/Rendering/Qt/vtkQtStringToImage.cxx +=================================================================== +--- vtk6.orig/Rendering/Qt/vtkQtStringToImage.cxx ++++ vtk6/Rendering/Qt/vtkQtStringToImage.cxx +@@ -14,7 +14,7 @@ + =========================================================================*/ + + #include "vtkQtStringToImage.h" +- ++#include + #include "vtkQImageToImageSource.h" + #include "vtkStdString.h" + #include "vtkUnicodeString.h" diff --git a/scripts/patches/vtk/6.3/20_soversion-sharedlib.patch b/scripts/patches/vtk/6.3/20_soversion-sharedlib.patch new file mode 100644 index 0000000..a503d49 --- /dev/null +++ b/scripts/patches/vtk/6.3/20_soversion-sharedlib.patch @@ -0,0 +1,28 @@ +Index: VTK-6.3.0/CMake/vtkModuleMacros.cmake +=================================================================== +--- VTK-6.3.0.orig/CMake/vtkModuleMacros.cmake ++++ VTK-6.3.0/CMake/vtkModuleMacros.cmake +@@ -401,8 +401,8 @@ endfunction() + function(vtk_target_name _name) + get_property(_type TARGET ${_name} PROPERTY TYPE) + if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL) +- set_property(TARGET ${_name} PROPERTY VERSION 1) +- set_property(TARGET ${_name} PROPERTY SOVERSION 1) ++ set_property(TARGET ${_name} PROPERTY VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}) ++ set_property(TARGET ${_name} PROPERTY SOVERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) + endif() + if("${_name}" MATCHES "^[Vv][Tt][Kk]") + set(_vtk "") +Index: VTK-6.3.0/Rendering/Tk/CMakeLists.txt +=================================================================== +--- VTK-6.3.0.orig/Rendering/Tk/CMakeLists.txt ++++ VTK-6.3.0/Rendering/Tk/CMakeLists.txt +@@ -122,7 +122,7 @@ if(TK_FOUND AND VTK_USE_TK) + vtk_target_install(vtkRenderingPythonTkWidgets) + + set_property(TARGET vtkRenderingPythonTkWidgets PROPERTY OUTPUT_NAME +- vtkRenderingPythonTkWidgets-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) ++ vtkRenderingPythonTkWidgets) + + set(Module_PYTHON_LIBS ${VTK_TK_LIBRARIES}) + if(VTK_USE_X) diff --git a/scripts/patches/vtk/6.3/30_matplotlib.patch b/scripts/patches/vtk/6.3/30_matplotlib.patch new file mode 100644 index 0000000..cac3abd --- /dev/null +++ b/scripts/patches/vtk/6.3/30_matplotlib.patch @@ -0,0 +1,15 @@ +Index: VTK-6.3.0/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h +=================================================================== +--- VTK-6.3.0.orig/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h ++++ VTK-6.3.0/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h +@@ -143,6 +143,10 @@ private: + // is called internally when matplotlib rendering is first needed and is used + // to implement IsAvailable. + static Availability CheckMPLAvailability(); ++ static void DisableMPL() ++ { ++ MPLMathTextAvailable = UNAVAILABLE; ++ }; + + // Description: + // Cache the availability of matplotlib in the current python session. diff --git a/scripts/patches/vtk/6.3/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch b/scripts/patches/vtk/6.3/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch new file mode 100644 index 0000000..4a6cd10 --- /dev/null +++ b/scripts/patches/vtk/6.3/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch @@ -0,0 +1,25 @@ +From dae1718d50bec1b40b860280acafbdd94fc4cd5d Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Sat, 21 Nov 2020 13:37:34 -0500 +Subject: [PATCH] vtkFreeTypeTools: avoid using an internal macro + +This macro has been removed upstream as it was always intended to be +private. +--- + Rendering/FreeType/vtkFreeTypeTools.cxx | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +Index: vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx +=================================================================== +--- vtk7.orig/Rendering/FreeType/vtkFreeTypeTools.cxx ++++ vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx +@@ -287,8 +287,7 @@ + } + + //---------------------------------------------------------------------------- +-FT_CALLBACK_DEF(FT_Error) +-vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) diff --git a/scripts/patches/vtk/6.3/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch b/scripts/patches/vtk/6.3/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch new file mode 100644 index 0000000..8267266 --- /dev/null +++ b/scripts/patches/vtk/6.3/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch @@ -0,0 +1,23 @@ +From 31e8e4ebeb3152f7cfdb3f14f24f7e5d31a4f8b5 Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Sun, 22 Nov 2020 20:04:19 -0500 +Subject: [PATCH] vtkFontConfigFreeTypeTools: remove last FT_CALLBACK_DEF usage + +--- + Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +index 5c1908cf24b..818ff058bb9 100644 +--- a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx ++++ b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +@@ -31,8 +31,7 @@ vtkStandardNewMacro(vtkFontConfigFreeTypeTools); + namespace + { + // The FreeType face requester callback: +-FT_CALLBACK_DEF(FT_Error) +-vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) diff --git a/scripts/patches/vtk/6.3/60_use_system_mpi4py.patch b/scripts/patches/vtk/6.3/60_use_system_mpi4py.patch new file mode 100644 index 0000000..7f6e035 --- /dev/null +++ b/scripts/patches/vtk/6.3/60_use_system_mpi4py.patch @@ -0,0 +1,30 @@ +Description: use system mpi4py +Author: Anton Gladky +Last-Update: 2015-03-24 + +Index: VTK-6.3.0/Parallel/MPI4Py/CMakeLists.txt +=================================================================== +--- VTK-6.3.0.orig/Parallel/MPI4Py/CMakeLists.txt ++++ VTK-6.3.0/Parallel/MPI4Py/CMakeLists.txt +@@ -18,7 +18,7 @@ if(VTK_USE_SYSTEM_MPI4PY) + mark_as_advanced(MPI4PY_INCLUDE_DIR) + endif() + else() +- set(MPI4PY_INCLUDE_DIR "${vtkmpi4py_SOURCE_DIR}/vtkmpi4py/src/include") ++ set(MPI4PY_INCLUDE_DIR "/usr/include") + endif() + include_directories("${MPI4PY_INCLUDE_DIR}") + +Index: VTK-6.3.0/Parallel/MPI4Py/module.cmake +=================================================================== +--- VTK-6.3.0.orig/Parallel/MPI4Py/module.cmake ++++ VTK-6.3.0/Parallel/MPI4Py/module.cmake +@@ -5,8 +5,6 @@ if (VTK_WRAP_PYTHON) + DEPENDS + vtkParallelMPI + vtkPython +- COMPILE_DEPENDS +- vtkmpi4py + EXCLUDE_FROM_TCL_WRAPPING + EXCLUDE_FROM_JAVA_WRAPPING + KIT diff --git a/scripts/patches/vtk/6.3/70_fix_ftbfs_gcc49.patch b/scripts/patches/vtk/6.3/70_fix_ftbfs_gcc49.patch new file mode 100644 index 0000000..adb9bb5 --- /dev/null +++ b/scripts/patches/vtk/6.3/70_fix_ftbfs_gcc49.patch @@ -0,0 +1,130 @@ +Description: fix compilation with gcc-4.9 +Author: Anton Gladky +Bug-Debian: http://bugs.debian.org/746923 +Forwarded: https://github.com/Kitware/VTK/pull/7 +Last-Update: 2014-05-30 + +Index: VTK-6.3.0/Filters/ParallelMPI/vtkDistributedDataFilter.cxx +=================================================================== +--- VTK-6.3.0.orig/Filters/ParallelMPI/vtkDistributedDataFilter.cxx ++++ VTK-6.3.0/Filters/ParallelMPI/vtkDistributedDataFilter.cxx +@@ -1112,7 +1112,10 @@ vtkDataSet *vtkDistributedDataFilter::Te + vtkIdType cellsPerNode = numTotalCells / nprocs; + + vtkIdList **sendCells = new vtkIdList * [ nprocs ]; +- memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); ++ ++ if (sizeof(vtkIdList *) * nprocs > 0) { ++ memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); ++ } + + if (numConsumers == nprocs - 1) + { +@@ -1597,7 +1600,9 @@ vtkFloatArray ** + // Exchange int arrays + + float **recvArrays = new float * [nprocs]; +- memset(recvArrays, 0, sizeof(float *) * nprocs); ++ if (sizeof(float *) * nprocs > 0) { ++ memset(recvArrays, 0, sizeof(float *) * nprocs); ++ } + + if (sendSize[me] > 0) // sent myself an array + { +@@ -1719,7 +1724,9 @@ vtkIdTypeArray ** + // Exchange int arrays + + vtkIdType **recvArrays = new vtkIdType * [nprocs]; +- memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); ++ if (sizeof(vtkIdType *) * nprocs > 0) { ++ memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); ++ } + + if (sendSize[me] > 0) // sent myself an array + { +@@ -2788,7 +2795,9 @@ void vtkDistributedDataFilter::AddConsta + + unsigned char *vals = new unsigned char [npoints]; + +- memset(vals, val, npoints); ++ if (npoints > 0) { ++ memset(vals, val, npoints); ++ } + + vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); + Array->SetName(arrayName); +@@ -2808,7 +2817,9 @@ void vtkDistributedDataFilter::AddConsta + + unsigned char *vals = new unsigned char [ncells]; + +- memset(vals, val, ncells); ++ if (ncells > 0) { ++ memset(vals, val, ncells); ++ } + + vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); + Array->SetName(arrayName); +@@ -3007,7 +3018,9 @@ int vtkDistributedDataFilter::AssignGlob + vtkIdType nGridPoints = grid->GetNumberOfPoints(); + + vtkIdType *numPointsOutside = new vtkIdType [nprocs]; +- memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); ++ if (sizeof(vtkIdType) * nprocs > 0) { ++ memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); ++ } + + vtkIdTypeArray *globalIds = vtkIdTypeArray::New(); + globalIds->SetNumberOfValues(nGridPoints); +@@ -3089,10 +3102,16 @@ int vtkDistributedDataFilter::AssignGlob + // global ID back? + + vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs]; +- memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); ++ ++ if (sizeof(vtkFloatArray *) * nprocs > 0) { ++ memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); ++ } + + vtkIdTypeArray **localIds = new vtkIdTypeArray * [nprocs]; +- memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ ++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { ++ memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + vtkIdType *next = new vtkIdType [nprocs]; + vtkIdType *next3 = new vtkIdType [nprocs]; +@@ -3267,7 +3286,9 @@ vtkIdTypeArray **vtkDistributedDataFilte + { + // There are no cells in my assigned region + +- memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { ++ memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + return gids; + } +@@ -3472,7 +3493,10 @@ vtkIdTypeArray **vtkDistributedDataFilte + std::multimap::iterator mapIt; + + vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs]; +- memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); ++ ++ if (sizeof (vtkIdTypeArray *) * nprocs > 0) { ++ memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); ++ } + + for (int i=0; iGetNumberOfPoints(); + + vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs]; +- memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ if (sizeof(vtkIdTypeArray *) * nprocs) { ++ memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + if (numPoints < 1) + { diff --git a/scripts/patches/vtk/6.3/90_gdal-2.0.patch b/scripts/patches/vtk/6.3/90_gdal-2.0.patch new file mode 100644 index 0000000..4db3240 --- /dev/null +++ b/scripts/patches/vtk/6.3/90_gdal-2.0.patch @@ -0,0 +1,45 @@ +Description: Fix GDAL 2.0 compatibility. + Based on gdal2.patch from ArchLinux, improved to support both GDAL 1.x & 2.x. +Origin: https://projects.archlinux.org/svntogit/community.git/tree/trunk/gdal2.patch?h=packages/vtk +Bug: http://www.vtk.org/Bug/view.php?id=15692 + +Index: VTK-6.3.0/IO/GDAL/vtkGDALVectorReader.cxx +=================================================================== +--- VTK-6.3.0.orig/IO/GDAL/vtkGDALVectorReader.cxx ++++ VTK-6.3.0/IO/GDAL/vtkGDALVectorReader.cxx +@@ -44,7 +44,11 @@ class vtkGDALVectorReader::Internal + public: + Internal( const char* srcName, int srcMode, int appendFeatures, int addFeatIds ) + { ++#if GDAL_VERSION_MAJOR < 2 + this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver ); ++#else ++ this->Source = (GDALDataset*) OGROpen( srcName, srcMode, NULL ); ++#endif + if ( ! this->Source ) + { + this->LastError = CPLGetLastErrorMsg(); +@@ -61,7 +65,11 @@ public: + { + if ( this->Source ) + { ++#if GDAL_VERSION_MAJOR < 2 + OGRDataSource::DestroyDataSource( this->Source ); ++#else ++ GDALClose( (GDALDatasetH) this->Source ); ++#endif + } + } + +@@ -307,7 +315,11 @@ public: + return nCells; + } + ++#if GDAL_VERSION_MAJOR < 2 + OGRDataSource* Source; ++#else ++ GDALDataset* Source; ++#endif + OGRSFDriver* Driver; + const char* LastError; + int LayerIdx; diff --git a/scripts/patches/vtk/6.3/95_ffmpeg_2.9.patch b/scripts/patches/vtk/6.3/95_ffmpeg_2.9.patch new file mode 100644 index 0000000..0da599c --- /dev/null +++ b/scripts/patches/vtk/6.3/95_ffmpeg_2.9.patch @@ -0,0 +1,94 @@ +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun +Last-Update: <2015-11-02> + +--- a/CMake/vtkTestFFMPEG.cmake ++++ b/CMake/vtkTestFFMPEG.cmake +@@ -32,8 +32,8 @@ + #include <${FFMEG_CODEC_HEADER_PATH}/avcodec.h> + int main() + { +- img_convert(0, PIX_FMT_RGB24, +- 0, PIX_FMT_RGB24, ++ img_convert(0, AV_PIX_FMT_RGB24, ++ 0, AV_PIX_FMT_RGB24, + 0, 0); + return 0; + }\n") +--- a/IO/FFMPEG/vtkFFMPEGWriter.cxx ++++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx +@@ -191,11 +191,11 @@ + c->height = this->Dim[1]; + if (this->Writer->GetCompression()) + { +- c->pix_fmt = PIX_FMT_YUVJ422P; ++ c->pix_fmt = AV_PIX_FMT_YUVJ422P; + } + else + { +- c->pix_fmt = PIX_FMT_BGR24; ++ c->pix_fmt = AV_PIX_FMT_BGR24; + } + + //to do playback at actual recorded rate, this will need more work see also below +@@ -274,13 +274,13 @@ + #endif + + //for the output of the writer's input... +- this->rgbInput = avcodec_alloc_frame(); ++ this->rgbInput = av_frame_alloc(); + if (!this->rgbInput) + { + vtkGenericWarningMacro (<< "Could not make rgbInput avframe." ); + return 0; + } +- int RGBsize = avpicture_get_size(PIX_FMT_RGB24, c->width, c->height); ++ int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height); + unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize); + if (!rgb) + { +@@ -288,10 +288,10 @@ + return 0; + } + //The rgb buffer should get deleted when this->rgbInput is. +- avpicture_fill((AVPicture *)this->rgbInput, rgb, PIX_FMT_RGB24, c->width, c->height); ++ avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); + + //and for the output to the codec's input. +- this->yuvOutput = avcodec_alloc_frame(); ++ this->yuvOutput = av_frame_alloc(); + if (!this->yuvOutput) + { + vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." ); +@@ -349,12 +349,12 @@ + //convert that to YUV for input to the codec + #ifdef VTK_FFMPEG_HAS_IMG_CONVERT + img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt, +- (AVPicture *)this->rgbInput, PIX_FMT_RGB24, ++ (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24, + cc->width, cc->height); + #else + //convert that to YUV for input to the codec + SwsContext* convert_ctx = sws_getContext( +- cc->width, cc->height, PIX_FMT_RGB24, ++ cc->width, cc->height, AV_PIX_FMT_RGB24, + cc->width, cc->height, cc->pix_fmt, + SWS_BICUBIC, NULL, NULL, NULL); + +@@ -447,14 +447,14 @@ + if (this->yuvOutput) + { + av_free(this->yuvOutput->data[0]); +- av_free(this->yuvOutput); ++ av_frame_free(&this->yuvOutput); + this->yuvOutput = NULL; + } + + if (this->rgbInput) + { + av_free(this->rgbInput->data[0]); +- av_free(this->rgbInput); ++ av_frame_free(&this->rgbInput); + this->rgbInput = NULL; + } + diff --git a/scripts/patches/vtk/6.3/97_fix_latex_doxygen.patch b/scripts/patches/vtk/6.3/97_fix_latex_doxygen.patch new file mode 100644 index 0000000..2767429 --- /dev/null +++ b/scripts/patches/vtk/6.3/97_fix_latex_doxygen.patch @@ -0,0 +1,35 @@ +Description: Fix Latex code that made Dokygen halt the build +Author: Gert Wollny +Last-Update: 2016-02-02 +Forwardedd: no +--- a/Common/Core/vtkAbstractArray.h ++++ b/Common/Core/vtkAbstractArray.h +@@ -384,7 +384,7 @@ + // prominence P, we sample N values, with N = f(T; P, U). + // We want f to be sublinear in T in order to interactively handle large + // arrays; in practice, we can make f independent of T: +- // \f$ N >= \frac{5}{P}\mathrm{ln}\left(\frac{1}{PU}) \f$, ++ // \f$ N >= \frac{5}{P}\mathrm{ln}\left(\frac{1}{PU}\right) \f$, + // but note that small values of P are costly to achieve. + // The default parameters will locate prominent values that occur at least + // 1 out of every 1000 samples with a confidence of 0.999999 (= 1 - 1e6). +--- a/Common/Core/vtkMath.h ++++ b/Common/Core/vtkMath.h +@@ -661,14 +661,14 @@ + // The output is provided by overwriting the input A with a matrix of the same size as + // A containing all of the information about L and U. If the output matrix is + // \f$ A* = \left( \begin{array}{cc} +- // a & b \\ % ++ // a & b \\ + // c & d \end{array} \right)\f$ + // then L and U can be obtained as: + // \f$ L = \left( \begin{array}{cc} +- // 1 & 0 \\ % ++ // 1 & 0 \\ + // c & 1 \end{array} \right)\f$ + // \f$ U = \left( \begin{array}{cc} +- // a & b \\ % ++ // a & b \\ + // 0 & d \end{array} \right)\f$ + // + // That is, the diagonal of the resulting A* is the diagonal of U. The upper right diff --git a/scripts/patches/vtk/6.3/99-hdf5-1.10-compatibility b/scripts/patches/vtk/6.3/99-hdf5-1.10-compatibility new file mode 100644 index 0000000..5e6c002 --- /dev/null +++ b/scripts/patches/vtk/6.3/99-hdf5-1.10-compatibility @@ -0,0 +1,41 @@ +Description: The H5FD_class_t struct gained an extra member in 1.10 +Author: Iain Lane +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=846372 + +Index: b/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx +=================================================================== +--- a/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx ++++ b/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx +@@ -139,7 +139,11 @@ + #if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) + static haddr_t H5FD_dsm_get_eoa(const H5FD_t *_file, H5FD_mem_t type); + static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) ++static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type); ++#else + static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file); ++#endif + #else + static haddr_t H5FD_dsm_get_eoa(H5FD_t *_file); + static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, haddr_t addr); +@@ -155,6 +159,9 @@ + "dsm", /*name */ + MAXADDR, /*maxaddr */ + H5F_CLOSE_WEAK, /*fc_degree */ ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) ++ NULL, /* terminate */ ++#endif + NULL, /*sb_size */ + NULL, /*sb_encode */ + NULL, /*sb_decode */ +@@ -687,7 +694,9 @@ + *------------------------------------------------------------------------- + */ + static haddr_t +-#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) ++H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type) ++#elif (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) + H5FD_dsm_get_eof(const H5FD_t *_file) + #else + H5FD_dsm_get_eof(H5FD_t *_file) diff --git a/scripts/patches/vtk/6.3/new-freetype.patch b/scripts/patches/vtk/6.3/new-freetype.patch new file mode 100644 index 0000000..401cb00 --- /dev/null +++ b/scripts/patches/vtk/6.3/new-freetype.patch @@ -0,0 +1,16 @@ +Description: Fix another build failure due to new freetype +Author: Gianfranco Costamagna +Last-Update: 2020-12-11 + +--- vtk6-6.3.0+dfsg2.orig/Rendering/FreeType/vtkFreeTypeUtilities.cxx ++++ vtk6-6.3.0+dfsg2/Rendering/FreeType/vtkFreeTypeUtilities.cxx +@@ -332,8 +332,7 @@ void vtkFreeTypeUtilities::MapIdToTextPr + + //---------------------------------------------------------------------------- + #ifdef VTK_FREETYPE_CACHING_SUPPORTED +-FT_CALLBACK_DEF(FT_Error) +-vtkFreeTypeUtilitiesFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFreeTypeUtilitiesFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) diff --git a/scripts/patches/vtk6-gcc11-support.patch b/scripts/patches/vtk/6.3/vtk6-gcc11-support.patch similarity index 100% rename from scripts/patches/vtk6-gcc11-support.patch rename to scripts/patches/vtk/6.3/vtk6-gcc11-support.patch diff --git a/scripts/patches/vtk/7.1/100_javac-heap.patch b/scripts/patches/vtk/7.1/100_javac-heap.patch new file mode 100644 index 0000000..a6e8a7f --- /dev/null +++ b/scripts/patches/vtk/7.1/100_javac-heap.patch @@ -0,0 +1,18 @@ +Description: set JVM max memory to 1024m. +Author: Matthias Klose +Acked-By: Anton Gladky +Last-Update: 2016-02-12 + +Index: VTK-6.3.0/Wrapping/Java/CMakeLists.txt +=================================================================== +--- VTK-6.3.0.orig/Wrapping/Java/CMakeLists.txt ++++ VTK-6.3.0/Wrapping/Java/CMakeLists.txt +@@ -80,6 +80,8 @@ if(APPLE) + set(JAVAC_OPTIONS -J-Xmx512m) + endif() + ++set(JAVAC_OPTIONS -J-Xmx1024m) ++ + get_property(java_modules GLOBAL PROPERTY VTK_JAVA_WRAPPED) + foreach(module IN LISTS java_modules) + if(NOT ${module}_EXCLUDE_FROM_WRAPPING) diff --git a/scripts/patches/vtk/7.1/101_java_install_path.patch b/scripts/patches/vtk/7.1/101_java_install_path.patch new file mode 100644 index 0000000..18af20a --- /dev/null +++ b/scripts/patches/vtk/7.1/101_java_install_path.patch @@ -0,0 +1,21 @@ +Description: Install Java modules in the correct path + This patch corrects the installation of the native Java modules + to go to the path given by the Debian Java Policy. This helps + to later use the simple install file to get them to the right + location in the package. +Author: Gert Wollny + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -200,7 +200,7 @@ + endif() + + # default to not using the system GLEW as ours has fixes in it right now +-set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" FORCE) ++set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" ON) + + set(VTK_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) + +--- a/Rendering/OpenGL2/CMakeLists.txt ++++ b/Rendering/OpenGL2/CMakeLists.txt +@@ -353,7 +353,7 @@ + vtk_opengl_link(${vtk-module}) + if(VTK_USE_X) + vtk_module_link_libraries(${vtk-module} +- LINK_PUBLIC ${X11_LIBRARIES} ${X11_Xt_LIB}) ++ LINK_PUBLIC ${GLEW_LIBRARY} ${X11_LIBRARIES} ${X11_Xt_LIB}) + elseif(VTK_USE_COCOA) + vtk_module_link_libraries(${vtk-module} LINK_PUBLIC "-framework Cocoa") + endif() diff --git a/scripts/patches/vtk/7.1/106_install_doxygen_scripts_in_nodoc_build.patch b/scripts/patches/vtk/7.1/106_install_doxygen_scripts_in_nodoc_build.patch new file mode 100644 index 0000000..b395fa2 --- /dev/null +++ b/scripts/patches/vtk/7.1/106_install_doxygen_scripts_in_nodoc_build.patch @@ -0,0 +1,147 @@ +Description: _install_doxygen_scripts_in_nodoc_build +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -540,9 +540,7 @@ + + # The doxygen documentation needs to be aware of all modules. + option(BUILD_DOCUMENTATION "Build the VTK documentation" OFF) +-if(BUILD_DOCUMENTATION) +- add_subdirectory(Utilities/Doxygen) +-endif() ++add_subdirectory(Utilities/Doxygen) + + # If python wrapping and testing is enabled then add driver scripts to run + # tests. Note: Many pythong tests used to be automatically converted from TCL +--- a/Utilities/Doxygen/CMakeLists.txt ++++ b/Utilities/Doxygen/CMakeLists.txt +@@ -1,69 +1,72 @@ + # + # Build the documentation + # +-find_package(Doxygen REQUIRED) +-find_package(Perl REQUIRED) +-find_package(HTMLHelp) +- +-option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) +-option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) +-option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) +-mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) +-if(DOXYGEN_SHORT_NAMES) +- set(DOXYGEN_SHORT_NAMES YES) +-else() +- set(DOXYGEN_SHORT_NAMES NO) +-endif() +-if(DOXYGEN_GENERATE_HTMLHELP) +- set(DOXYGEN_GENERATE_HTMLHELP YES) +-else() +- set(DOXYGEN_GENERATE_HTMLHELP NO) +-endif() +- +-# +-# Configure the script and the doxyfile, then add target +-# +-set(HAVE_DOT_YESNO NO) +-if(DOT) +- set(HAVE_DOT_YESNO YES) +- if(NOT DOT_PATH) +- get_filename_component(DOT_PATH ${DOT} PATH) ++if (BUILD_DOCUMENTATION) ++ find_package(Doxygen REQUIRED) ++ find_package(Perl REQUIRED) ++ find_package(HTMLHelp) ++ ++ option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) ++ option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) ++ option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) ++ mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) ++ if(DOXYGEN_SHORT_NAMES) ++ set(DOXYGEN_SHORT_NAMES YES) ++ else() ++ set(DOXYGEN_SHORT_NAMES NO) + endif() +-endif() +- +-# Build up a list of all module source directories. Note that this should be +-# all source directories and so does not use the normal variables. +-unset(VTK_MODULE_DIRS_DOXYGEN) +-file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") +-foreach(module ${src}) +- get_filename_component(module_BASE ${module} PATH) +- if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") +- # Skip the utilities and third parties directories. ++ if(DOXYGEN_GENERATE_HTMLHELP) ++ set(DOXYGEN_GENERATE_HTMLHELP YES) + else() +- # Use both the source and binary directories, this ensures that +- # generated files will be included, but they may then be architecture, +- # build configuration and/or compiler specific. All source directories +- # are included whether the module is enabled or not. +- set(VTK_MODULE_DIRS_DOXYGEN +- "${VTK_MODULE_DIRS_DOXYGEN} ++ set(DOXYGEN_GENERATE_HTMLHELP NO) ++ endif() ++ ++ # ++ # Configure the script and the doxyfile, then add target ++ # ++ set(HAVE_DOT_YESNO NO) ++ if(DOT) ++ set(HAVE_DOT_YESNO YES) ++ if(NOT DOT_PATH) ++ get_filename_component(DOT_PATH ${DOT} PATH) ++ endif() ++ endif() ++ ++ # Build up a list of all module source directories. Note that this should be ++ # all source directories and so does not use the normal variables. ++ unset(VTK_MODULE_DIRS_DOXYGEN) ++ file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") ++ foreach(module ${src}) ++ get_filename_component(module_BASE ${module} PATH) ++ if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") ++ # Skip the utilities and third parties directories. ++ else() ++ # Use both the source and binary directories, this ensures that ++ # generated files will be included, but they may then be architecture, ++ # build configuration and/or compiler specific. All source directories ++ # are included whether the module is enabled or not. ++ set(VTK_MODULE_DIRS_DOXYGEN ++ "${VTK_MODULE_DIRS_DOXYGEN} + \"${VTK_SOURCE_DIR}/${module_BASE}\" + \"${VTK_BINARY_DIR}/${module_BASE}\"") +- endif() +-endforeach() ++ endif() ++ endforeach() ++ ++ configure_file( ++ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in ++ ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) ++ ++ configure_file( ++ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in ++ ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake ++ @ONLY) ++ ++ add_custom_target(DoxygenDoc ++ ${CMAKE_COMMAND} ++ -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake ++ DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) + +-configure_file( +- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in +- ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) +- +-configure_file( +- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in +- ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake +- @ONLY) +- +-add_custom_target(DoxygenDoc +- ${CMAKE_COMMAND} +- -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake +- DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) ++endif() + + if(NOT VTK_INSTALL_NO_DOCUMENTATION) + macro(__vtk_install_documentation_files glob) diff --git a/scripts/patches/vtk/7.1/108_Doxygen-use-mathjax.patch b/scripts/patches/vtk/7.1/108_Doxygen-use-mathjax.patch new file mode 100644 index 0000000..075b4fc --- /dev/null +++ b/scripts/patches/vtk/7.1/108_Doxygen-use-mathjax.patch @@ -0,0 +1,29 @@ +Description: _Doxygen use mathjax +--- a/Utilities/Doxygen/CMakeLists.txt ++++ b/Utilities/Doxygen/CMakeLists.txt +@@ -52,6 +52,13 @@ + endif() + endforeach() + ++ FIND_PATH(MATHJAX_CODEFILE MathJax.js ++ PATHS ++ /usr/share/mathjax/ ++ /usr/share/javascript/ ++ /usr/share/javascript/mathjax/ ++ ) ++ + configure_file( + ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in + ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) +--- a/Utilities/Doxygen/doxyfile.in ++++ b/Utilities/Doxygen/doxyfile.in +@@ -19,6 +19,9 @@ + GENERATE_TAGFILE = "@VTK_BINARY_DIR@/Utilities/Doxygen/vtk@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@.tag" + + PDF_HYPERLINKS = YES ++USE_MATHJAX = YES ++MATHJAX_RELPATH = @MATHJAX_CODEFILE@ ++ + + HAVE_DOT = @HAVE_DOT_YESNO@ + DOT_PATH = "@DOT_PATH@" diff --git a/scripts/patches/vtk/7.1/109_java-jar-nonjavafiles.patch b/scripts/patches/vtk/7.1/109_java-jar-nonjavafiles.patch new file mode 100644 index 0000000..4239e6d --- /dev/null +++ b/scripts/patches/vtk/7.1/109_java-jar-nonjavafiles.patch @@ -0,0 +1,28 @@ +Author: Gert Wollny +Description: Delete java files before building jar +--- a/Wrapping/Java/CMakeLists.txt ++++ b/Wrapping/Java/CMakeLists.txt +@@ -259,7 +259,7 @@ + if(VTK_JAVA_SWT_COMPONENT) + set(VTK_JAVA_SAMPLE_DEPENDENCIES ${VTK_JAVA_SAMPLE_DEPENDENCIES} + rendering/SwtConeRendering +- ) ++q ) + endif() + endif() + +@@ -358,11 +358,10 @@ + COMMENT "Compiling Java Classes" + ) + +-# Create the JAR file containing all compiled classes and ++ + add_custom_command( +- COMMAND ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" +- -C ${VTK_BINARY_DIR}/java +- vtk ++ COMMAND cd ${VTK_BINARY_DIR}/java && find . -name "*.class" -print | sort -u > classes.list ++ COMMAND cd ${VTK_BINARY_DIR}/java && ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" @${VTK_BINARY_DIR}/java/classes.list + DEPENDS ${VTK_BINARY_DIR}/java/javac_stamp.txt ${JAVA_LIBRARIES} + OUTPUT ${VTK_JAR_PATH}/vtk.jar + COMMENT "Java Archive" diff --git a/scripts/patches/vtk/7.1/10_allpatches.patch b/scripts/patches/vtk/7.1/10_allpatches.patch new file mode 100644 index 0000000..7e29239 --- /dev/null +++ b/scripts/patches/vtk/7.1/10_allpatches.patch @@ -0,0 +1,44 @@ +Description: + TODO: Put a short summary on the line above and replace this paragraph + with a longer explanation of this change. Complete the meta-information + with other relevant fields (see below for details). To make it easier, the + information below has been extracted from the changelog. Adjust it or drop + it. + . + vtk (5.8.0-13) unstable; urgency=low + . + * Make sure to include VTK/QT cmake file. Closes: #656115 + * Revert back to libtiff4-dev and use libtiff-dev in d/control. Closes: #674998 + * Fix tkInt.h installation, using proper cmake magic. Closes: #674169 + * Make sure to discover init.tcl properly. Closes: #673245 +Bug-Debian: https://bugs.debian.org/656115 +Bug-Debian: https://bugs.debian.org/673245 +Bug-Debian: https://bugs.debian.org/674169 +Bug-Debian: https://bugs.debian.org/674998 +Author: Mathieu Malaterre +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +Index: VTK-6.2.0/Wrapping/Tcl/vtkTkAppInit.cxx +=================================================================== +--- VTK-6.2.0.orig/Wrapping/Tcl/vtkTkAppInit.cxx ++++ VTK-6.2.0/Wrapping/Tcl/vtkTkAppInit.cxx +@@ -165,6 +165,8 @@ int Tcl_AppInit(Tcl_Interp *interp) + // Help Tcl find the Tcl/Tk helper files. + const char* relative_dirs[] = + { ++ "../share/tcltk", ++ "../../share/tcltk", + "TclTk/lib", + ".." VTK_INSTALL_TCL_DIR, + 0 diff --git a/scripts/patches/vtk/7.1/110_python-371.patch b/scripts/patches/vtk/7.1/110_python-371.patch new file mode 100644 index 0000000..375624e --- /dev/null +++ b/scripts/patches/vtk/7.1/110_python-371.patch @@ -0,0 +1,16 @@ +Author: Gert Wollny +Description: Work around compile bug with python 3.7.1 +Debian-Bug: https://bugs.debian.org/914347 +diff --git a/Wrapping/PythonCore/vtkPythonArgs.cxx b/Wrapping/PythonCore/vtkPythonArgs.cxx +index 1b1e4b9..682f8b8 100644 +--- a/Wrapping/PythonCore/vtkPythonArgs.cxx ++++ b/Wrapping/PythonCore/vtkPythonArgs.cxx +@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext) + else if (PyUnicode_Check(o)) + { + #if PY_VERSION_HEX >= 0x03030000 +- a = PyUnicode_AsUTF8(o); ++ a = const_cast(PyUnicode_AsUTF8(o)); + return true; + #else + PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL); diff --git a/scripts/patches/vtk/7.1/111_fix_perl.patch b/scripts/patches/vtk/7.1/111_fix_perl.patch new file mode 100644 index 0000000..c79c07a --- /dev/null +++ b/scripts/patches/vtk/7.1/111_fix_perl.patch @@ -0,0 +1,66 @@ +Author: Gert Wollny +Description: Fix the perl shebangs (lintian) +--- a/Utilities/Doxygen/doc_class2example.pl ++++ b/Utilities/Doxygen/doc_class2example.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2004-06-09 11:12:38 barre> + # + # Build cross-references between classes and examples +--- a/Utilities/Doxygen/doc_cleanhtml.pl ++++ b/Utilities/Doxygen/doc_cleanhtml.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-10-25 20:17:59 barre> + # + # Clean the HTML generated by Doxygen to remove some layout quicks +--- a/Utilities/Doxygen/doc_codematch.pl ++++ b/Utilities/Doxygen/doc_codematch.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-01-18 16:17:26 barre> + # + # Summary ? +--- a/Utilities/Doxygen/doc_contributors.pl ++++ b/Utilities/Doxygen/doc_contributors.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-11-01 15:33:04 barre> + # + # Get author and contributors. +--- a/Utilities/Doxygen/doc_header2doxygen.pl ++++ b/Utilities/Doxygen/doc_header2doxygen.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2011-01-16 21:15:53 barre> + # + # Convert VTK headers to doxygen format +--- a/Utilities/Doxygen/doc_index.pl ++++ b/Utilities/Doxygen/doc_index.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2001-11-21 17:40:48 barre> + # + # Build full-text index +--- a/Utilities/Doxygen/doc_rmpath.pl ++++ b/Utilities/Doxygen/doc_rmpath.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2001-10-05 11:49:40 barre> + # + # Remove path to intermediate Doxygen dir from html doc +--- a/Utilities/Doxygen/doc_version.pl ++++ b/Utilities/Doxygen/doc_version.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2006-11-15 13:25:02 barre> + # + # Extract VTK version and add it to documentation diff --git a/scripts/patches/vtk/7.1/112_riscv_support.patch b/scripts/patches/vtk/7.1/112_riscv_support.patch new file mode 100644 index 0000000..6b9f4bd --- /dev/null +++ b/scripts/patches/vtk/7.1/112_riscv_support.patch @@ -0,0 +1,15 @@ +Changes taken from https://gitlab.kitware.com/vtk/vtk/blob/master/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h + +--- vtk7-7.1.1+dfsg1.orig/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h ++++ vtk7-7.1.1+dfsg1/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h +@@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY wa + #elif defined(__XTENSA_EL__) + # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + ++/* RISC-V */ ++#elif defined(__riscv) || defined(__riscv__) ++# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE ++ + /* Unknown CPU */ + #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) + # error "Byte order of target CPU unknown." diff --git a/scripts/patches/vtk/7.1/113_fix_python_equal.patch b/scripts/patches/vtk/7.1/113_fix_python_equal.patch new file mode 100644 index 0000000..4ca9e5e --- /dev/null +++ b/scripts/patches/vtk/7.1/113_fix_python_equal.patch @@ -0,0 +1,14 @@ +Description: Fix comparison with literal +Author: Gert Wollny +Debian-Bug: https://bugs.debian.org/950539 +--- a/Wrapping/Python/vtk/numpy_interface/algorithms.py ++++ b/Wrapping/Python/vtk/numpy_interface/algorithms.py +@@ -197,7 +197,7 @@ + return dsa.NoneArray; + + if res is dsa.NoneArray: +- if max_dims is 1: ++ if max_dims == 1: + # Weird trick to make the array look like a scalar + max_dims = () + res = numpy.empty(max_dims) diff --git a/scripts/patches/vtk/7.1/115_support-gcc10.patch b/scripts/patches/vtk/7.1/115_support-gcc10.patch new file mode 100644 index 0000000..182d112 --- /dev/null +++ b/scripts/patches/vtk/7.1/115_support-gcc10.patch @@ -0,0 +1,11 @@ +--- a/CMake/VTKGenerateExportHeader.cmake ++++ b/CMake/VTKGenerateExportHeader.cmake +@@ -174,7 +174,7 @@ + execute_process(COMMAND ${CMAKE_C_COMPILER} --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) +- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the + # patch level, handle this here: diff --git a/scripts/patches/vtk/7.1/20_soversion-sharedlib.patch b/scripts/patches/vtk/7.1/20_soversion-sharedlib.patch new file mode 100644 index 0000000..dfa6165 --- /dev/null +++ b/scripts/patches/vtk/7.1/20_soversion-sharedlib.patch @@ -0,0 +1,25 @@ +Description: _soversion sharedlib +--- a/CMake/vtkModuleMacros.cmake ++++ b/CMake/vtkModuleMacros.cmake +@@ -417,8 +417,8 @@ + function(vtk_target_name _name) + get_property(_type TARGET ${_name} PROPERTY TYPE) + if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL) +- set_property(TARGET ${_name} PROPERTY VERSION 1) +- set_property(TARGET ${_name} PROPERTY SOVERSION 1) ++ set_property(TARGET ${_name} PROPERTY VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}) ++ set_property(TARGET ${_name} PROPERTY SOVERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) + endif() + if("${_name}" MATCHES "^[Vv][Tt][Kk]") + set(_vtk "") +--- a/Rendering/Tk/CMakeLists.txt ++++ b/Rendering/Tk/CMakeLists.txt +@@ -118,7 +118,7 @@ + vtk_target_install(vtkRenderingPythonTkWidgets) + + set_property(TARGET vtkRenderingPythonTkWidgets PROPERTY OUTPUT_NAME +- vtkRenderingPythonTkWidgets-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) ++ vtkRenderingPythonTkWidgets) + + set(Module_PYTHON_LIBS ${VTK_TK_LIBRARIES}) + if(VTK_USE_X) diff --git a/scripts/patches/vtk/7.1/30_matplotlib.patch b/scripts/patches/vtk/7.1/30_matplotlib.patch new file mode 100644 index 0000000..2628a9d --- /dev/null +++ b/scripts/patches/vtk/7.1/30_matplotlib.patch @@ -0,0 +1,14 @@ +Description: _matplotlib +--- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h ++++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h +@@ -156,6 +156,10 @@ + * to implement IsAvailable. + */ + static Availability CheckMPLAvailability(); ++ static void DisableMPL() ++ { ++ MPLMathTextAvailable = UNAVAILABLE; ++ }; + + //@{ + /** diff --git a/scripts/patches/vtk/7.1/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch b/scripts/patches/vtk/7.1/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch new file mode 100644 index 0000000..87f1e8d --- /dev/null +++ b/scripts/patches/vtk/7.1/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch @@ -0,0 +1,25 @@ +From dae1718d50bec1b40b860280acafbdd94fc4cd5d Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Sat, 21 Nov 2020 13:37:34 -0500 +Subject: [PATCH] vtkFreeTypeTools: avoid using an internal macro + +This macro has been removed upstream as it was always intended to be +private. +--- + Rendering/FreeType/vtkFreeTypeTools.cxx | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +Index: vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx +=================================================================== +--- vtk7.orig/Rendering/FreeType/vtkFreeTypeTools.cxx ++++ vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx +@@ -273,8 +273,7 @@ + } + + //---------------------------------------------------------------------------- +-FT_CALLBACK_DEF(FT_Error) +-vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) diff --git a/scripts/patches/vtk/7.1/40_use_system_sqlite.patch b/scripts/patches/vtk/7.1/40_use_system_sqlite.patch new file mode 100644 index 0000000..ac54357 --- /dev/null +++ b/scripts/patches/vtk/7.1/40_use_system_sqlite.patch @@ -0,0 +1,544 @@ +Description: Use system sqlite +Bug-Debian: https://bugs.debian.org/750183 +Author: Anton Gladky +Last-Update: 2014-06-03 +--- a/IO/SQL/vtkSQLiteDatabase.cxx ++++ b/IO/SQL/vtkSQLiteDatabase.cxx +@@ -29,7 +29,7 @@ + #include + #include + +-#include ++#include + + vtkStandardNewMacro(vtkSQLiteDatabase); + +@@ -307,15 +307,15 @@ + } + } + +- int result = vtk_sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance)); ++ int result = sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance)); + +- if (result != VTK_SQLITE_OK) ++ if (result != SQLITE_OK) + { + vtkDebugMacro(<<"SQLite open() failed. Error code is " + << result << " and message is " +- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); ++ << sqlite3_errmsg(this->SQLiteInstance) ); + +- vtk_sqlite3_close(this->SQLiteInstance); ++ sqlite3_close(this->SQLiteInstance); + return false; + } + else +@@ -334,8 +334,8 @@ + } + else + { +- int result = vtk_sqlite3_close(this->SQLiteInstance); +- if (result != VTK_SQLITE_OK) ++ int result = sqlite3_close(this->SQLiteInstance); ++ if (result != SQLITE_OK) + { + vtkWarningMacro(<< "Close(): SQLite returned result code " << result); + } +@@ -368,13 +368,13 @@ + } + + vtkSQLQuery *query = this->GetQueryInstance(); +- query->SetQuery("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"); ++ query->SetQuery("SELECT name FROM sqlite3_master WHERE type='table' ORDER BY name"); + bool status = query->Execute(); + + if (!status) + { + vtkErrorMacro(<< "GetTables(): Database returned error: " +- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); ++ << sqlite3_errmsg(this->SQLiteInstance) ); + query->Delete(); + return this->Tables; + } +@@ -403,7 +403,7 @@ + if (!status) + { + vtkErrorMacro(<< "GetRecord(" << table << "): Database returned error: " +- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); ++ << sqlite3_errmsg(this->SQLiteInstance) ); + query->Delete(); + return NULL; + } +@@ -467,10 +467,10 @@ + // ---------------------------------------------------------------------- + bool vtkSQLiteDatabase::HasError() + { +- return (vtk_sqlite3_errcode(this->SQLiteInstance)!=VTK_SQLITE_OK); ++ return (sqlite3_errcode(this->SQLiteInstance)!=SQLITE_OK); + } + + const char* vtkSQLiteDatabase::GetLastErrorText() + { +- return vtk_sqlite3_errmsg(this->SQLiteInstance); ++ return sqlite3_errmsg(this->SQLiteInstance); + } +--- a/IO/SQL/vtkSQLiteDatabase.h ++++ b/IO/SQL/vtkSQLiteDatabase.h +@@ -52,7 +52,7 @@ + class vtkSQLQuery; + class vtkSQLiteQuery; + class vtkStringArray; +-struct vtk_sqlite3; ++struct sqlite3; + + class VTKIOSQL_EXPORT vtkSQLiteDatabase : public vtkSQLDatabase + { +@@ -167,7 +167,7 @@ + virtual bool ParseURL(const char* url); + + private: +- vtk_sqlite3 *SQLiteInstance; ++ sqlite3 *SQLiteInstance; + + // We want this to be private, a user of this class + // should not be setting this for any reason +--- a/IO/SQL/vtkSQLiteQuery.cxx ++++ b/IO/SQL/vtkSQLiteQuery.cxx +@@ -25,7 +25,7 @@ + #include "vtkVariant.h" + #include "vtkVariantArray.h" + +-#include ++#include + + #include + +@@ -43,7 +43,7 @@ + { + this->Statement = NULL; + this->InitialFetch = true; +- this->InitialFetchResult=VTK_SQLITE_DONE; ++ this->InitialFetchResult=SQLITE_DONE; + this->LastErrorText = NULL; + this->TransactionInProgress = false; + } +@@ -61,7 +61,7 @@ + { + if (this->Database != NULL) + { +- vtk_sqlite3_finalize(this->Statement); ++ sqlite3_finalize(this->Statement); + this->Statement = NULL; + } + } +@@ -128,8 +128,8 @@ + if (this->Statement) + { + vtkDebugMacro(<<"Finalizing old statement"); +- int finalizeStatus = vtk_sqlite3_finalize(this->Statement); +- if (finalizeStatus != VTK_SQLITE_OK) ++ int finalizeStatus = sqlite3_finalize(this->Statement); ++ if (finalizeStatus != SQLITE_OK) + { + vtkWarningMacro(<<"SetQuery(): Finalize returned unexpected code " + << finalizeStatus); +@@ -148,19 +148,19 @@ + return false; + } + +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + const char *unused_statement; + +- int prepareStatus = vtk_sqlite3_prepare_v2(db, ++ int prepareStatus = sqlite3_prepare_v2(db, + this->Query, + static_cast(strlen(this->Query)), + &this->Statement, + &unused_statement); + +- if (prepareStatus != VTK_SQLITE_OK) ++ if (prepareStatus != SQLITE_OK) + { +- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); +- vtkWarningMacro(<<"SetQuery(): vtk_sqlite3_prepare_v2() failed with error message " ++ this->SetLastErrorText(sqlite3_errmsg(db)); ++ vtkWarningMacro(<<"SetQuery(): sqlite3_prepare_v2() failed with error message " + << this->GetLastErrorText() + << " on statement: '" + << this->Query << "'"); +@@ -191,31 +191,31 @@ + } + else + { +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + + vtkDebugMacro(<<"Execute(): Query ready to execute."); + + this->InitialFetch = true; +- int result = vtk_sqlite3_step(this->Statement); ++ int result = sqlite3_step(this->Statement); + this->InitialFetchResult = result; + +- if (result == VTK_SQLITE_DONE) ++ if (result == SQLITE_DONE) + { + this->SetLastErrorText(NULL); + this->Active = true; + return true; + } +- else if (result != VTK_SQLITE_ROW) ++ else if (result != SQLITE_ROW) + { + vtkSQLiteDatabase *dbContainer = + vtkSQLiteDatabase::SafeDownCast(this->Database); + assert(dbContainer != NULL); + +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + +- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); +- vtkDebugMacro(<< "Execute(): vtk_sqlite3_step() returned error message " ++ this->SetLastErrorText(sqlite3_errmsg(db)); ++ vtkDebugMacro(<< "Execute(): sqlite3_step() returned error message " + << this->GetLastErrorText()); + this->Active = false; + return false; +@@ -236,7 +236,7 @@ + } + else + { +- return vtk_sqlite3_column_count(this->Statement); ++ return sqlite3_column_count(this->Statement); + } + } + +@@ -256,7 +256,7 @@ + } + else + { +- return vtk_sqlite3_column_name(this->Statement, column); ++ return sqlite3_column_name(this->Statement, column); + } + } + +@@ -276,22 +276,22 @@ + } + else + { +- switch (vtk_sqlite3_column_type(this->Statement, column)) ++ switch (sqlite3_column_type(this->Statement, column)) + { +- case VTK_SQLITE_INTEGER: ++ case SQLITE_INTEGER: + return VTK_INT; +- case VTK_SQLITE_FLOAT: ++ case SQLITE_FLOAT: + return VTK_FLOAT; +- case VTK_SQLITE_TEXT: ++ case SQLITE_TEXT: + return VTK_STRING; +- case VTK_SQLITE_BLOB: ++ case SQLITE_BLOB: + return VTK_STRING; // until we have a BLOB type of our own +- case VTK_SQLITE_NULL: ++ case SQLITE_NULL: + return VTK_VOID; // ??? what makes sense here? + default: + { + vtkErrorMacro(<<"GetFieldType(): Unknown data type " +- << vtk_sqlite3_column_type(this->Statement, column) ++ << sqlite3_column_type(this->Statement, column) + <<" from SQLite."); + return VTK_VOID; + } +@@ -312,7 +312,7 @@ + { + vtkDebugMacro(<<"NextRow(): Initial fetch being handled."); + this->InitialFetch = false; +- if (this->InitialFetchResult == VTK_SQLITE_DONE) ++ if (this->InitialFetchResult == SQLITE_DONE) + { + return false; + } +@@ -323,12 +323,12 @@ + } + else + { +- int result = vtk_sqlite3_step(this->Statement); +- if (result == VTK_SQLITE_DONE) ++ int result = sqlite3_step(this->Statement); ++ if (result == SQLITE_DONE) + { + return false; + } +- else if (result == VTK_SQLITE_ROW) ++ else if (result == SQLITE_ROW) + { + return true; + } +@@ -336,8 +336,8 @@ + { + vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); + assert(dbContainer != NULL); +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; +- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); ++ sqlite3 *db = dbContainer->SQLiteInstance; ++ this->SetLastErrorText(sqlite3_errmsg(db)); + vtkErrorMacro(<<"NextRow(): Database returned error code " + << result << " with the following message: " + << this->GetLastErrorText()); +@@ -363,33 +363,33 @@ + } + else + { +- switch (vtk_sqlite3_column_type(this->Statement, column)) ++ switch (sqlite3_column_type(this->Statement, column)) + { +- case VTK_SQLITE_INTEGER: +- return vtkVariant(vtk_sqlite3_column_int(this->Statement, column)); ++ case SQLITE_INTEGER: ++ return vtkVariant(sqlite3_column_int(this->Statement, column)); + +- case VTK_SQLITE_FLOAT: +- return vtkVariant(vtk_sqlite3_column_double(this->Statement, column)); ++ case SQLITE_FLOAT: ++ return vtkVariant(sqlite3_column_double(this->Statement, column)); + +- case VTK_SQLITE_TEXT: ++ case SQLITE_TEXT: + { + std::ostringstream str; +- str << vtk_sqlite3_column_text(this->Statement, column); ++ str << sqlite3_column_text(this->Statement, column); + return vtkVariant(vtkStdString(str.str())); + } + +- case VTK_SQLITE_BLOB: ++ case SQLITE_BLOB: + { + // This is a hack ... by passing the BLOB to vtkStdString with an explicit + // byte count, we ensure that the string will store all of the BLOB's bytes, + // even if there are NULL values. + + return vtkVariant(vtkStdString( +- static_cast(vtk_sqlite3_column_blob(this->Statement, column)), +- vtk_sqlite3_column_bytes(this->Statement, column))); ++ static_cast(sqlite3_column_blob(this->Statement, column)), ++ sqlite3_column_bytes(this->Statement, column))); + } + +- case VTK_SQLITE_NULL: ++ case SQLITE_NULL: + default: + return vtkVariant(); + } +@@ -420,11 +420,11 @@ + vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); + assert(dbContainer != NULL); + +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + char *errorMessage = NULL; +- int result = vtk_sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage); ++ int result = sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage); + +- if (result == VTK_SQLITE_OK) ++ if (result == SQLITE_OK) + { + this->TransactionInProgress = true; + this->SetLastErrorText(NULL); +@@ -448,7 +448,7 @@ + { + if (this->Statement) + { +- vtk_sqlite3_finalize(this->Statement); ++ sqlite3_finalize(this->Statement); + this->Statement = NULL; + } + +@@ -460,11 +460,11 @@ + + vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); + assert(dbContainer != NULL); +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + char *errorMessage = NULL; +- int result = vtk_sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage); ++ int result = sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage); + +- if (result == VTK_SQLITE_OK) ++ if (result == SQLITE_OK) + { + this->TransactionInProgress = false; + this->SetLastErrorText(NULL); +@@ -496,11 +496,11 @@ + + vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); + assert(dbContainer != NULL); +- vtk_sqlite3 *db = dbContainer->SQLiteInstance; ++ sqlite3 *db = dbContainer->SQLiteInstance; + char *errorMessage = NULL; +- int result = vtk_sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage); ++ int result = sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage); + +- if (result == VTK_SQLITE_OK) ++ if (result == SQLITE_OK) + { + this->TransactionInProgress = false; + this->SetLastErrorText(NULL); +@@ -644,14 +644,14 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } +- int status = vtk_sqlite3_bind_int(this->Statement, index+1, value); ++ int status = sqlite3_bind_int(this->Statement, index+1, value); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_int returned error: " << status; ++ errormessage << "sqlite3_bind_int returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } +- int status = vtk_sqlite3_bind_int(this->Statement, index+1, static_cast(value)); ++ int status = sqlite3_bind_int(this->Statement, index+1, static_cast(value)); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_int64 returned error: " << status; ++ errormessage << "sqlite3_bind_int64 returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +@@ -702,15 +702,15 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + +- int status = vtk_sqlite3_bind_double(this->Statement, index+1, value); ++ int status = sqlite3_bind_double(this->Statement, index+1, value); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_double returned error: " << status; ++ errormessage << "sqlite3_bind_double returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +@@ -731,15 +731,15 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + +- int status = vtk_sqlite3_bind_text(this->Statement, index+1, value, length, VTK_SQLITE_TRANSIENT); ++ int status = sqlite3_bind_text(this->Statement, index+1, value, length, SQLITE_TRANSIENT); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_text returned error: " << status; ++ errormessage << "sqlite3_bind_text returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +@@ -760,20 +760,20 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + + int status = +- vtk_sqlite3_bind_blob(this->Statement, ++ sqlite3_bind_blob(this->Statement, + index+1, + data, + length, +- VTK_SQLITE_TRANSIENT); ++ SQLITE_TRANSIENT); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_bind_blob returned error: " << status; ++ errormessage << "sqlite3_bind_blob returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +@@ -794,15 +794,15 @@ + if (this->Active) + { + this->Active = false; +- vtk_sqlite3_reset(this->Statement); ++ sqlite3_reset(this->Statement); + } + +- int status = vtk_sqlite3_clear_bindings(this->Statement); ++ int status = sqlite3_clear_bindings(this->Statement); + +- if (status != VTK_SQLITE_OK) ++ if (status != SQLITE_OK) + { + std::ostringstream errormessage; +- errormessage << "sqlite_clear_bindings returned error: " << status; ++ errormessage << "sqlite3_clear_bindings returned error: " << status; + this->SetLastErrorText(errormessage.str().c_str()); + vtkErrorMacro(<GetLastErrorText()); + return false; +--- a/IO/SQL/vtkSQLiteQuery.h ++++ b/IO/SQL/vtkSQLiteQuery.h +@@ -50,7 +50,7 @@ + class vtkSQLiteDatabase; + class vtkVariant; + class vtkVariantArray; +-struct vtk_sqlite3_stmt; ++struct sqlite3_stmt; + + class VTKIOSQL_EXPORT vtkSQLiteQuery : public vtkSQLQuery + { +@@ -175,7 +175,7 @@ + vtkSQLiteQuery(const vtkSQLiteQuery &) VTK_DELETE_FUNCTION; + void operator=(const vtkSQLiteQuery &) VTK_DELETE_FUNCTION; + +- vtk_sqlite3_stmt *Statement; ++ sqlite3_stmt *Statement; + bool InitialFetch; + int InitialFetchResult; + char *LastErrorText; +--- a/ThirdParty/sqlite/CMakeLists.txt ++++ b/ThirdParty/sqlite/CMakeLists.txt +@@ -1,4 +1,4 @@ + set(vtksqlite_THIRD_PARTY 1) +-set(vtksqlite_LIBRARIES vtksqlite) ++set(vtksqlite_LIBRARIES sqlite3) + vtk_module_export_info() +-add_subdirectory(vtksqlite) ++ diff --git a/scripts/patches/vtk/7.1/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch b/scripts/patches/vtk/7.1/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch new file mode 100644 index 0000000..8267266 --- /dev/null +++ b/scripts/patches/vtk/7.1/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch @@ -0,0 +1,23 @@ +From 31e8e4ebeb3152f7cfdb3f14f24f7e5d31a4f8b5 Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Sun, 22 Nov 2020 20:04:19 -0500 +Subject: [PATCH] vtkFontConfigFreeTypeTools: remove last FT_CALLBACK_DEF usage + +--- + Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +index 5c1908cf24b..818ff058bb9 100644 +--- a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx ++++ b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +@@ -31,8 +31,7 @@ vtkStandardNewMacro(vtkFontConfigFreeTypeTools); + namespace + { + // The FreeType face requester callback: +-FT_CALLBACK_DEF(FT_Error) +-vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) diff --git a/scripts/patches/vtk/7.1/60_use_system_mpi4py.patch b/scripts/patches/vtk/7.1/60_use_system_mpi4py.patch new file mode 100644 index 0000000..b685d6b --- /dev/null +++ b/scripts/patches/vtk/7.1/60_use_system_mpi4py.patch @@ -0,0 +1,33 @@ +Description: use system mpi4py +Author: Anton Gladky +Last-Update: 2015-03-24 + +--- a/Parallel/MPI4Py/CMakeLists.txt ++++ b/Parallel/MPI4Py/CMakeLists.txt +@@ -18,7 +18,7 @@ + mark_as_advanced(MPI4PY_INCLUDE_DIR) + endif() + else() +- set(MPI4PY_INCLUDE_DIR "${vtkmpi4py_SOURCE_DIR}/vtkmpi4py/src/include") ++ set(MPI4PY_INCLUDE_DIR "/usr/include") + endif() + include_directories("${MPI4PY_INCLUDE_DIR}") + +--- a/Parallel/MPI4Py/module.cmake ++++ b/Parallel/MPI4Py/module.cmake +@@ -2,8 +2,6 @@ + vtk_module(vtkParallelMPI4Py + GROUPS + MPI +- COMPILE_DEPENDS +- vtkmpi4py + EXCLUDE_FROM_TCL_WRAPPING + EXCLUDE_FROM_JAVA_WRAPPING + KIT +@@ -14,4 +12,4 @@ + PRIVATE_DEPENDS + vtkParallelMPI + ) +-endif () +\ No newline at end of file ++endif () diff --git a/scripts/patches/vtk/7.1/70_fix_ftbfs_gcc49.patch b/scripts/patches/vtk/7.1/70_fix_ftbfs_gcc49.patch new file mode 100644 index 0000000..e41874d --- /dev/null +++ b/scripts/patches/vtk/7.1/70_fix_ftbfs_gcc49.patch @@ -0,0 +1,127 @@ +Description: fix compilation with gcc-4.9 +Bug-Debian: https://bugs.debian.org/746923 +Forwarded: https://github.com/Kitware/VTK/pull/7 +Author: Anton Gladky +Last-Update: 2014-05-30 +--- a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx ++++ b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx +@@ -1113,7 +1113,10 @@ + vtkIdType cellsPerNode = numTotalCells / nprocs; + + vtkIdList **sendCells = new vtkIdList * [ nprocs ]; +- memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); ++ ++ if (sizeof(vtkIdList *) * nprocs > 0) { ++ memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); ++ } + + if (numConsumers == nprocs - 1) + { +@@ -1598,7 +1601,9 @@ + // Exchange int arrays + + float **recvArrays = new float * [nprocs]; +- memset(recvArrays, 0, sizeof(float *) * nprocs); ++ if (sizeof(float *) * nprocs > 0) { ++ memset(recvArrays, 0, sizeof(float *) * nprocs); ++ } + + if (sendSize[me] > 0) // sent myself an array + { +@@ -1720,7 +1725,9 @@ + // Exchange int arrays + + vtkIdType **recvArrays = new vtkIdType * [nprocs]; +- memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); ++ if (sizeof(vtkIdType *) * nprocs > 0) { ++ memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); ++ } + + if (sendSize[me] > 0) // sent myself an array + { +@@ -2789,7 +2796,9 @@ + + unsigned char *vals = new unsigned char [npoints]; + +- memset(vals, val, npoints); ++ if (npoints > 0) { ++ memset(vals, val, npoints); ++ } + + vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); + Array->SetName(arrayName); +@@ -2809,7 +2818,9 @@ + + unsigned char *vals = new unsigned char [ncells]; + +- memset(vals, val, ncells); ++ if (ncells > 0) { ++ memset(vals, val, ncells); ++ } + + vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); + Array->SetName(arrayName); +@@ -3008,7 +3019,9 @@ + vtkIdType nGridPoints = grid->GetNumberOfPoints(); + + vtkIdType *numPointsOutside = new vtkIdType [nprocs]; +- memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); ++ if (sizeof(vtkIdType) * nprocs > 0) { ++ memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); ++ } + + vtkIdTypeArray *globalIds = vtkIdTypeArray::New(); + globalIds->SetNumberOfValues(nGridPoints); +@@ -3090,10 +3103,16 @@ + // global ID back? + + vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs]; +- memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); ++ ++ if (sizeof(vtkFloatArray *) * nprocs > 0) { ++ memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); ++ } + + vtkIdTypeArray **localIds = new vtkIdTypeArray * [nprocs]; +- memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ ++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { ++ memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + vtkIdType *next = new vtkIdType [nprocs]; + vtkIdType *next3 = new vtkIdType [nprocs]; +@@ -3268,7 +3287,9 @@ + { + // There are no cells in my assigned region + +- memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { ++ memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + return gids; + } +@@ -3473,7 +3494,10 @@ + std::multimap::iterator mapIt; + + vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs]; +- memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); ++ ++ if (sizeof (vtkIdTypeArray *) * nprocs > 0) { ++ memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); ++ } + + for (int i=0; iGetNumberOfPoints(); + + vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs]; +- memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ if (sizeof(vtkIdTypeArray *) * nprocs) { ++ memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + if (numPoints < 1) + { diff --git a/scripts/patches/vtk/7.1/80_fix_arm_compilation.patch b/scripts/patches/vtk/7.1/80_fix_arm_compilation.patch new file mode 100644 index 0000000..f4be290 --- /dev/null +++ b/scripts/patches/vtk/7.1/80_fix_arm_compilation.patch @@ -0,0 +1,25 @@ +Description: Drop some examples, which require Qt + It is necessary for the fixing of arm-compilation + where Qt is not available +Author: Anton Gladky +Bug-Debian: https://bugs.debian.org/793304 +Last-Update: 2015-07-29 + +--- a/Examples/Infovis/Cxx/CMakeLists.txt ++++ b/Examples/Infovis/Cxx/CMakeLists.txt +@@ -48,15 +48,6 @@ + target_link_LIBRARIES(MultiView ${VTK_LIBRARIES}) + endif() + +-# If Qt is enabled include the QT based examples +-if(vtkGUISupportQt_LOADED AND vtkViewsQt_LOADED) +- add_subdirectory(EasyView) +- add_subdirectory(CustomLinkView) +- if(vtkIOSQL_LOADED) +- add_subdirectory(StatsView) +- endif() +-endif() +- + if(vtkInfovisParallel_LOADED) + add_executable(ParallelBFS ParallelBFS.cxx) + find_package(MPI REQUIRED) diff --git a/scripts/patches/vtk/7.1/99-hdf5-1.10-compatibility b/scripts/patches/vtk/7.1/99-hdf5-1.10-compatibility new file mode 100644 index 0000000..1f3c0c7 --- /dev/null +++ b/scripts/patches/vtk/7.1/99-hdf5-1.10-compatibility @@ -0,0 +1,38 @@ +Description: The H5FD_class_t struct gained an extra member in 1.10 +Bug-Debian: https://bugs.debian.org/846372 +Author: Iain Lane +--- a/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx ++++ b/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx +@@ -139,7 +139,11 @@ + #if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) + static haddr_t H5FD_dsm_get_eoa(const H5FD_t *_file, H5FD_mem_t type); + static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) ++static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type); ++#else + static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file); ++#endif + #else + static haddr_t H5FD_dsm_get_eoa(H5FD_t *_file); + static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, haddr_t addr); +@@ -155,6 +159,9 @@ + "dsm", /*name */ + MAXADDR, /*maxaddr */ + H5F_CLOSE_WEAK, /*fc_degree */ ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) ++ NULL, /* terminate */ ++#endif + NULL, /*sb_size */ + NULL, /*sb_encode */ + NULL, /*sb_decode */ +@@ -687,7 +694,9 @@ + *------------------------------------------------------------------------- + */ + static haddr_t +-#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) ++H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type) ++#elif (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) + H5FD_dsm_get_eof(const H5FD_t *_file) + #else + H5FD_dsm_get_eof(H5FD_t *_file) diff --git a/scripts/patches/vtk/7.1/ffmpeg-5.patch b/scripts/patches/vtk/7.1/ffmpeg-5.patch new file mode 100644 index 0000000..b33f604 --- /dev/null +++ b/scripts/patches/vtk/7.1/ffmpeg-5.patch @@ -0,0 +1,1029 @@ +--- a/CMake/FindFFMPEG.cmake ++++ b/CMake/FindFFMPEG.cmake +@@ -107,13 +107,14 @@ + FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h) + FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h) + FFMPEG_FIND(LIBAVUTIL avutil avutil.h) ++FFMPEG_FIND(LIBSWRESAMPLE swresample swresample.h) + FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here. + + SET(FFMPEG_FOUND "NO") + + # Note we don't check FFMPEG_LIBSWSCALE_FOUND, FFMPEG_LIBAVDEVICE_FOUND, + # and FFMPEG_LIBAVUTIL_FOUND as they are optional. +-IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND STDINT_OK) ++IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBSWRESAMPLE_FOUND AND STDINT_OK) + + SET(FFMPEG_FOUND "YES") + +--- a/IO/FFMPEG/CMakeLists.txt ++++ b/IO/FFMPEG/CMakeLists.txt +@@ -22,7 +22,7 @@ + ) + + set(_ffmpeg_libs ${FFMPEG_LIBAVFORMAT_LIBRARIES} ${FFMPEG_LIBAVCODEC_LIBRARIES} +- ${FFMPEG_LIBAVUTIL_LIBRARIES} ++ ${FFMPEG_LIBAVUTIL_LIBRARIES} ${FFMPEG_LIBSWRESAMPLE_LIBRARIES} + ) + + if(NOT VTK_FFMPEG_HAS_IMG_CONVERT) +--- a/IO/FFMPEG/vtkFFMPEGWriter.cxx ++++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx +@@ -15,99 +15,77 @@ + + #include "vtkFFMPEGWriter.h" + ++#include "vtkErrorCode.h" + #include "vtkImageData.h" + #include "vtkObjectFactory.h" +-#include "vtkErrorCode.h" +-#include "vtkFFMPEGConfig.h" + +-extern "C" { +-#ifdef VTK_FFMPEG_HAS_OLD_HEADER +-# include +-#else +-# include +-#endif +- +-#ifndef VTK_FFMPEG_HAS_IMG_CONVERT +-# ifdef VTK_FFMPEG_HAS_OLD_HEADER +-# include +-# else +-# include +-# endif +-#endif ++extern "C" ++{ ++#include ++#include ++#include + } + +-#ifdef __GNUC__ +-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +-#endif +- +-#if LIBAVCODEC_VERSION_MAJOR < 55 +-# define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG +-# define AV_CODEC_ID_RAWVIDEO CODEC_ID_RAWVIDEO +-# define AV_PIX_FMT_BGR24 PIX_FMT_BGR24 +-# define AV_PIX_FMT_RGB24 PIX_FMT_RGB24 +-# define AV_PIX_FMT_YUVJ422P PIX_FMT_YUVJ422P ++#if LIBAVFORMAT_VERSION_MAJOR < 59 ++#define vtk_ff_const59 ++#else ++#define vtk_ff_const59 const + #endif + +-#if LIBAVCODEC_VERSION_MAJOR < 56 || \ +- LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR < 28 || \ +- LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR == 28 && LIBAVCODEC_VERSION_MICRO < 1 +-# define av_frame_alloc avcodec_alloc_frame ++#if defined(LIBAVFORMAT_VERSION_MAJOR) && LIBAVFORMAT_VERSION_MAJOR >= 57 ++extern "C" ++{ ++#include ++} + #endif + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + class vtkFFMPEGWriterInternal +- { ++{ + public: +- vtkFFMPEGWriterInternal(vtkFFMPEGWriter *creator); ++ vtkFFMPEGWriterInternal(vtkFFMPEGWriter* creator); + ~vtkFFMPEGWriterInternal(); + + int Start(); +- int Write(vtkImageData *id); ++ int Write(vtkImageData* id); + void End(); + + int Dim[2]; + int FrameRate; + + private: ++ vtkFFMPEGWriter* Writer; + +- vtkFFMPEGWriter *Writer; ++ AVFormatContext* avFormatContext; + +- AVFormatContext *avFormatContext; ++ vtk_ff_const59 AVOutputFormat* avOutputFormat; + +- AVOutputFormat *avOutputFormat; ++ AVStream* avStream; + +- AVStream *avStream; ++ AVFrame* rgbInput; ++ AVFrame* yuvOutput; + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- unsigned char *codecBuf; +- int codecBufSize; +-#endif +- +- AVFrame *rgbInput; +- AVFrame *yuvOutput; ++ AVCodecContext* avCodecContext; + + int openedFile; + int closedFile; +- }; ++}; + +-//--------------------------------------------------------------------------- +-vtkFFMPEGWriterInternal::vtkFFMPEGWriterInternal(vtkFFMPEGWriter *creator) ++//------------------------------------------------------------------------------ ++vtkFFMPEGWriterInternal::vtkFFMPEGWriterInternal(vtkFFMPEGWriter* creator) + { + this->Writer = creator; + this->Dim[0] = 0; + this->Dim[1] = 0; + +- this->avFormatContext = NULL; ++ this->avFormatContext = nullptr; + +- this->avOutputFormat = NULL; ++ this->avOutputFormat = nullptr; + +- this->avStream = NULL; ++ this->avStream = nullptr; + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- this->codecBuf = NULL; +-#endif +- this->rgbInput = NULL; +- this->yuvOutput = NULL; ++ this->rgbInput = nullptr; ++ this->yuvOutput = nullptr; + + this->openedFile = 0; + this->closedFile = 1; +@@ -115,7 +93,7 @@ + this->FrameRate = 25; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + vtkFFMPEGWriterInternal::~vtkFFMPEGWriterInternal() + { + if (!this->closedFile) +@@ -124,41 +102,316 @@ + } + } + +-//--------------------------------------------------------------------------- ++// for newer versions of ffmpeg use the new API as the old has been deprecated ++#if defined(LIBAVFORMAT_VERSION_MAJOR) && LIBAVFORMAT_VERSION_MAJOR >= 57 ++ ++//------------------------------------------------------------------------------ + int vtkFFMPEGWriterInternal::Start() + { + this->closedFile = 0; + +- //initialize libavcodec, and register all codecs and formats ++#ifdef NDEBUG ++ av_log_set_level(AV_LOG_ERROR); ++#endif ++ ++ // choose avi media file format ++ this->avOutputFormat = av_guess_format("avi", nullptr, nullptr); ++ if (!this->avOutputFormat) ++ { ++ vtkGenericWarningMacro(<< "Could not open the avi media file format."); ++ return 0; ++ } ++ ++ 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( ++ &this->avFormatContext, this->avOutputFormat, nullptr, this->Writer->GetFileName()) < 0) ++ { ++ vtkGenericWarningMacro(<< "Could not open the format context."); ++ return 0; ++ } ++ ++ vtk_ff_const59 AVCodec* codec; ++ if (!(codec = avcodec_find_encoder(video_codec))) ++ { ++ vtkGenericWarningMacro(<< "Failed to get video codec."); ++ return 0; ++ } ++ ++ // create a stream for that file ++ this->avStream = avformat_new_stream(this->avFormatContext, codec); ++ if (!this->avStream) ++ { ++ vtkGenericWarningMacro(<< "Could not create video stream."); ++ return 0; ++ } ++ ++ // Set up the codec. ++ if (!(this->avCodecContext = avcodec_alloc_context3(codec))) ++ { ++ vtkGenericWarningMacro(<< "Failed to allocate codec context."); ++ return 0; ++ } ++ ++ 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]; ++ if (this->Writer->GetCompression()) ++ { ++ this->avStream->codecpar->format = AV_PIX_FMT_YUVJ420P; ++ } ++ else ++ { ++ this->avStream->codecpar->format = AV_PIX_FMT_BGR24; ++ } ++ this->avStream->time_base.den = this->FrameRate; ++ this->avStream->time_base.num = 1; ++ ++ if (!this->Writer->GetBitRate()) ++ { ++ // allow a variable quality/size tradeoff ++ switch (this->Writer->GetQuality()) ++ { ++ case 0: ++ this->avStream->codecpar->bit_rate = 3 * 1024 * 1024; ++ break; ++ case 1: ++ this->avStream->codecpar->bit_rate = 6 * 1024 * 1024; ++ break; ++ default: ++ this->avStream->codecpar->bit_rate = 12 * 1024 * 1024; ++ break; ++ } ++ } ++ else ++ { ++ this->avStream->codecpar->bit_rate = this->Writer->GetBitRate(); ++ } ++ ++ // to do playback at actual recorded rate, this will need more work see also below ++ avcodec_parameters_to_context(this->avCodecContext, this->avStream->codecpar); ++ this->avCodecContext->time_base.den = this->FrameRate; ++ this->avCodecContext->time_base.num = 1; ++ // this->avCodecContext->max_b_frames = 2; ++ // about one full frame per second ++ this->avCodecContext->gop_size = this->FrameRate; ++ if (this->avFormatContext->oformat->flags & AVFMT_GLOBALHEADER) ++ { ++ this->avCodecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; ++ } ++ if (!this->Writer->GetBitRateTolerance()) ++ { ++ this->avCodecContext->bit_rate_tolerance = ++ this->avCodecContext->bit_rate; // ffmpeg won't create a codec if brt
avCodecContext->bit_rate_tolerance = this->Writer->GetBitRateTolerance(); ++ } ++ avcodec_parameters_from_context(this->avStream->codecpar, this->avCodecContext); ++ ++ if (avcodec_open2(this->avCodecContext, codec, nullptr) < 0) ++ { ++ vtkGenericWarningMacro(<< "Could not open codec."); ++ return 0; ++ } ++ ++ // for the output of the writer's input... ++ this->rgbInput = av_frame_alloc(); ++ if (!this->rgbInput) ++ { ++ vtkGenericWarningMacro(<< "Could not make rgbInput avframe."); ++ return 0; ++ } ++ this->rgbInput->format = AV_PIX_FMT_RGB24; ++ this->rgbInput->width = this->avCodecContext->width; ++ this->rgbInput->height = this->avCodecContext->height; ++ av_frame_get_buffer(this->rgbInput, 1); ++ ++ // and for the output to the codec's input. ++ this->yuvOutput = av_frame_alloc(); ++ if (!this->yuvOutput) ++ { ++ vtkGenericWarningMacro(<< "Could not make yuvOutput avframe."); ++ return 0; ++ } ++ this->yuvOutput->format = this->avCodecContext->pix_fmt; ++ this->yuvOutput->width = this->avCodecContext->width; ++ this->yuvOutput->height = this->avCodecContext->height; ++ this->yuvOutput->pts = 0; ++ av_frame_get_buffer(this->yuvOutput, 1); ++ ++ // Finally, open the file and start it off. ++ if (!(this->avOutputFormat->flags & AVFMT_NOFILE)) ++ { ++ if (avio_open(&this->avFormatContext->pb, this->Writer->GetFileName(), AVIO_FLAG_WRITE) < 0) ++ { ++ vtkGenericWarningMacro(<< "Could not open " << this->Writer->GetFileName() << "."); ++ return 0; ++ } ++ } ++ this->openedFile = 1; ++ ++ if (avformat_write_header(this->avFormatContext, nullptr) < 0) ++ { ++ vtkGenericWarningMacro(<< "Could not allocate avcodec private data."); ++ return 0; ++ } ++ return 1; ++} ++ ++//------------------------------------------------------------------------------ ++int vtkFFMPEGWriterInternal::Write(vtkImageData* id) ++{ ++ this->Writer->GetInputAlgorithm(0, 0)->UpdateWholeExtent(); ++ ++ // copy the image from the input to the RGB buffer while flipping Y ++ unsigned char* rgb = (unsigned char*)id->GetScalarPointer(); ++ unsigned char* src; ++ for (int y = 0; y < this->avCodecContext->height; y++) ++ { ++ src = rgb + (this->avCodecContext->height - y - 1) * this->avCodecContext->width * 3; // flip Y ++ unsigned char* dest = &this->rgbInput->data[0][y * this->rgbInput->linesize[0]]; ++ memcpy((void*)dest, (void*)src, this->avCodecContext->width * 3); ++ } ++ ++ // convert that to YUV for input to the codec ++ SwsContext* convert_ctx = ++ sws_getContext(this->avCodecContext->width, this->avCodecContext->height, AV_PIX_FMT_RGB24, ++ this->avCodecContext->width, this->avCodecContext->height, this->avCodecContext->pix_fmt, ++ SWS_BICUBIC, nullptr, nullptr, nullptr); ++ ++ if (convert_ctx == nullptr) ++ { ++ vtkGenericWarningMacro(<< "swscale context initialization failed"); ++ return 0; ++ } ++ ++ int result = sws_scale(convert_ctx, this->rgbInput->data, this->rgbInput->linesize, 0, ++ this->avCodecContext->height, this->yuvOutput->data, this->yuvOutput->linesize); ++ ++ sws_freeContext(convert_ctx); ++ ++ if (!result) ++ { ++ vtkGenericWarningMacro(<< "sws_scale() failed"); ++ return 0; ++ } ++ ++ int ret = avcodec_send_frame(this->avCodecContext, this->yuvOutput); ++ this->yuvOutput->pts++; ++ ++ if (ret < 0) ++ { ++ return 1; ++ } ++ ++ // run the encoder ++ AVPacket pkt; ++ av_init_packet(&pkt); ++ pkt.data = nullptr; ++ pkt.size = 0; ++ ++ while (!ret) ++ { ++ // dump the compressed result to file ++ ret = avcodec_receive_packet(this->avCodecContext, &pkt); ++ if (!ret) ++ { ++ pkt.stream_index = this->avStream->index; ++ int wret = av_write_frame(this->avFormatContext, &pkt); ++ if (wret < 0) ++ { ++ vtkGenericWarningMacro(<< "Problem encoding frame."); ++ return 0; ++ } ++ } ++ } ++ ++ return 1; ++} ++ ++//------------------------------------------------------------------------------ ++void vtkFFMPEGWriterInternal::End() ++{ ++ if (this->yuvOutput) ++ { ++ av_frame_free(&this->yuvOutput); ++ this->yuvOutput = nullptr; ++ } ++ ++ if (this->rgbInput) ++ { ++ av_frame_free(&this->rgbInput); ++ this->rgbInput = nullptr; ++ } ++ ++ if (this->avFormatContext) ++ { ++ if (this->openedFile) ++ { ++ av_write_trailer(this->avFormatContext); ++ avio_close(this->avFormatContext->pb); ++ this->openedFile = 0; ++ } ++ ++ avformat_free_context(this->avFormatContext); ++ this->avFormatContext = nullptr; ++ } ++ ++ if (this->avOutputFormat) ++ { ++ // Next line was done inside av_free(this->avFormatContext). ++ // av_free(this->avOutputFormat); ++ ++ this->avOutputFormat = nullptr; ++ } ++ ++ if (this->avCodecContext) ++ { ++ avcodec_close(this->avCodecContext); ++ avcodec_free_context(&this->avCodecContext); ++ this->avCodecContext = nullptr; ++ } ++ ++ this->closedFile = 1; ++} ++ ++// for old versions of ffmpeg use the old API, eventually remove this code ++// The new API was introduced around 2016 ++#else ++ ++//------------------------------------------------------------------------------ ++int vtkFFMPEGWriterInternal::Start() ++{ ++ this->closedFile = 0; ++ ++ // initialize libavcodec, and register all codecs and formats + av_register_all(); + +- //create the format context that wraps all of the media output structures +-#if LIBAVFORMAT_VERSION_MAJOR >= 52 ++ // create the format context that wraps all of the media output structures + this->avFormatContext = avformat_alloc_context(); +-#else +- this->avFormatContext = av_alloc_format_context(); +-#endif + if (!this->avFormatContext) + { +- vtkGenericWarningMacro (<< "Coult not open the format context."); ++ vtkGenericWarningMacro(<< "Could not open the format context."); + return 0; + } + +- //choose avi media file format +-#ifdef VTK_FFMPEG_HAS_OLD_HEADER +- this->avOutputFormat = guess_format("avi", NULL, NULL); +-#else +- this->avOutputFormat = av_guess_format("avi", NULL, NULL); +-#endif ++ // choose avi media file format ++ this->avOutputFormat = av_guess_format("avi", nullptr, nullptr); + if (!this->avOutputFormat) + { +- vtkGenericWarningMacro (<< "Could not open the avi media file format."); ++ vtkGenericWarningMacro(<< "Could not open the avi media file format."); + return 0; + } + + if (this->Writer->GetCompression()) + { +- //choose a codec that is easily playable on windows ++ // choose a codec that is easily playable on windows + this->avOutputFormat->video_codec = AV_CODEC_ID_MJPEG; + } + else +@@ -166,36 +419,24 @@ + this->avOutputFormat->video_codec = AV_CODEC_ID_RAWVIDEO; + } + +- //assign the format to the context ++ // assign the format to the context + this->avFormatContext->oformat = this->avOutputFormat; + +- //choose a filename for the output ++ // choose a filename for the output + strcpy(this->avFormatContext->filename, this->Writer->GetFileName()); + +- //create a stream for that file +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- this->avStream = av_new_stream(this->avFormatContext, 0); +-#else ++ // create a stream for that file + this->avStream = avformat_new_stream(this->avFormatContext, 0); +-#endif + if (!this->avStream) + { +- vtkGenericWarningMacro (<< "Could not create video stream."); ++ vtkGenericWarningMacro(<< "Could not create video stream."); + return 0; + } + +- //Set up the codec. +- AVCodecContext *c = this->avStream->codec; +-#ifdef VTK_FFMPEG_AVCODECID ++ // Set up the codec. ++ AVCodecContext* c = this->avStream->codec; + c->codec_id = static_cast(this->avOutputFormat->video_codec); +-#else +- c->codec_id = static_cast(this->avOutputFormat->video_codec); +-#endif +-#ifdef VTK_FFMPEG_HAS_OLD_HEADER +- c->codec_type = CODEC_TYPE_VIDEO; +-#else +- c->codec_type = AVMEDIA_TYPE_VIDEO; +-#endif ++ c->codec_type = AVMEDIA_TYPE_VIDEO; + c->width = this->Dim[0]; + c->height = this->Dim[1]; + if (this->Writer->GetCompression()) +@@ -207,25 +448,25 @@ + c->pix_fmt = AV_PIX_FMT_BGR24; + } + +- //to do playback at actual recorded rate, this will need more work see also below ++ // to do playback at actual recorded rate, this will need more work see also below + c->time_base.den = this->FrameRate; + c->time_base.num = 1; +- //about one full frame per second ++ // about one full frame per second + c->gop_size = this->FrameRate; + +- if( !this->Writer->GetBitRate() ) ++ if (!this->Writer->GetBitRate()) + { +- //allow a variable quality/size tradeoff ++ // allow a variable quality/size tradeoff + switch (this->Writer->GetQuality()) + { + case 0: +- c->bit_rate = 3*1024*1024; ++ c->bit_rate = 3 * 1024 * 1024; + break; + case 1: +- c->bit_rate = 6*1024*1024; ++ c->bit_rate = 6 * 1024 * 1024; + break; + default: +- c->bit_rate = 12*1024*1024; ++ c->bit_rate = 12 * 1024 * 1024; + break; + } + } +@@ -234,262 +475,164 @@ + c->bit_rate = this->Writer->GetBitRate(); + } + +- if(!this->Writer->GetBitRateTolerance()) ++ if (!this->Writer->GetBitRateTolerance()) + { +- c->bit_rate_tolerance = c->bit_rate; //ffmpeg won't create a codec if brt
bit_rate_tolerance = c->bit_rate; // ffmpeg won't create a codec if brt
bit_rate_tolerance = this->Writer->GetBitRateTolerance(); + } + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- //apply the chosen parameters +- if (av_set_parameters(this->avFormatContext, NULL) < 0) +- { +- vtkGenericWarningMacro (<< "Invalid output format parameters." ); +- return 0; +- } +-#endif +- +- //manufacture a codec with the chosen parameters +- AVCodec *codec = avcodec_find_encoder(c->codec_id); ++ // manufacture a codec with the chosen parameters ++ AVCodec* codec = avcodec_find_encoder(c->codec_id); + if (!codec) + { +- vtkGenericWarningMacro (<< "Codec not found." ); +- return 0; +- } +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- if (avcodec_open(c, codec) < 0) +-#else +- if (avcodec_open2(c, codec, NULL) < 0) +-#endif +- { +- vtkGenericWarningMacro (<< "Could not open codec."); ++ vtkGenericWarningMacro(<< "Codec not found."); + return 0; + } +- +- //create buffers for the codec to work with. +- +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- //working compression space +- this->codecBufSize = 2*c->width*c->height*4; //hopefully this is enough +- this->codecBuf = new unsigned char[this->codecBufSize]; +- if (!this->codecBuf) ++ if (avcodec_open2(c, codec, nullptr) < 0) + { +- vtkGenericWarningMacro (<< "Could not make codec working space." ); ++ vtkGenericWarningMacro(<< "Could not open codec."); + return 0; + } +-#endif + +- //for the output of the writer's input... ++ // for the output of the writer's input... + this->rgbInput = av_frame_alloc(); + if (!this->rgbInput) + { +- vtkGenericWarningMacro (<< "Could not make rgbInput avframe." ); ++ vtkGenericWarningMacro(<< "Could not make rgbInput avframe."); + return 0; + } + int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height); +- unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize); ++ unsigned char* rgb = (unsigned char*)av_malloc(sizeof(unsigned char) * RGBsize); + if (!rgb) + { +- vtkGenericWarningMacro (<< "Could not make rgbInput's buffer." ); ++ vtkGenericWarningMacro(<< "Could not make rgbInput's buffer."); + return 0; + } +- //The rgb buffer should get deleted when this->rgbInput is. +- avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); ++ // The rgb buffer should get deleted when this->rgbInput is. ++ avpicture_fill((AVPicture*)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); + +- //and for the output to the codec's input. ++ // and for the output to the codec's input. + this->yuvOutput = av_frame_alloc(); + if (!this->yuvOutput) + { +- vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." ); ++ vtkGenericWarningMacro(<< "Could not make yuvOutput avframe."); + return 0; + } + int YUVsize = avpicture_get_size(c->pix_fmt, c->width, c->height); +- unsigned char *yuv = (unsigned char *)av_malloc(sizeof(unsigned char) * YUVsize); ++ unsigned char* yuv = (unsigned char*)av_malloc(sizeof(unsigned char) * YUVsize); + if (!yuv) + { +- vtkGenericWarningMacro (<< "Could not make yuvOutput's buffer." ); ++ vtkGenericWarningMacro(<< "Could not make yuvOutput's buffer."); + return 0; + } +- //The yuv buffer should get deleted when this->yuv_input is. +- avpicture_fill((AVPicture *)this->yuvOutput, yuv, c->pix_fmt, c->width, c->height); +- ++ // The yuv buffer should get deleted when this->yuv_input is. ++ avpicture_fill((AVPicture*)this->yuvOutput, yuv, c->pix_fmt, c->width, c->height); + +- //Finally, open the file and start it off. +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- if (url_fopen(&this->avFormatContext->pb, this->avFormatContext->filename, URL_WRONLY) < 0) +-#else ++ // Finally, open the file and start it off. + if (avio_open(&this->avFormatContext->pb, this->avFormatContext->filename, AVIO_FLAG_WRITE) < 0) +-#endif + { +- vtkGenericWarningMacro (<< "Could not open " << this->Writer->GetFileName() << "." ); ++ vtkGenericWarningMacro(<< "Could not open " << this->Writer->GetFileName() << "."); + return 0; + } + this->openedFile = 1; + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- av_write_header(this->avFormatContext); +-#else +- if (avformat_write_header(this->avFormatContext, NULL) < 0) ++ if (avformat_write_header(this->avFormatContext, nullptr) < 0) + { +- vtkGenericWarningMacro (<< "Could not allocate avcodec private data."); ++ vtkGenericWarningMacro(<< "Could not allocate avcodec private data."); + return 0; + } +-#endif + return 1; + } + +-//--------------------------------------------------------------------------- +-int vtkFFMPEGWriterInternal::Write(vtkImageData *id) ++//------------------------------------------------------------------------------ ++int vtkFFMPEGWriterInternal::Write(vtkImageData* id) + { + this->Writer->GetInputAlgorithm(0, 0)->UpdateWholeExtent(); + +- AVCodecContext *cc = this->avStream->codec; ++ AVCodecContext* cc = this->avStream->codec; + +- //copy the image from the input to the RGB buffer while flipping Y +- unsigned char *rgb = (unsigned char*)id->GetScalarPointer(); +- unsigned char *src; ++ // copy the image from the input to the RGB buffer while flipping Y ++ unsigned char* rgb = (unsigned char*)id->GetScalarPointer(); ++ unsigned char* src; + for (int y = 0; y < cc->height; y++) + { +- src = rgb + (cc->height-y-1) * cc->width * 3; //flip Y +- unsigned char *dest = +- &this->rgbInput->data[0][y*this->rgbInput->linesize[0]]; +- memcpy((void*)dest, (void*)src, cc->width*3); ++ src = rgb + (cc->height - y - 1) * cc->width * 3; // flip Y ++ unsigned char* dest = &this->rgbInput->data[0][y * this->rgbInput->linesize[0]]; ++ memcpy((void*)dest, (void*)src, cc->width * 3); + } + +- //convert that to YUV for input to the codec +-#ifdef VTK_FFMPEG_HAS_IMG_CONVERT +- img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt, +- (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24, +- cc->width, cc->height); +-#else +- //convert that to YUV for input to the codec +- SwsContext* convert_ctx = sws_getContext( +- cc->width, cc->height, AV_PIX_FMT_RGB24, +- cc->width, cc->height, cc->pix_fmt, +- SWS_BICUBIC, NULL, NULL, NULL); ++ // convert that to YUV for input to the codec ++ SwsContext* convert_ctx = sws_getContext(cc->width, cc->height, AV_PIX_FMT_RGB24, cc->width, ++ cc->height, cc->pix_fmt, SWS_BICUBIC, nullptr, nullptr, nullptr); + +- if(convert_ctx == NULL) ++ if (convert_ctx == nullptr) + { + vtkGenericWarningMacro(<< "swscale context initialization failed"); + return 0; + } + +- int result = sws_scale(convert_ctx, +- this->rgbInput->data, this->rgbInput->linesize, +- 0, cc->height, +- this->yuvOutput->data, this->yuvOutput->linesize +- ); ++ int result = sws_scale(convert_ctx, this->rgbInput->data, this->rgbInput->linesize, 0, cc->height, ++ this->yuvOutput->data, this->yuvOutput->linesize); + + sws_freeContext(convert_ctx); + +- if(!result) ++ if (!result) + { + vtkGenericWarningMacro(<< "sws_scale() failed"); + return 0; + } +-#endif + +- //run the encoder ++ // run the encoder + AVPacket pkt; + av_init_packet(&pkt); +- pkt.data = NULL; ++ pkt.data = nullptr; + pkt.size = 0; + +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- int toAdd = avcodec_encode_video(cc, +- this->codecBuf, +- this->codecBufSize, +- this->yuvOutput); +- if (toAdd) +- { +- //to do playback at actual recorded rate, this will need more work +- pkt.pts = cc->coded_frame->pts; +- //pkt.dts = ?; not dure what decompression time stamp should be +- pkt.data = this->codecBuf; +- pkt.size = toAdd; +- pkt.stream_index = this->avStream->index; +- if (cc->coded_frame->key_frame) //treat keyframes well +- { +-#ifdef VTK_FFMPEG_HAS_OLD_HEADER +- pkt.flags |= PKT_FLAG_KEY; +-#else +- pkt.flags |= AV_PKT_FLAG_KEY; +-#endif +- } +- pkt.duration = 0; //presentation duration in time_base units or 0 if NA +- pkt.pos = -1; //byte position in stream or -1 if NA +- +- toAdd = av_write_frame(this->avFormatContext, &pkt); +- } +- if (toAdd) //should not have anything left over +- { +- vtkGenericWarningMacro (<< "Problem encoding frame." ); +- return 0; +- } +- +-#else + int got_frame; +- int ret = avcodec_encode_video2(cc, +- &pkt, +- this->yuvOutput, +- &got_frame); ++ int ret = avcodec_encode_video2(cc, &pkt, this->yuvOutput, &got_frame); + +- //dump the compressed result to file ++ // dump the compressed result to file + if (got_frame) + { + pkt.stream_index = this->avStream->index; + ret = av_write_frame(this->avFormatContext, &pkt); + } + +- if (ret<0) ++ if (ret < 0) + { +- vtkGenericWarningMacro (<< "Problem encoding frame." ); ++ vtkGenericWarningMacro(<< "Problem encoding frame."); + return 0; + } +-#endif + + return 1; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriterInternal::End() + { + if (this->yuvOutput) + { + av_free(this->yuvOutput->data[0]); + av_free(this->yuvOutput); +- this->yuvOutput = NULL; ++ this->yuvOutput = nullptr; + } + + if (this->rgbInput) + { + av_free(this->rgbInput->data[0]); + av_free(this->rgbInput); +- this->rgbInput = NULL; ++ this->rgbInput = nullptr; + } + +- +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- if (this->codecBuf) +- { +- av_free(this->codecBuf); +- this->codecBuf = NULL; +- } +-#endif +- + if (this->avFormatContext) + { + if (this->openedFile) + { + av_write_trailer(this->avFormatContext); +-#if LIBAVFORMAT_VERSION_MAJOR < 54 +- url_fclose(this->avFormatContext->pb); +-#else + avio_close(this->avFormatContext->pb); +-#endif + this->openedFile = 0; + } + +@@ -500,13 +643,13 @@ + if (this->avStream) + { + av_free(this->avStream); +- this->avStream = NULL; ++ this->avStream = nullptr; + } + + if (this->avOutputFormat) + { +- //Next line was done inside av_free(this->avFormatContext). +- //av_free(this->avOutputFormat); ++ // Next line was done inside av_free(this->avFormatContext). ++ // av_free(this->avOutputFormat); + + this->avOutputFormat = 0; + } +@@ -514,14 +657,15 @@ + this->closedFile = 1; + } + ++#endif + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + vtkStandardNewMacro(vtkFFMPEGWriter); + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + vtkFFMPEGWriter::vtkFFMPEGWriter() + { +- this->Internals = 0; ++ this->Internals = nullptr; + this->Quality = 2; + this->Compression = true; + this->Rate = 25; +@@ -529,24 +673,24 @@ + this->BitRateTolerance = 0; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + vtkFFMPEGWriter::~vtkFFMPEGWriter() + { + delete this->Internals; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriter::Start() + { + this->Error = 1; + +- if ( this->Internals ) ++ if (this->Internals) + { + vtkErrorMacro("Movie already started."); + this->SetErrorCode(vtkGenericMovieWriter::InitError); + return; + } +- if ( this->GetInput() == NULL ) ++ if (this->GetInput() == nullptr) + { + vtkErrorMacro("Please specify an input."); + this->SetErrorCode(vtkGenericMovieWriter::NoInputError); +@@ -566,7 +710,7 @@ + this->Initialized = 0; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriter::Write() + { + if (this->Error) +@@ -574,7 +718,7 @@ + return; + } + +- if ( !this->Internals ) ++ if (!this->Internals) + { + vtkErrorMacro("Movie not started."); + this->Error = 1; +@@ -588,13 +732,13 @@ + + int dim[4]; + input->GetDimensions(dim); +- if ( this->Internals->Dim[0] == 0 && this->Internals->Dim[1] == 0 ) ++ if (this->Internals->Dim[0] == 0 && this->Internals->Dim[1] == 0) + { + this->Internals->Dim[0] = dim[0]; + this->Internals->Dim[1] = dim[1]; + } + +- if (this->Internals->Dim[0]!= dim[0] || this->Internals->Dim[1]!= dim[1]) ++ if (this->Internals->Dim[0] != dim[0] || this->Internals->Dim[1] != dim[1]) + { + vtkErrorMacro("Image not of the same size."); + this->Error = 1; +@@ -602,7 +746,7 @@ + return; + } + +- if ( !this->Initialized ) ++ if (!this->Initialized) + { + this->Internals->FrameRate = this->Rate; + if (!this->Internals->Start()) +@@ -623,21 +767,21 @@ + } + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriter::End() + { + this->Internals->End(); + + delete this->Internals; +- this->Internals = 0; ++ this->Internals = nullptr; + } + +-//--------------------------------------------------------------------------- ++//------------------------------------------------------------------------------ + void vtkFFMPEGWriter::PrintSelf(ostream& os, vtkIndent indent) + { + this->Superclass::PrintSelf(os, indent); + os << indent << "Quality: " << this->Quality << endl; +- os << indent << "Compression: " << (this->Compression?"true":"false") << endl; ++ os << indent << "Compression: " << (this->Compression ? "true" : "false") << endl; + os << indent << "Rate: " << this->Rate << endl; + os << indent << "BitRate: " << this->BitRate << endl; + os << indent << "BitRateTolerance: " << this->BitRateTolerance << endl; diff --git a/scripts/patches/vtk/7.1/gcc-11.patch b/scripts/patches/vtk/7.1/gcc-11.patch new file mode 100644 index 0000000..a882fb3 --- /dev/null +++ b/scripts/patches/vtk/7.1/gcc-11.patch @@ -0,0 +1,42 @@ +--- vtk7-7.1.1+dfsg2.orig/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx ++++ vtk7-7.1.1+dfsg2/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx +@@ -52,7 +52,7 @@ + XdmfErrorMessage("Cannot Receive Message of Length = " << Msg->Length); + return(XDMF_FAIL); + } +- if(Msg->Data <= 0 ){ ++ if(!Msg->Data){ + XdmfErrorMessage("Cannot Receive Message into Data Buffer = " << Msg->Length); + return(XDMF_FAIL); + } +@@ -66,7 +66,7 @@ + XdmfErrorMessage("Cannot Send Message of Length = " << Msg->Length); + return(XDMF_FAIL); + } +- if(Msg->Data <= 0 ){ ++ if(!Msg->Data){ + XdmfErrorMessage("Cannot Send Message from Data Buffer = " << Msg->Length); + return(XDMF_FAIL); + } +--- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchyPrivate.h ++++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchyPrivate.h +@@ -66,7 +66,7 @@ + { + } + +- bool operator () ( const vtkIdType& a, const vtkIdType& b ) ++ bool operator () ( const vtkIdType& a, const vtkIdType& b ) const + { + if (0 == this->Hierarchy) + { +--- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchy.cxx ++++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchy.cxx +@@ -525,7 +525,7 @@ + { + public: + bool operator()(const vtkHierarchyNode & a, +- const vtkHierarchyNode & b) ++ const vtkHierarchyNode & b) const + { + if (a.Level != b.Level) + { diff --git a/scripts/patches/vtk/7.1/mysq8_my_bool.patch b/scripts/patches/vtk/7.1/mysq8_my_bool.patch new file mode 100644 index 0000000..0547317 --- /dev/null +++ b/scripts/patches/vtk/7.1/mysq8_my_bool.patch @@ -0,0 +1,22 @@ +Description: Reintroduce my_bool to fix build with MySQL 8 + (patch inspired from the one in cppdb 0.3.1+dfsg-8ubuntu2) +Author: Gianfranco Costamagna , Andreas Hasenack +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1863026 +Forwarded: no +Last-Update: 2020-12-15 + +diff --git a/IO/MySQL/vtkMySQLDatabasePrivate.h b/IO/MySQL/vtkMySQLDatabasePrivate.h +index 4deb747..8e0c9e3 100644 +--- a/IO/MySQL/vtkMySQLDatabasePrivate.h ++++ b/IO/MySQL/vtkMySQLDatabasePrivate.h +@@ -7,6 +7,10 @@ + + #include "vtkIOMySQLModule.h" // For export macro + #include // needed for MYSQL typedefs ++#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) && \ ++ MYSQL_VERSION_ID >= 80001 && MYSQL_VERSION_ID != 80002 ++typedef bool my_bool; ++#endif + + class VTKIOMYSQL_EXPORT vtkMySQLDatabasePrivate + { diff --git a/scripts/patches/vtk/8.1/100_javac-heap.patch b/scripts/patches/vtk/8.1/100_javac-heap.patch new file mode 100644 index 0000000..a6e8a7f --- /dev/null +++ b/scripts/patches/vtk/8.1/100_javac-heap.patch @@ -0,0 +1,18 @@ +Description: set JVM max memory to 1024m. +Author: Matthias Klose +Acked-By: Anton Gladky +Last-Update: 2016-02-12 + +Index: VTK-6.3.0/Wrapping/Java/CMakeLists.txt +=================================================================== +--- VTK-6.3.0.orig/Wrapping/Java/CMakeLists.txt ++++ VTK-6.3.0/Wrapping/Java/CMakeLists.txt +@@ -80,6 +80,8 @@ if(APPLE) + set(JAVAC_OPTIONS -J-Xmx512m) + endif() + ++set(JAVAC_OPTIONS -J-Xmx1024m) ++ + get_property(java_modules GLOBAL PROPERTY VTK_JAVA_WRAPPED) + foreach(module IN LISTS java_modules) + if(NOT ${module}_EXCLUDE_FROM_WRAPPING) diff --git a/scripts/patches/vtk/8.1/101_java_install_path.patch b/scripts/patches/vtk/8.1/101_java_install_path.patch new file mode 100644 index 0000000..18af20a --- /dev/null +++ b/scripts/patches/vtk/8.1/101_java_install_path.patch @@ -0,0 +1,21 @@ +Description: Install Java modules in the correct path + This patch corrects the installation of the native Java modules + to go to the path given by the Debian Java Policy. This helps + to later use the simple install file to get them to the right + location in the package. +Author: Gert Wollny +Description: Delete java files before building jar +--- a/Wrapping/Java/CMakeLists.txt ++++ b/Wrapping/Java/CMakeLists.txt +@@ -259,7 +259,7 @@ + if(VTK_JAVA_SWT_COMPONENT) + set(VTK_JAVA_SAMPLE_DEPENDENCIES ${VTK_JAVA_SAMPLE_DEPENDENCIES} + rendering/SwtConeRendering +- ) ++q ) + endif() + endif() + +@@ -358,11 +358,10 @@ + COMMENT "Compiling Java Classes" + ) + +-# Create the JAR file containing all compiled classes and ++ + add_custom_command( +- COMMAND ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" +- -C ${VTK_BINARY_DIR}/java +- vtk ++ COMMAND cd ${VTK_BINARY_DIR}/java && find . -name "*.class" -print | sort -u > classes.list ++ COMMAND cd ${VTK_BINARY_DIR}/java && ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" @${VTK_BINARY_DIR}/java/classes.list + DEPENDS ${VTK_BINARY_DIR}/java/javac_stamp.txt ${JAVA_LIBRARIES} + OUTPUT ${VTK_JAR_PATH}/vtk.jar + COMMENT "Java Archive" diff --git a/scripts/patches/vtk/8.1/110_python-371.patch b/scripts/patches/vtk/8.1/110_python-371.patch new file mode 100644 index 0000000..375624e --- /dev/null +++ b/scripts/patches/vtk/8.1/110_python-371.patch @@ -0,0 +1,16 @@ +Author: Gert Wollny +Description: Work around compile bug with python 3.7.1 +Debian-Bug: https://bugs.debian.org/914347 +diff --git a/Wrapping/PythonCore/vtkPythonArgs.cxx b/Wrapping/PythonCore/vtkPythonArgs.cxx +index 1b1e4b9..682f8b8 100644 +--- a/Wrapping/PythonCore/vtkPythonArgs.cxx ++++ b/Wrapping/PythonCore/vtkPythonArgs.cxx +@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext) + else if (PyUnicode_Check(o)) + { + #if PY_VERSION_HEX >= 0x03030000 +- a = PyUnicode_AsUTF8(o); ++ a = const_cast(PyUnicode_AsUTF8(o)); + return true; + #else + PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL); diff --git a/scripts/patches/vtk/8.1/111_fix_perl.patch b/scripts/patches/vtk/8.1/111_fix_perl.patch new file mode 100644 index 0000000..c79c07a --- /dev/null +++ b/scripts/patches/vtk/8.1/111_fix_perl.patch @@ -0,0 +1,66 @@ +Author: Gert Wollny +Description: Fix the perl shebangs (lintian) +--- a/Utilities/Doxygen/doc_class2example.pl ++++ b/Utilities/Doxygen/doc_class2example.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2004-06-09 11:12:38 barre> + # + # Build cross-references between classes and examples +--- a/Utilities/Doxygen/doc_cleanhtml.pl ++++ b/Utilities/Doxygen/doc_cleanhtml.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-10-25 20:17:59 barre> + # + # Clean the HTML generated by Doxygen to remove some layout quicks +--- a/Utilities/Doxygen/doc_codematch.pl ++++ b/Utilities/Doxygen/doc_codematch.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-01-18 16:17:26 barre> + # + # Summary ? +--- a/Utilities/Doxygen/doc_contributors.pl ++++ b/Utilities/Doxygen/doc_contributors.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-11-01 15:33:04 barre> + # + # Get author and contributors. +--- a/Utilities/Doxygen/doc_header2doxygen.pl ++++ b/Utilities/Doxygen/doc_header2doxygen.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2011-01-16 21:15:53 barre> + # + # Convert VTK headers to doxygen format +--- a/Utilities/Doxygen/doc_index.pl ++++ b/Utilities/Doxygen/doc_index.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2001-11-21 17:40:48 barre> + # + # Build full-text index +--- a/Utilities/Doxygen/doc_rmpath.pl ++++ b/Utilities/Doxygen/doc_rmpath.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2001-10-05 11:49:40 barre> + # + # Remove path to intermediate Doxygen dir from html doc +--- a/Utilities/Doxygen/doc_version.pl ++++ b/Utilities/Doxygen/doc_version.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2006-11-15 13:25:02 barre> + # + # Extract VTK version and add it to documentation diff --git a/scripts/patches/vtk/8.1/112_riscv_support.patch b/scripts/patches/vtk/8.1/112_riscv_support.patch new file mode 100644 index 0000000..6b9f4bd --- /dev/null +++ b/scripts/patches/vtk/8.1/112_riscv_support.patch @@ -0,0 +1,15 @@ +Changes taken from https://gitlab.kitware.com/vtk/vtk/blob/master/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h + +--- vtk7-7.1.1+dfsg1.orig/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h ++++ vtk7-7.1.1+dfsg1/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h +@@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY wa + #elif defined(__XTENSA_EL__) + # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + ++/* RISC-V */ ++#elif defined(__riscv) || defined(__riscv__) ++# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE ++ + /* Unknown CPU */ + #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) + # error "Byte order of target CPU unknown." diff --git a/scripts/patches/vtk8-113_fix_python_equal.patch b/scripts/patches/vtk/8.1/113_vtk8_fix_python_equal.patch similarity index 100% rename from scripts/patches/vtk8-113_fix_python_equal.patch rename to scripts/patches/vtk/8.1/113_vtk8_fix_python_equal.patch diff --git a/scripts/patches/vtk/8.1/115_support-gcc10.patch b/scripts/patches/vtk/8.1/115_support-gcc10.patch new file mode 100644 index 0000000..182d112 --- /dev/null +++ b/scripts/patches/vtk/8.1/115_support-gcc10.patch @@ -0,0 +1,11 @@ +--- a/CMake/VTKGenerateExportHeader.cmake ++++ b/CMake/VTKGenerateExportHeader.cmake +@@ -174,7 +174,7 @@ + execute_process(COMMAND ${CMAKE_C_COMPILER} --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) +- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the + # patch level, handle this here: diff --git a/scripts/patches/vtk/8.1/20_soversion-sharedlib.patch b/scripts/patches/vtk/8.1/20_soversion-sharedlib.patch new file mode 100644 index 0000000..dfa6165 --- /dev/null +++ b/scripts/patches/vtk/8.1/20_soversion-sharedlib.patch @@ -0,0 +1,25 @@ +Description: _soversion sharedlib +--- a/CMake/vtkModuleMacros.cmake ++++ b/CMake/vtkModuleMacros.cmake +@@ -417,8 +417,8 @@ + function(vtk_target_name _name) + get_property(_type TARGET ${_name} PROPERTY TYPE) + if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL) +- set_property(TARGET ${_name} PROPERTY VERSION 1) +- set_property(TARGET ${_name} PROPERTY SOVERSION 1) ++ set_property(TARGET ${_name} PROPERTY VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}) ++ set_property(TARGET ${_name} PROPERTY SOVERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) + endif() + if("${_name}" MATCHES "^[Vv][Tt][Kk]") + set(_vtk "") +--- a/Rendering/Tk/CMakeLists.txt ++++ b/Rendering/Tk/CMakeLists.txt +@@ -118,7 +118,7 @@ + vtk_target_install(vtkRenderingPythonTkWidgets) + + set_property(TARGET vtkRenderingPythonTkWidgets PROPERTY OUTPUT_NAME +- vtkRenderingPythonTkWidgets-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) ++ vtkRenderingPythonTkWidgets) + + set(Module_PYTHON_LIBS ${VTK_TK_LIBRARIES}) + if(VTK_USE_X) diff --git a/scripts/patches/vtk/8.1/30_matplotlib.patch b/scripts/patches/vtk/8.1/30_matplotlib.patch new file mode 100644 index 0000000..2628a9d --- /dev/null +++ b/scripts/patches/vtk/8.1/30_matplotlib.patch @@ -0,0 +1,14 @@ +Description: _matplotlib +--- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h ++++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h +@@ -156,6 +156,10 @@ + * to implement IsAvailable. + */ + static Availability CheckMPLAvailability(); ++ static void DisableMPL() ++ { ++ MPLMathTextAvailable = UNAVAILABLE; ++ }; + + //@{ + /** diff --git a/scripts/patches/vtk/8.1/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch b/scripts/patches/vtk/8.1/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch new file mode 100644 index 0000000..87f1e8d --- /dev/null +++ b/scripts/patches/vtk/8.1/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch @@ -0,0 +1,25 @@ +From dae1718d50bec1b40b860280acafbdd94fc4cd5d Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Sat, 21 Nov 2020 13:37:34 -0500 +Subject: [PATCH] vtkFreeTypeTools: avoid using an internal macro + +This macro has been removed upstream as it was always intended to be +private. +--- + Rendering/FreeType/vtkFreeTypeTools.cxx | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +Index: vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx +=================================================================== +--- vtk7.orig/Rendering/FreeType/vtkFreeTypeTools.cxx ++++ vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx +@@ -273,8 +273,7 @@ + } + + //---------------------------------------------------------------------------- +-FT_CALLBACK_DEF(FT_Error) +-vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) diff --git a/scripts/patches/vtk/8.1/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch b/scripts/patches/vtk/8.1/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch new file mode 100644 index 0000000..8267266 --- /dev/null +++ b/scripts/patches/vtk/8.1/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch @@ -0,0 +1,23 @@ +From 31e8e4ebeb3152f7cfdb3f14f24f7e5d31a4f8b5 Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Sun, 22 Nov 2020 20:04:19 -0500 +Subject: [PATCH] vtkFontConfigFreeTypeTools: remove last FT_CALLBACK_DEF usage + +--- + Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +index 5c1908cf24b..818ff058bb9 100644 +--- a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx ++++ b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +@@ -31,8 +31,7 @@ vtkStandardNewMacro(vtkFontConfigFreeTypeTools); + namespace + { + // The FreeType face requester callback: +-FT_CALLBACK_DEF(FT_Error) +-vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) diff --git a/scripts/patches/vtk/8.1/60_use_system_mpi4py.patch b/scripts/patches/vtk/8.1/60_use_system_mpi4py.patch new file mode 100644 index 0000000..a7163eb --- /dev/null +++ b/scripts/patches/vtk/8.1/60_use_system_mpi4py.patch @@ -0,0 +1,33 @@ +Description: use system mpi4py +Author: Anton Gladky +Last-Update: 2015-03-24 + +--- a/Parallel/MPI4Py/CMakeLists.txt ++++ b/Parallel/MPI4Py/CMakeLists.txt +@@ -18,7 +18,7 @@ if(VTK_USE_SYSTEM_MPI4PY) + mark_as_advanced(MPI4PY_INCLUDE_DIR) + endif() + else() +- set(MPI4PY_INCLUDE_DIR "${vtkmpi4py_SOURCE_DIR}/vtkmpi4py/src/include") ++ set(MPI4PY_INCLUDE_DIR "/usr/include") + endif() + include_directories("${MPI4PY_INCLUDE_DIR}") + +--- a/Parallel/MPI4Py/module.cmake ++++ b/Parallel/MPI4Py/module.cmake +@@ -5,7 +5,6 @@ if (VTK_WRAP_PYTHON) + DEPENDS + vtkParallelMPI + COMPILE_DEPENDS +- vtkmpi4py + vtkPython + OPTIONAL_PYTHON_LINK + EXCLUDE_FROM_TCL_WRAPPING +@@ -18,4 +17,5 @@ if (VTK_WRAP_PYTHON) + PRIVATE_DEPENDS + vtkParallelMPI + ) +-endif () +\ No newline at end of file ++endif () ++ diff --git a/scripts/patches/vtk/8.1/60_vtk8_use_system_mpi4py.patch b/scripts/patches/vtk/8.1/60_vtk8_use_system_mpi4py.patch new file mode 100644 index 0000000..d22b013 --- /dev/null +++ b/scripts/patches/vtk/8.1/60_vtk8_use_system_mpi4py.patch @@ -0,0 +1,30 @@ +Description: use system mpi4py +Author: Anton Gladky +Last-Update: 2015-03-24 + +--- a/Parallel/MPI4Py/CMakeLists.txt ++++ b/Parallel/MPI4Py/CMakeLists.txt +@@ -18,7 +18,7 @@ + mark_as_advanced(MPI4PY_INCLUDE_DIR) + endif() + else() +- set(MPI4PY_INCLUDE_DIR "${vtkmpi4py_SOURCE_DIR}/vtkmpi4py/src/include") ++ set(MPI4PY_INCLUDE_DIR "/usr/include") + endif() + include_directories("${MPI4PY_INCLUDE_DIR}") + +--- a/Parallel/MPI4Py/module.cmake ++++ b/Parallel/MPI4Py/module.cmake +@@ -5,7 +5,6 @@ if (VTK_WRAP_PYTHON) + DEPENDS + vtkParallelMPI + COMPILE_DEPENDS +- vtkmpi4py + vtkPython + OPTIONAL_PYTHON_LINK + EXCLUDE_FROM_JAVA_WRAPPING +@@ -18,3 +17,4 @@ if (VTK_WRAP_PYTHON) + vtkParallelMPI + ) + endif () ++ diff --git a/scripts/patches/vtk8-70_fix_ftbfs_gcc49.patch b/scripts/patches/vtk/8.1/70_vtk8_fix_ftbfs_gcc49.patch similarity index 100% rename from scripts/patches/vtk8-70_fix_ftbfs_gcc49.patch rename to scripts/patches/vtk/8.1/70_vtk8_fix_ftbfs_gcc49.patch diff --git a/scripts/patches/vtk/8.1/mysq8_my_bool.patch b/scripts/patches/vtk/8.1/mysq8_my_bool.patch new file mode 100644 index 0000000..0547317 --- /dev/null +++ b/scripts/patches/vtk/8.1/mysq8_my_bool.patch @@ -0,0 +1,22 @@ +Description: Reintroduce my_bool to fix build with MySQL 8 + (patch inspired from the one in cppdb 0.3.1+dfsg-8ubuntu2) +Author: Gianfranco Costamagna , Andreas Hasenack +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1863026 +Forwarded: no +Last-Update: 2020-12-15 + +diff --git a/IO/MySQL/vtkMySQLDatabasePrivate.h b/IO/MySQL/vtkMySQLDatabasePrivate.h +index 4deb747..8e0c9e3 100644 +--- a/IO/MySQL/vtkMySQLDatabasePrivate.h ++++ b/IO/MySQL/vtkMySQLDatabasePrivate.h +@@ -7,6 +7,10 @@ + + #include "vtkIOMySQLModule.h" // For export macro + #include // needed for MYSQL typedefs ++#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) && \ ++ MYSQL_VERSION_ID >= 80001 && MYSQL_VERSION_ID != 80002 ++typedef bool my_bool; ++#endif + + class VTKIOMYSQL_EXPORT vtkMySQLDatabasePrivate + { diff --git a/scripts/patches/vtk8-gcc-11-exodus.patch b/scripts/patches/vtk/8.1/vtk8-gcc-11-exodus.patch similarity index 100% rename from scripts/patches/vtk8-gcc-11-exodus.patch rename to scripts/patches/vtk/8.1/vtk8-gcc-11-exodus.patch diff --git a/scripts/patches/vtk/8.2/100_javac-heap.patch b/scripts/patches/vtk/8.2/100_javac-heap.patch new file mode 100644 index 0000000..a6e8a7f --- /dev/null +++ b/scripts/patches/vtk/8.2/100_javac-heap.patch @@ -0,0 +1,18 @@ +Description: set JVM max memory to 1024m. +Author: Matthias Klose +Acked-By: Anton Gladky +Last-Update: 2016-02-12 + +Index: VTK-6.3.0/Wrapping/Java/CMakeLists.txt +=================================================================== +--- VTK-6.3.0.orig/Wrapping/Java/CMakeLists.txt ++++ VTK-6.3.0/Wrapping/Java/CMakeLists.txt +@@ -80,6 +80,8 @@ if(APPLE) + set(JAVAC_OPTIONS -J-Xmx512m) + endif() + ++set(JAVAC_OPTIONS -J-Xmx1024m) ++ + get_property(java_modules GLOBAL PROPERTY VTK_JAVA_WRAPPED) + foreach(module IN LISTS java_modules) + if(NOT ${module}_EXCLUDE_FROM_WRAPPING) diff --git a/scripts/patches/vtk/8.2/101_java_install_path.patch b/scripts/patches/vtk/8.2/101_java_install_path.patch new file mode 100644 index 0000000..18af20a --- /dev/null +++ b/scripts/patches/vtk/8.2/101_java_install_path.patch @@ -0,0 +1,21 @@ +Description: Install Java modules in the correct path + This patch corrects the installation of the native Java modules + to go to the path given by the Debian Java Policy. This helps + to later use the simple install file to get them to the right + location in the package. +Author: Gert Wollny +Description: Delete java files before building jar +--- a/Wrapping/Java/CMakeLists.txt ++++ b/Wrapping/Java/CMakeLists.txt +@@ -259,7 +259,7 @@ + if(VTK_JAVA_SWT_COMPONENT) + set(VTK_JAVA_SAMPLE_DEPENDENCIES ${VTK_JAVA_SAMPLE_DEPENDENCIES} + rendering/SwtConeRendering +- ) ++q ) + endif() + endif() + +@@ -358,11 +358,10 @@ + COMMENT "Compiling Java Classes" + ) + +-# Create the JAR file containing all compiled classes and ++ + add_custom_command( +- COMMAND ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" +- -C ${VTK_BINARY_DIR}/java +- vtk ++ COMMAND cd ${VTK_BINARY_DIR}/java && find . -name "*.class" -print | sort -u > classes.list ++ COMMAND cd ${VTK_BINARY_DIR}/java && ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" @${VTK_BINARY_DIR}/java/classes.list + DEPENDS ${VTK_BINARY_DIR}/java/javac_stamp.txt ${JAVA_LIBRARIES} + OUTPUT ${VTK_JAR_PATH}/vtk.jar + COMMENT "Java Archive" diff --git a/scripts/patches/vtk/8.2/110_python-371.patch b/scripts/patches/vtk/8.2/110_python-371.patch new file mode 100644 index 0000000..375624e --- /dev/null +++ b/scripts/patches/vtk/8.2/110_python-371.patch @@ -0,0 +1,16 @@ +Author: Gert Wollny +Description: Work around compile bug with python 3.7.1 +Debian-Bug: https://bugs.debian.org/914347 +diff --git a/Wrapping/PythonCore/vtkPythonArgs.cxx b/Wrapping/PythonCore/vtkPythonArgs.cxx +index 1b1e4b9..682f8b8 100644 +--- a/Wrapping/PythonCore/vtkPythonArgs.cxx ++++ b/Wrapping/PythonCore/vtkPythonArgs.cxx +@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext) + else if (PyUnicode_Check(o)) + { + #if PY_VERSION_HEX >= 0x03030000 +- a = PyUnicode_AsUTF8(o); ++ a = const_cast(PyUnicode_AsUTF8(o)); + return true; + #else + PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL); diff --git a/scripts/patches/vtk/8.2/111_fix_perl.patch b/scripts/patches/vtk/8.2/111_fix_perl.patch new file mode 100644 index 0000000..c79c07a --- /dev/null +++ b/scripts/patches/vtk/8.2/111_fix_perl.patch @@ -0,0 +1,66 @@ +Author: Gert Wollny +Description: Fix the perl shebangs (lintian) +--- a/Utilities/Doxygen/doc_class2example.pl ++++ b/Utilities/Doxygen/doc_class2example.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2004-06-09 11:12:38 barre> + # + # Build cross-references between classes and examples +--- a/Utilities/Doxygen/doc_cleanhtml.pl ++++ b/Utilities/Doxygen/doc_cleanhtml.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-10-25 20:17:59 barre> + # + # Clean the HTML generated by Doxygen to remove some layout quicks +--- a/Utilities/Doxygen/doc_codematch.pl ++++ b/Utilities/Doxygen/doc_codematch.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-01-18 16:17:26 barre> + # + # Summary ? +--- a/Utilities/Doxygen/doc_contributors.pl ++++ b/Utilities/Doxygen/doc_contributors.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2002-11-01 15:33:04 barre> + # + # Get author and contributors. +--- a/Utilities/Doxygen/doc_header2doxygen.pl ++++ b/Utilities/Doxygen/doc_header2doxygen.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2011-01-16 21:15:53 barre> + # + # Convert VTK headers to doxygen format +--- a/Utilities/Doxygen/doc_index.pl ++++ b/Utilities/Doxygen/doc_index.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2001-11-21 17:40:48 barre> + # + # Build full-text index +--- a/Utilities/Doxygen/doc_rmpath.pl ++++ b/Utilities/Doxygen/doc_rmpath.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2001-10-05 11:49:40 barre> + # + # Remove path to intermediate Doxygen dir from html doc +--- a/Utilities/Doxygen/doc_version.pl ++++ b/Utilities/Doxygen/doc_version.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/bin/perl + # Time-stamp: <2006-11-15 13:25:02 barre> + # + # Extract VTK version and add it to documentation diff --git a/scripts/patches/vtk/8.2/112_riscv_support.patch b/scripts/patches/vtk/8.2/112_riscv_support.patch new file mode 100644 index 0000000..6b9f4bd --- /dev/null +++ b/scripts/patches/vtk/8.2/112_riscv_support.patch @@ -0,0 +1,15 @@ +Changes taken from https://gitlab.kitware.com/vtk/vtk/blob/master/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h + +--- vtk7-7.1.1+dfsg1.orig/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h ++++ vtk7-7.1.1+dfsg1/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h +@@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY wa + #elif defined(__XTENSA_EL__) + # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE + ++/* RISC-V */ ++#elif defined(__riscv) || defined(__riscv__) ++# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE ++ + /* Unknown CPU */ + #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) + # error "Byte order of target CPU unknown." diff --git a/scripts/patches/vtk/8.2/113_vtk8_fix_python_equal.patch b/scripts/patches/vtk/8.2/113_vtk8_fix_python_equal.patch new file mode 100644 index 0000000..66827c3 --- /dev/null +++ b/scripts/patches/vtk/8.2/113_vtk8_fix_python_equal.patch @@ -0,0 +1,14 @@ +Description: Fix comparison with literal +Author: Gert Wollny +Debian-Bug: https://bugs.debian.org/950539 +--- a/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py ++++ b/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py +@@ -197,7 +197,7 @@ + return dsa.NoneArray; + + if res is dsa.NoneArray: +- if max_dims is 1: ++ if max_dims == 1: + # Weird trick to make the array look like a scalar + max_dims = () + res = numpy.empty(max_dims) diff --git a/scripts/patches/vtk/8.2/115_support-gcc10.patch b/scripts/patches/vtk/8.2/115_support-gcc10.patch new file mode 100644 index 0000000..182d112 --- /dev/null +++ b/scripts/patches/vtk/8.2/115_support-gcc10.patch @@ -0,0 +1,11 @@ +--- a/CMake/VTKGenerateExportHeader.cmake ++++ b/CMake/VTKGenerateExportHeader.cmake +@@ -174,7 +174,7 @@ + execute_process(COMMAND ${CMAKE_C_COMPILER} --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) +- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the + # patch level, handle this here: diff --git a/scripts/patches/vtk/8.2/20_soversion-sharedlib.patch b/scripts/patches/vtk/8.2/20_soversion-sharedlib.patch new file mode 100644 index 0000000..dfa6165 --- /dev/null +++ b/scripts/patches/vtk/8.2/20_soversion-sharedlib.patch @@ -0,0 +1,25 @@ +Description: _soversion sharedlib +--- a/CMake/vtkModuleMacros.cmake ++++ b/CMake/vtkModuleMacros.cmake +@@ -417,8 +417,8 @@ + function(vtk_target_name _name) + get_property(_type TARGET ${_name} PROPERTY TYPE) + if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL) +- set_property(TARGET ${_name} PROPERTY VERSION 1) +- set_property(TARGET ${_name} PROPERTY SOVERSION 1) ++ set_property(TARGET ${_name} PROPERTY VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}) ++ set_property(TARGET ${_name} PROPERTY SOVERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) + endif() + if("${_name}" MATCHES "^[Vv][Tt][Kk]") + set(_vtk "") +--- a/Rendering/Tk/CMakeLists.txt ++++ b/Rendering/Tk/CMakeLists.txt +@@ -118,7 +118,7 @@ + vtk_target_install(vtkRenderingPythonTkWidgets) + + set_property(TARGET vtkRenderingPythonTkWidgets PROPERTY OUTPUT_NAME +- vtkRenderingPythonTkWidgets-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) ++ vtkRenderingPythonTkWidgets) + + set(Module_PYTHON_LIBS ${VTK_TK_LIBRARIES}) + if(VTK_USE_X) diff --git a/scripts/patches/vtk/8.2/30_matplotlib.patch b/scripts/patches/vtk/8.2/30_matplotlib.patch new file mode 100644 index 0000000..2628a9d --- /dev/null +++ b/scripts/patches/vtk/8.2/30_matplotlib.patch @@ -0,0 +1,14 @@ +Description: _matplotlib +--- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h ++++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h +@@ -156,6 +156,10 @@ + * to implement IsAvailable. + */ + static Availability CheckMPLAvailability(); ++ static void DisableMPL() ++ { ++ MPLMathTextAvailable = UNAVAILABLE; ++ }; + + //@{ + /** diff --git a/scripts/patches/vtk/8.2/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch b/scripts/patches/vtk/8.2/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch new file mode 100644 index 0000000..87f1e8d --- /dev/null +++ b/scripts/patches/vtk/8.2/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch @@ -0,0 +1,25 @@ +From dae1718d50bec1b40b860280acafbdd94fc4cd5d Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Sat, 21 Nov 2020 13:37:34 -0500 +Subject: [PATCH] vtkFreeTypeTools: avoid using an internal macro + +This macro has been removed upstream as it was always intended to be +private. +--- + Rendering/FreeType/vtkFreeTypeTools.cxx | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +Index: vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx +=================================================================== +--- vtk7.orig/Rendering/FreeType/vtkFreeTypeTools.cxx ++++ vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx +@@ -273,8 +273,7 @@ + } + + //---------------------------------------------------------------------------- +-FT_CALLBACK_DEF(FT_Error) +-vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) diff --git a/scripts/patches/vtk/8.2/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch b/scripts/patches/vtk/8.2/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch new file mode 100644 index 0000000..8267266 --- /dev/null +++ b/scripts/patches/vtk/8.2/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch @@ -0,0 +1,23 @@ +From 31e8e4ebeb3152f7cfdb3f14f24f7e5d31a4f8b5 Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Sun, 22 Nov 2020 20:04:19 -0500 +Subject: [PATCH] vtkFontConfigFreeTypeTools: remove last FT_CALLBACK_DEF usage + +--- + Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +index 5c1908cf24b..818ff058bb9 100644 +--- a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx ++++ b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +@@ -31,8 +31,7 @@ vtkStandardNewMacro(vtkFontConfigFreeTypeTools); + namespace + { + // The FreeType face requester callback: +-FT_CALLBACK_DEF(FT_Error) +-vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, ++static FT_Error vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, + FT_Library lib, + FT_Pointer request_data, + FT_Face* face) diff --git a/scripts/patches/vtk/8.2/60_vtk8_use_system_mpi4py.patch b/scripts/patches/vtk/8.2/60_vtk8_use_system_mpi4py.patch new file mode 100644 index 0000000..d22b013 --- /dev/null +++ b/scripts/patches/vtk/8.2/60_vtk8_use_system_mpi4py.patch @@ -0,0 +1,30 @@ +Description: use system mpi4py +Author: Anton Gladky +Last-Update: 2015-03-24 + +--- a/Parallel/MPI4Py/CMakeLists.txt ++++ b/Parallel/MPI4Py/CMakeLists.txt +@@ -18,7 +18,7 @@ + mark_as_advanced(MPI4PY_INCLUDE_DIR) + endif() + else() +- set(MPI4PY_INCLUDE_DIR "${vtkmpi4py_SOURCE_DIR}/vtkmpi4py/src/include") ++ set(MPI4PY_INCLUDE_DIR "/usr/include") + endif() + include_directories("${MPI4PY_INCLUDE_DIR}") + +--- a/Parallel/MPI4Py/module.cmake ++++ b/Parallel/MPI4Py/module.cmake +@@ -5,7 +5,6 @@ if (VTK_WRAP_PYTHON) + DEPENDS + vtkParallelMPI + COMPILE_DEPENDS +- vtkmpi4py + vtkPython + OPTIONAL_PYTHON_LINK + EXCLUDE_FROM_JAVA_WRAPPING +@@ -18,3 +17,4 @@ if (VTK_WRAP_PYTHON) + vtkParallelMPI + ) + endif () ++ diff --git a/scripts/patches/vtk/8.2/70_vtk8_fix_ftbfs_gcc49.patch b/scripts/patches/vtk/8.2/70_vtk8_fix_ftbfs_gcc49.patch new file mode 100644 index 0000000..cc227fc --- /dev/null +++ b/scripts/patches/vtk/8.2/70_vtk8_fix_ftbfs_gcc49.patch @@ -0,0 +1,127 @@ +Description: fix compilation with gcc-4.9 +Bug-Debian: https://bugs.debian.org/746923 +Forwarded: https://github.com/Kitware/VTK/pull/7 +Author: Anton Gladky +Last-Update: 2014-05-30 +--- a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx ++++ b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx +@@ -1206,7 +1206,10 @@ + vtkIdType cellsPerNode = numTotalCells / nprocs; + + vtkIdList **sendCells = new vtkIdList * [ nprocs ]; +- memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); ++ ++ if (sizeof(vtkIdList *) * nprocs > 0) { ++ memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); ++ } + + if (numConsumers == nprocs - 1) + { +@@ -1700,7 +1703,9 @@ + // Exchange int arrays + + float **recvArrays = new float * [nprocs]; +- memset(recvArrays, 0, sizeof(float *) * nprocs); ++ if (sizeof(float *) * nprocs > 0) { ++ memset(recvArrays, 0, sizeof(float *) * nprocs); ++ } + + if (sendSize[me] > 0) // sent myself an array + { +@@ -1822,7 +1827,9 @@ + // Exchange int arrays + + vtkIdType **recvArrays = new vtkIdType * [nprocs]; +- memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); ++ if (sizeof(vtkIdType *) * nprocs > 0) { ++ memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); ++ } + + if (sendSize[me] > 0) // sent myself an array + { +@@ -2938,7 +2945,9 @@ + if (npoints) + { + unsigned char *vals = new unsigned char [npoints]; +- memset(vals, val, npoints); ++ if (npoints > 0) { ++ memset(vals, val, npoints); ++ } + + Array->SetArray(vals, npoints, 0, + vtkUnsignedCharArray::VTK_DATA_ARRAY_DELETE); +@@ -2960,7 +2969,9 @@ + if (ncells) + { + unsigned char *vals = new unsigned char [ncells]; +- memset(vals, val, ncells); ++ if (ncells > 0) { ++ memset(vals, val, ncells); ++ } + + Array->SetArray(vals, ncells, 0, vtkUnsignedCharArray::VTK_DATA_ARRAY_DELETE); + } +@@ -3167,7 +3178,9 @@ + vtkIdType nGridPoints = grid->GetNumberOfPoints(); + + vtkIdType *numPointsOutside = new vtkIdType [nprocs]; +- memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); ++ if (sizeof(vtkIdType) * nprocs > 0) { ++ memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); ++ } + + vtkIdTypeArray *globalIds = vtkIdTypeArray::New(); + globalIds->SetNumberOfValues(nGridPoints); +@@ -3249,10 +3262,16 @@ + // global ID back? + + vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs]; +- memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); ++ ++ if (sizeof(vtkFloatArray *) * nprocs > 0) { ++ memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); ++ } + + vtkIdTypeArray **localIds = new vtkIdTypeArray * [nprocs]; +- memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ ++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { ++ memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + vtkIdType *next = new vtkIdType [nprocs]; + vtkIdType *next3 = new vtkIdType [nprocs]; +@@ -3430,7 +3449,9 @@ + { + // There are no cells in my assigned region + +- memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { ++ memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + return gids; + } +@@ -3641,7 +3662,10 @@ + std::multimap::iterator mapIt; + + vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs]; +- memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); ++ ++ if (sizeof (vtkIdTypeArray *) * nprocs > 0) { ++ memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); ++ } + + for (int i=0; iGetNumberOfPoints(); + + vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs]; +- memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ if (sizeof(vtkIdTypeArray *) * nprocs) { ++ memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); ++ } + + if (numPoints < 1) + { diff --git a/scripts/patches/vtk/8.2/mysq8_my_bool.patch b/scripts/patches/vtk/8.2/mysq8_my_bool.patch new file mode 100644 index 0000000..0547317 --- /dev/null +++ b/scripts/patches/vtk/8.2/mysq8_my_bool.patch @@ -0,0 +1,22 @@ +Description: Reintroduce my_bool to fix build with MySQL 8 + (patch inspired from the one in cppdb 0.3.1+dfsg-8ubuntu2) +Author: Gianfranco Costamagna , Andreas Hasenack +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1863026 +Forwarded: no +Last-Update: 2020-12-15 + +diff --git a/IO/MySQL/vtkMySQLDatabasePrivate.h b/IO/MySQL/vtkMySQLDatabasePrivate.h +index 4deb747..8e0c9e3 100644 +--- a/IO/MySQL/vtkMySQLDatabasePrivate.h ++++ b/IO/MySQL/vtkMySQLDatabasePrivate.h +@@ -7,6 +7,10 @@ + + #include "vtkIOMySQLModule.h" // For export macro + #include // needed for MYSQL typedefs ++#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) && \ ++ MYSQL_VERSION_ID >= 80001 && MYSQL_VERSION_ID != 80002 ++typedef bool my_bool; ++#endif + + class VTKIOMYSQL_EXPORT vtkMySQLDatabasePrivate + { diff --git a/scripts/patches/vtk/8.2/vtk8-gcc-11-exodus.patch b/scripts/patches/vtk/8.2/vtk8-gcc-11-exodus.patch new file mode 100644 index 0000000..06e0c03 --- /dev/null +++ b/scripts/patches/vtk/8.2/vtk8-gcc-11-exodus.patch @@ -0,0 +1,22 @@ +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c +index 8d5d6734f0ad2df04393cf7909ef2c342785e1ac..ef439618dae7b90fdf1057f7051c6a9f0bf1f72d 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c +@@ -216,5 +216,5 @@ int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, MPI + * Prevent warning in some versions of ranlib(1) because the object + * file has no symbols. + */ +-const char exodus_unused_symbol_dummy_1; ++const char exodus_unused_symbol_dummy_ex_create_par; + #endif +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c +index b2faa22c29489446030f537bb6b3a26feb86c50b..9df4818767d07a3020f1363fe2a8b9f2fcac634a 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c +@@ -459,5 +459,5 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + * Prevent warning in some versions of ranlib(1) because the object + * file has no symbols. + */ +-const char exodus_unused_symbol_dummy_1; ++const char exodus_unused_symbol_dummy_ex_open_par; + #endif diff --git a/scripts/patches/vtk/9.0/50_fix_python-modules_path.patch b/scripts/patches/vtk/9.0/50_fix_python-modules_path.patch new file mode 100644 index 0000000..61e6fc9 --- /dev/null +++ b/scripts/patches/vtk/9.0/50_fix_python-modules_path.patch @@ -0,0 +1,30 @@ +Description: Fix path for the installation of python modules +Author: Anton Gladky +Last-Update: 2020-11-06 + +Index: vtk9-9.0.1+dfsg1/CMake/vtkModuleWrapPython.cmake +=================================================================== +--- vtk9-9.0.1+dfsg1.orig/CMake/vtkModuleWrapPython.cmake ++++ vtk9-9.0.1+dfsg1/CMake/vtkModuleWrapPython.cmake +@@ -84,7 +84,7 @@ function (vtk_module_python_default_dest + "for Python modules.") + set(_vtk_python_version_suffix) + endif () +- set(destination "${CMAKE_INSTALL_LIBDIR}/python${_vtk_python_version_suffix}/site-packages") ++ set(destination "lib/python3/dist-packages") + endif () + + set("${var}" "${destination}" PARENT_SCOPE) +Index: vtk9-9.0.1+dfsg1/Utilities/Python/CMakeLists.txt +=================================================================== +--- vtk9-9.0.1+dfsg1.orig/Utilities/Python/CMakeLists.txt ++++ vtk9-9.0.1+dfsg1/Utilities/Python/CMakeLists.txt +@@ -77,7 +77,7 @@ if (NOT VTK_PYTHON_SITE_PACKAGES_SUFFIX) + set(VTK_PYTHON_SITE_PACKAGES_SUFFIX "Lib/site-packages") + else () + set(VTK_PYTHON_SITE_PACKAGES_SUFFIX +- "python${vtk_python_version_pair}/site-packages") ++ "python3/dist-packages") + endif () + endif () + diff --git a/scripts/patches/vtk/9.0/70_fix_python_numpy_warning.patch b/scripts/patches/vtk/9.0/70_fix_python_numpy_warning.patch new file mode 100644 index 0000000..2473932 --- /dev/null +++ b/scripts/patches/vtk/9.0/70_fix_python_numpy_warning.patch @@ -0,0 +1,15 @@ +Description: Fix python numpy warning +Author: Anton Gladky +Last-Update: 2020-11-09 + +--- vtk9-9.0.1+dfsg1.orig/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py ++++ vtk9-9.0.1+dfsg1/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py +@@ -206,7 +206,7 @@ def _global_func(impl, array, axis, cont + return dsa.NoneArray; + + if res is dsa.NoneArray: +- if max_dims is 1: ++ if max_dims == 1: + # Weird trick to make the array look like a scalar + max_dims = () + res = numpy.empty(max_dims) diff --git a/scripts/patches/vtk9.0-fix-limits.patch b/scripts/patches/vtk/9.0/fix-limits.patch similarity index 100% rename from scripts/patches/vtk9.0-fix-limits.patch rename to scripts/patches/vtk/9.0/fix-limits.patch diff --git a/scripts/patches/vtk/9.2/gcc-13.patch b/scripts/patches/vtk/9.2/gcc-13.patch new file mode 100644 index 0000000..e5261b6 --- /dev/null +++ b/scripts/patches/vtk/9.2/gcc-13.patch @@ -0,0 +1,30 @@ +From 1233ceec268d5366c66f5e79786ec784042b591b Mon Sep 17 00:00:00 2001 +From: Laurent Rineau +Date: Tue, 17 Jan 2023 16:18:53 +0100 +Subject: Add #include to compile with gcc13 +Origin: upstream, https://gitlab.kitware.com/vtk/vtk/-/commit/1233ceec268d5366c66f5e79786ec784042b591b + +The `vtkSEPReader` was introduced by MRs !4909 (from my former +collaborator Maxime) and !4938. Then it was highly modified by +!7516. The later MR is the one that introduced the uses of +`std::uint8_t` and `std::uint32_t`. + +Those types needs the inclusion of ``. +--- + IO/Image/vtkSEPReader.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- vtk9.orig/IO/Image/vtkSEPReader.h ++++ vtk9/IO/Image/vtkSEPReader.h +@@ -25,8 +25,9 @@ + #include "vtkImageAlgorithm.h" + #include "vtkNew.h" // for ivars + +-#include // for std::array +-#include // for std::string ++#include // for std::array ++#include // for std::uint8_t and std::uint32_t ++#include // for std::string + + namespace details + { diff --git a/scripts/patches/vtk6.3.patch b/scripts/patches/vtk6.3.patch deleted file mode 100644 index 1a86517..0000000 --- a/scripts/patches/vtk6.3.patch +++ /dev/null @@ -1,692 +0,0 @@ -unchanged: ---- VTK-6.2.0.orig/Wrapping/Tcl/vtkTkAppInit.cxx -+++ VTK-6.2.0/Wrapping/Tcl/vtkTkAppInit.cxx -@@ -165,6 +165,8 @@ int Tcl_AppInit(Tcl_Interp *interp) - // Help Tcl find the Tcl/Tk helper files. - const char* relative_dirs[] = - { -+ "../share/tcltk", -+ "../../share/tcltk", - "TclTk/lib", - ".." VTK_INSTALL_TCL_DIR, - 0 -unchanged: ---- VTK-6.3.0.orig/CMake/vtkModuleMacros.cmake -+++ VTK-6.3.0/CMake/vtkModuleMacros.cmake -@@ -401,8 +401,8 @@ endfunction() - function(vtk_target_name _name) - get_property(_type TARGET ${_name} PROPERTY TYPE) - if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL) -- set_property(TARGET ${_name} PROPERTY VERSION 1) -- set_property(TARGET ${_name} PROPERTY SOVERSION 1) -+ set_property(TARGET ${_name} PROPERTY VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}) -+ set_property(TARGET ${_name} PROPERTY SOVERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) - endif() - if("${_name}" MATCHES "^[Vv][Tt][Kk]") - set(_vtk "") -unchanged: ---- VTK-6.3.0.orig/Rendering/Tk/CMakeLists.txt -+++ VTK-6.3.0/Rendering/Tk/CMakeLists.txt -@@ -122,7 +122,7 @@ if(TK_FOUND AND VTK_USE_TK) - vtk_target_install(vtkRenderingPythonTkWidgets) - - set_property(TARGET vtkRenderingPythonTkWidgets PROPERTY OUTPUT_NAME -- vtkRenderingPythonTkWidgets-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) -+ vtkRenderingPythonTkWidgets) - - set(Module_PYTHON_LIBS ${VTK_TK_LIBRARIES}) - if(VTK_USE_X) -unchanged: ---- VTK-6.3.0.orig/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h -+++ VTK-6.3.0/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h -@@ -143,6 +143,10 @@ private: - // is called internally when matplotlib rendering is first needed and is used - // to implement IsAvailable. - static Availability CheckMPLAvailability(); -+ static void DisableMPL() -+ { -+ MPLMathTextAvailable = UNAVAILABLE; -+ }; - - // Description: - // Cache the availability of matplotlib in the current python session. -unchanged: ---- VTK-6.3.0.orig/IO/GDAL/vtkGDALVectorReader.cxx -+++ VTK-6.3.0/IO/GDAL/vtkGDALVectorReader.cxx -@@ -44,7 +44,11 @@ class vtkGDALVectorReader::Internal - public: - Internal( const char* srcName, int srcMode, int appendFeatures, int addFeatIds ) - { -+#if GDAL_VERSION_MAJOR < 2 - this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver ); -+#else -+ this->Source = (GDALDataset*) OGROpen( srcName, srcMode, NULL ); -+#endif - if ( ! this->Source ) - { - this->LastError = CPLGetLastErrorMsg(); -@@ -61,7 +65,11 @@ public: - { - if ( this->Source ) - { -+#if GDAL_VERSION_MAJOR < 2 - OGRDataSource::DestroyDataSource( this->Source ); -+#else -+ GDALClose( (GDALDatasetH) this->Source ); -+#endif - } - } - -@@ -307,7 +315,11 @@ public: - return nCells; - } - -+#if GDAL_VERSION_MAJOR < 2 - OGRDataSource* Source; -+#else -+ GDALDataset* Source; -+#endif - OGRSFDriver* Driver; - const char* LastError; - int LayerIdx; -unchanged: ---- a/CMake/vtkTestFFMPEG.cmake -+++ b/CMake/vtkTestFFMPEG.cmake -@@ -32,8 +32,8 @@ - #include <${FFMEG_CODEC_HEADER_PATH}/avcodec.h> - int main() - { -- img_convert(0, PIX_FMT_RGB24, -- 0, PIX_FMT_RGB24, -+ img_convert(0, AV_PIX_FMT_RGB24, -+ 0, AV_PIX_FMT_RGB24, - 0, 0); - return 0; - }\n") -unchanged: ---- a/IO/FFMPEG/vtkFFMPEGWriter.cxx -+++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx -@@ -191,11 +191,11 @@ - c->height = this->Dim[1]; - if (this->Writer->GetCompression()) - { -- c->pix_fmt = PIX_FMT_YUVJ422P; -+ c->pix_fmt = AV_PIX_FMT_YUVJ422P; - } - else - { -- c->pix_fmt = PIX_FMT_BGR24; -+ c->pix_fmt = AV_PIX_FMT_BGR24; - } - - //to do playback at actual recorded rate, this will need more work see also below -@@ -274,13 +274,13 @@ - #endif - - //for the output of the writer's input... -- this->rgbInput = avcodec_alloc_frame(); -+ this->rgbInput = av_frame_alloc(); - if (!this->rgbInput) - { - vtkGenericWarningMacro (<< "Could not make rgbInput avframe." ); - return 0; - } -- int RGBsize = avpicture_get_size(PIX_FMT_RGB24, c->width, c->height); -+ int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height); - unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize); - if (!rgb) - { -@@ -288,10 +288,10 @@ - return 0; - } - //The rgb buffer should get deleted when this->rgbInput is. -- avpicture_fill((AVPicture *)this->rgbInput, rgb, PIX_FMT_RGB24, c->width, c->height); -+ avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); - - //and for the output to the codec's input. -- this->yuvOutput = avcodec_alloc_frame(); -+ this->yuvOutput = av_frame_alloc(); - if (!this->yuvOutput) - { - vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." ); -@@ -349,12 +349,12 @@ - //convert that to YUV for input to the codec - #ifdef VTK_FFMPEG_HAS_IMG_CONVERT - img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt, -- (AVPicture *)this->rgbInput, PIX_FMT_RGB24, -+ (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24, - cc->width, cc->height); - #else - //convert that to YUV for input to the codec - SwsContext* convert_ctx = sws_getContext( -- cc->width, cc->height, PIX_FMT_RGB24, -+ cc->width, cc->height, AV_PIX_FMT_RGB24, - cc->width, cc->height, cc->pix_fmt, - SWS_BICUBIC, NULL, NULL, NULL); - -@@ -447,14 +447,14 @@ - if (this->yuvOutput) - { - av_free(this->yuvOutput->data[0]); -- av_free(this->yuvOutput); -+ av_frame_free(&this->yuvOutput); - this->yuvOutput = NULL; - } - - if (this->rgbInput) - { - av_free(this->rgbInput->data[0]); -- av_free(this->rgbInput); -+ av_frame_free(&this->rgbInput); - this->rgbInput = NULL; - } - -unchanged: ---- a/Common/Core/vtkAbstractArray.h -+++ b/Common/Core/vtkAbstractArray.h -@@ -384,7 +384,7 @@ - // prominence P, we sample N values, with N = f(T; P, U). - // We want f to be sublinear in T in order to interactively handle large - // arrays; in practice, we can make f independent of T: -- // \f$ N >= \frac{5}{P}\mathrm{ln}\left(\frac{1}{PU}) \f$, -+ // \f$ N >= \frac{5}{P}\mathrm{ln}\left(\frac{1}{PU}\right) \f$, - // but note that small values of P are costly to achieve. - // The default parameters will locate prominent values that occur at least - // 1 out of every 1000 samples with a confidence of 0.999999 (= 1 - 1e6). -unchanged: ---- a/Common/Core/vtkMath.h -+++ b/Common/Core/vtkMath.h -@@ -661,14 +661,14 @@ - // The output is provided by overwriting the input A with a matrix of the same size as - // A containing all of the information about L and U. If the output matrix is - // \f$ A* = \left( \begin{array}{cc} -- // a & b \\ % -+ // a & b \\ - // c & d \end{array} \right)\f$ - // then L and U can be obtained as: - // \f$ L = \left( \begin{array}{cc} -- // 1 & 0 \\ % -+ // 1 & 0 \\ - // c & 1 \end{array} \right)\f$ - // \f$ U = \left( \begin{array}{cc} -- // a & b \\ % -+ // a & b \\ - // 0 & d \end{array} \right)\f$ - // - // That is, the diagonal of the resulting A* is the diagonal of U. The upper right -unchanged: ---- VTK-6.3.0.orig/Wrapping/Java/CMakeLists.txt -+++ VTK-6.3.0/Wrapping/Java/CMakeLists.txt -@@ -80,6 +80,8 @@ if(APPLE) - set(JAVAC_OPTIONS -J-Xmx512m) - endif() - -+set(JAVAC_OPTIONS -J-Xmx1024m) -+ - get_property(java_modules GLOBAL PROPERTY VTK_JAVA_WRAPPED) - foreach(module IN LISTS java_modules) - if(NOT ${module}_EXCLUDE_FROM_WRAPPING) -unchanged: ---- VTK-6.3.0.orig/CMake/vtkJavaWrapping.cmake -+++ VTK-6.3.0/CMake/vtkJavaWrapping.cmake -@@ -79,7 +79,7 @@ function(vtk_add_java_wrapping module_na - install(TARGETS ${module_name}Java - EXPORT ${VTK_INSTALL_EXPORT_NAME} - RUNTIME DESTINATION ${VTK_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries -- LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries -+ LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR}/jni COMPONENT RuntimeLibraries - ARCHIVE DESTINATION ${VTK_INSTALL_ARCHIVE_DIR} COMPONENT Development) - endif() - endfunction() -unchanged: ---- VTK-6.3.0.orig/CMakeLists.txt -+++ VTK-6.3.0/CMakeLists.txt -@@ -207,7 +207,7 @@ else() - endif() - - # default to not using the system GLEW as ours has fixes in it right now --set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" FORCE) -+set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" ON) - - set(VTK_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) - -unchanged: ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -546,9 +546,7 @@ - - # The doxygen documentation needs to be aware of all modules. - option(BUILD_DOCUMENTATION "Build the VTK documentation" OFF) --if(BUILD_DOCUMENTATION) -- add_subdirectory(Utilities/Doxygen) --endif() -+add_subdirectory(Utilities/Doxygen) - - # If python wrapping and testing is enabled then add driver scripts to run - # tests. Note: Many pythong tests used to be automatically converted from TCL -unchanged: ---- b/Utilities/Doxygen/CMakeLists.txt -+++ b/Utilities/Doxygen/CMakeLists.txt -@@ -1,69 +1,79 @@ - # - # Build the documentation - # --find_package(Doxygen REQUIRED) --find_package(Perl REQUIRED) --find_package(HTMLHelp) -+if (BUILD_DOCUMENTATION) -+ find_package(Doxygen REQUIRED) -+ find_package(Perl REQUIRED) -+ find_package(HTMLHelp) - --option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) --option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) --option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) --mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) --if(DOXYGEN_SHORT_NAMES) -- set(DOXYGEN_SHORT_NAMES YES) --else() -- set(DOXYGEN_SHORT_NAMES NO) --endif() --if(DOXYGEN_GENERATE_HTMLHELP) -- set(DOXYGEN_GENERATE_HTMLHELP YES) --else() -- set(DOXYGEN_GENERATE_HTMLHELP NO) --endif() -- --# --# Configure the script and the doxyfile, then add target --# --set(HAVE_DOT_YESNO NO) --if(DOT) -- set(HAVE_DOT_YESNO YES) -- if(NOT DOT_PATH) -- get_filename_component(DOT_PATH ${DOT} PATH) -+ option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) -+ option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) -+ option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) -+ mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) -+ if(DOXYGEN_SHORT_NAMES) -+ set(DOXYGEN_SHORT_NAMES YES) -+ else() -+ set(DOXYGEN_SHORT_NAMES NO) - endif() --endif() -- --# Build up a list of all module source directories. Note that this should be --# all source directories and so does not use the normal variables. --unset(VTK_MODULE_DIRS_DOXYGEN) --file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") --foreach(module ${src}) -- get_filename_component(module_BASE ${module} PATH) -- if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") -- # Skip the utilities and third parties directories. -+ if(DOXYGEN_GENERATE_HTMLHELP) -+ set(DOXYGEN_GENERATE_HTMLHELP YES) - else() -- # Use both the source and binary directories, this ensures that -- # generated files will be included, but they may then be architecture, -- # build configuration and/or compiler specific. All source directories -- # are included whether the module is enabled or not. -- set(VTK_MODULE_DIRS_DOXYGEN -- "${VTK_MODULE_DIRS_DOXYGEN} -+ set(DOXYGEN_GENERATE_HTMLHELP NO) -+ endif() -+ -+ # -+ # Configure the script and the doxyfile, then add target -+ # -+ set(HAVE_DOT_YESNO NO) -+ if(DOT) -+ set(HAVE_DOT_YESNO YES) -+ if(NOT DOT_PATH) -+ get_filename_component(DOT_PATH ${DOT} PATH) -+ endif() -+ endif() -+ -+ # Build up a list of all module source directories. Note that this should be -+ # all source directories and so does not use the normal variables. -+ unset(VTK_MODULE_DIRS_DOXYGEN) -+ file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") -+ foreach(module ${src}) -+ get_filename_component(module_BASE ${module} PATH) -+ if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") -+ # Skip the utilities and third parties directories. -+ else() -+ # Use both the source and binary directories, this ensures that -+ # generated files will be included, but they may then be architecture, -+ # build configuration and/or compiler specific. All source directories -+ # are included whether the module is enabled or not. -+ set(VTK_MODULE_DIRS_DOXYGEN -+ "${VTK_MODULE_DIRS_DOXYGEN} - \"${VTK_SOURCE_DIR}/${module_BASE}\" - \"${VTK_BINARY_DIR}/${module_BASE}\"") -- endif() --endforeach() -+ endif() -+ endforeach() -+ -+ FIND_PATH(MATHJAX_CODEFILE MathJax.js -+ PATHS -+ /usr/share/mathjax/ -+ /usr/share/javascript/ -+ /usr/share/javascript/mathjax/ -+ ) -+ -+ configure_file( -+ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in -+ ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) -+ -+ configure_file( -+ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in -+ ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -+ @ONLY) -+ -+ add_custom_target(DoxygenDoc -+ ${CMAKE_COMMAND} -+ -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -+ DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) - --configure_file( -- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in -- ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) -- --configure_file( -- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in -- ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -- @ONLY) -- --add_custom_target(DoxygenDoc -- ${CMAKE_COMMAND} -- -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -- DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) -+endif() - - if(NOT VTK_INSTALL_NO_DOCUMENTATION) - macro(__vtk_install_documentation_files glob) -unchanged: ---- a/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx -+++ b/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx -@@ -139,7 +139,11 @@ - #if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) - static haddr_t H5FD_dsm_get_eoa(const H5FD_t *_file, H5FD_mem_t type); - static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); -+#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) -+static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type); -+#else - static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file); -+#endif - #else - static haddr_t H5FD_dsm_get_eoa(H5FD_t *_file); - static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, haddr_t addr); -@@ -155,6 +159,9 @@ - "dsm", /*name */ - MAXADDR, /*maxaddr */ - H5F_CLOSE_WEAK, /*fc_degree */ -+#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) -+ NULL, /* terminate */ -+#endif - NULL, /*sb_size */ - NULL, /*sb_encode */ - NULL, /*sb_decode */ -@@ -687,7 +694,9 @@ - *------------------------------------------------------------------------- - */ - static haddr_t --#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) -+#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) -+H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type) -+#elif (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) - H5FD_dsm_get_eof(const H5FD_t *_file) - #else - H5FD_dsm_get_eof(H5FD_t *_file) -unchanged: ---- a/Utilities/Doxygen/doxyfile.in -+++ b/Utilities/Doxygen/doxyfile.in -@@ -19,6 +19,9 @@ - GENERATE_TAGFILE = "@VTK_BINARY_DIR@/Utilities/Doxygen/vtk@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@.tag" - - PDF_HYPERLINKS = YES -+USE_MATHJAX = YES -+MATHJAX_RELPATH = @MATHJAX_CODEFILE@ -+ - - HAVE_DOT = @HAVE_DOT_YESNO@ - DOT_PATH = "@DOT_PATH@" -unchanged: ---- a/Infovis/Layout/module.cmake -+++ b/Infovis/Layout/module.cmake -@@ -6,6 +6,7 @@ - vtkImagingHybrid - vtkFiltersModeling - vtkInfovisCore -+ vtkInfovisBoostGraphAlgorithms - TEST_DEPENDS - vtkRenderingLabel - vtkRendering${VTK_RENDERING_BACKEND} -unchanged: ---- a/Rendering/VolumeOpenGL/CMakeLists.txt -+++ b/Rendering/VolumeOpenGL/CMakeLists.txt -@@ -1,7 +1,6 @@ - include(vtkObjectFactory) - - set(Module_SRCS -- vtkOpenGLHAVSVolumeMapper.cxx - vtkOpenGLProjectedAAHexahedraMapper.cxx - vtkOpenGLProjectedTetrahedraMapper.cxx - vtkOpenGLRayCastImageDisplayHelper.cxx -@@ -45,13 +44,6 @@ - vtkGPUVolumeRayCastMapper_FourComponentsFS.glsl - vtkGPUVolumeRayCastMapper_NoShadeFS.glsl - vtkGPUVolumeRayCastMapper_ShadeFS.glsl -- vtkHAVSVolumeMapper_kbufferVP.asm -- vtkHAVSVolumeMapper_k2FP.asm -- vtkHAVSVolumeMapper_k2BeginFP.asm -- vtkHAVSVolumeMapper_k2EndFP.asm -- vtkHAVSVolumeMapper_k6FP.asm -- vtkHAVSVolumeMapper_k6BeginFP.asm -- vtkHAVSVolumeMapper_k6EndFP.asm - vtkProjectedAAHexahedraMapper_VS.glsl - vtkProjectedAAHexahedraMapper_GS.glsl - vtkProjectedAAHexahedraMapper_FS.glsl -@@ -83,7 +75,6 @@ - - # Nwo for the object factory. - set(opengl_overrides -- HAVSVolumeMapper - ProjectedAAHexahedraMapper - ProjectedTetrahedraMapper - RayCastImageDisplayHelper -unchanged: ---- a/Examples/Infovis/Python/vtklibrary.xml -+++ b/Examples/Infovis/Python/vtklibrary.xml -@@ -2382,10 +2382,6 @@ - - - -- -- -- -- - - - -unchanged: ---- a/Examples/Infovis/Python/vtkclasses.xml -+++ b/Examples/Infovis/Python/vtkclasses.xml -@@ -555,10 +555,6 @@ - - - -- -- -- -- - - - -unchanged: ---- a/Examples/GUI/Qt/GraphicsView/vtkclasses.xml -+++ b/Examples/GUI/Qt/GraphicsView/vtkclasses.xml -@@ -555,10 +555,6 @@ - - - -- -- -- -- - - - -unchanged: ---- a/Examples/GUI/Qt/GraphicsView/vtklibrary.xml -+++ b/Examples/GUI/Qt/GraphicsView/vtklibrary.xml -@@ -2382,10 +2382,6 @@ - - - -- -- -- -- - - - -unchanged: ---- a/Rendering/Volume/CMakeLists.txt -+++ b/Rendering/Volume/CMakeLists.txt -@@ -61,7 +61,6 @@ - # only some volume mappers are supported for the OpenGL2 backend - if(NOT VTK_RENDERING_BACKEND STREQUAL "OpenGL2") - set(Module_SRCS ${Module_SRCS} -- vtkHAVSVolumeMapper.cxx - vtkProjectedAAHexahedraMapper.cxx - vtkVolumeTextureMapper2D.cxx - vtkVolumeTextureMapper3D.cxx -unchanged: ---- a/Rendering/Volume/Testing/Cxx/CMakeLists.txt -+++ b/Rendering/Volume/Testing/Cxx/CMakeLists.txt -@@ -38,7 +38,6 @@ - PreIntegrationIncremental.cxx - PreIntegrationNonIncremental.cxx - TestGPURayCastCompositeShadeMask.cxx # This test depends on vtkOpenGLExtensionManager -- TestHAVSVolumeMapper.cxx - TestProjectedHexahedra.cxx - TestProp3DFollower.cxx - TestTM3DLightComponents.cxx -unchanged: ---- vtk6.orig/Rendering/Qt/vtkQtLabelRenderStrategy.cxx -+++ vtk6/Rendering/Qt/vtkQtLabelRenderStrategy.cxx -@@ -13,7 +13,7 @@ - - =========================================================================*/ - #include "vtkQtLabelRenderStrategy.h" -- -+#include - #include "vtkCoordinate.h" - #include "vtkImageData.h" - #include "vtkLabeledDataMapper.h" -unchanged: ---- vtk6.orig/Rendering/Qt/vtkQtStringToImage.cxx -+++ vtk6/Rendering/Qt/vtkQtStringToImage.cxx -@@ -14,7 +14,7 @@ - =========================================================================*/ - - #include "vtkQtStringToImage.h" -- -+#include - #include "vtkQImageToImageSource.h" - #include "vtkStdString.h" - #include "vtkUnicodeString.h" -unchanged: ---- vtk7.orig/Rendering/FreeType/vtkFreeTypeTools.cxx -+++ vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx -@@ -287,8 +287,7 @@ - } - - //---------------------------------------------------------------------------- --FT_CALLBACK_DEF(FT_Error) --vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, -+static FT_Error vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, - FT_Pointer request_data, - FT_Face* face) -unchanged: ---- a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx -+++ b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx -@@ -31,8 +31,7 @@ vtkStandardNewMacro(vtkFontConfigFreeTypeTools); - namespace - { - // The FreeType face requester callback: --FT_CALLBACK_DEF(FT_Error) --vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, -+static FT_Error vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, - FT_Pointer request_data, - FT_Face* face) -unchanged: ---- vtk6-6.3.0+dfsg2.orig/Rendering/FreeType/vtkFreeTypeUtilities.cxx -+++ vtk6-6.3.0+dfsg2/Rendering/FreeType/vtkFreeTypeUtilities.cxx -@@ -332,8 +332,7 @@ void vtkFreeTypeUtilities::MapIdToTextPr - - //---------------------------------------------------------------------------- - #ifdef VTK_FREETYPE_CACHING_SUPPORTED --FT_CALLBACK_DEF(FT_Error) --vtkFreeTypeUtilitiesFaceRequester(FTC_FaceID face_id, -+static FT_Error vtkFreeTypeUtilitiesFaceRequester(FTC_FaceID face_id, - FT_Library lib, - FT_Pointer request_data, - FT_Face* face) -only in patch2: -unchanged: ---- a/CMake/GenerateExportHeader.cmake -+++ b/CMake/GenerateExportHeader.cmake -@@ -166,7 +166,7 @@ - execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version - OUTPUT_VARIABLE _gcc_version_info - ERROR_VARIABLE _gcc_version_info) -- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" -+ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" - _gcc_version "${_gcc_version_info}") - # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the - # patch level, handle this here: -only in patch2: -unchanged: ---- a/CMake/vtkCompilerExtras.cmake -+++ b/CMake/vtkCompilerExtras.cmake -@@ -32,7 +32,7 @@ - OUTPUT_VARIABLE _gcc_version_info - ERROR_VARIABLE _gcc_version_info) - -- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*" -+ string (REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" - _gcc_version "${_gcc_version_info}") - if(NOT _gcc_version) - string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0" -only in patch2: -unchanged: ---- a/Rendering/Label/vtkLabelHierarchyPrivate.h -+++ b/Rendering/Label/vtkLabelHierarchyPrivate.h -@@ -67,7 +67,7 @@ - { - } - -- bool operator () ( const vtkIdType& a, const vtkIdType& b ) -+ bool operator () ( const vtkIdType& a, const vtkIdType& b ) const - { - if (0 == this->Hierarchy) - { -only in patch2: -unchanged: ---- a/Rendering/Label/vtkLabelHierarchy.cxx -+++ b/Rendering/Label/vtkLabelHierarchy.cxx -@@ -525,7 +525,7 @@ - { - public: - bool operator()(const vtkHierarchyNode & a, -- const vtkHierarchyNode & b) -+ const vtkHierarchyNode & b) const - { - if (a.Level != b.Level) - { \ No newline at end of file diff --git a/scripts/patches/vtk6.3_patches.sh b/scripts/patches/vtk6.3_patches.sh deleted file mode 100755 index 39ef570..0000000 --- a/scripts/patches/vtk6.3_patches.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# https://sources.debian.org/patches/vtk6/6.3.0%2Bdfsg2-8.1/ - -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/10_allpatches.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/20_soversion-sharedlib.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/30_matplotlib.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/70_fix_ftbfs_gcc49.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/90_gdal-2.0.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/95_ffmpeg_2.9.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/97_fix_latex_doxygen.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/100_javac-heap.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/101_java_install_path.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/105_unforce_embedded_glew.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/106_install_doxygen_scripts_in_nodoc_build.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/99-hdf5-1.10-compatibility -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/108_Doxygen-use-mathjax.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/109_infovis_boost.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/110_remove_nonfree_from_build.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/120_fix_ftbfs_qtpainter.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch -wget -nc https://sources.debian.org/data/main/v/vtk6/6.3.0%2Bdfsg2-8.1/debian/patches/new-freetype.patch - -combinediff 10_allpatches.patch 20_soversion-sharedlib.patch > tmp1.patch -combinediff tmp1.patch 30_matplotlib.patch > tmp2.patch -combinediff tmp2.patch 70_fix_ftbfs_gcc49.patch > tmp1.patch -combinediff tmp2.patch 90_gdal-2.0.patch > tmp1.patch -combinediff tmp1.patch 95_ffmpeg_2.9.patch > tmp2.patch -combinediff tmp2.patch 97_fix_latex_doxygen.patch > tmp1.patch -combinediff tmp1.patch 100_javac-heap.patch > tmp2.patch -combinediff tmp2.patch 101_java_install_path.patch > tmp1.patch -combinediff tmp1.patch 105_unforce_embedded_glew.patch > tmp2.patch -combinediff tmp2.patch 106_install_doxygen_scripts_in_nodoc_build.patch > tmp1.patch -combinediff tmp1.patch 99-hdf5-1.10-compatibility > tmp2.patch -combinediff tmp2.patch 108_Doxygen-use-mathjax.patch > tmp1.patch -combinediff tmp1.patch 109_infovis_boost.patch > tmp2.patch -combinediff tmp2.patch 110_remove_nonfree_from_build.patch > tmp1.patch -combinediff tmp1.patch 120_fix_ftbfs_qtpainter.patch > tmp2.patch -combinediff tmp2.patch 3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch > tmp1.patch -combinediff tmp1.patch 581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch > tmp2.patch -combinediff tmp2.patch new-freetype.patch > tmp1.patch -combinediff tmp1.patch vtk6-gcc11-support.patch > vtk6.3.patch -rm tmp1.patch tmp2.patch diff --git a/scripts/patches/vtk7.1.patch b/scripts/patches/vtk7.1.patch deleted file mode 100644 index cb95e48..0000000 --- a/scripts/patches/vtk7.1.patch +++ /dev/null @@ -1,2251 +0,0 @@ -unchanged: ---- VTK-6.2.0.orig/Wrapping/Tcl/vtkTkAppInit.cxx -+++ VTK-6.2.0/Wrapping/Tcl/vtkTkAppInit.cxx -@@ -165,6 +165,8 @@ int Tcl_AppInit(Tcl_Interp *interp) - // Help Tcl find the Tcl/Tk helper files. - const char* relative_dirs[] = - { -+ "../share/tcltk", -+ "../../share/tcltk", - "TclTk/lib", - ".." VTK_INSTALL_TCL_DIR, - 0 -unchanged: ---- a/CMake/vtkModuleMacros.cmake -+++ b/CMake/vtkModuleMacros.cmake -@@ -417,8 +417,8 @@ - function(vtk_target_name _name) - get_property(_type TARGET ${_name} PROPERTY TYPE) - if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL) -- set_property(TARGET ${_name} PROPERTY VERSION 1) -- set_property(TARGET ${_name} PROPERTY SOVERSION 1) -+ set_property(TARGET ${_name} PROPERTY VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}p.${VTK_BUILD_VERSION}) -+ set_property(TARGET ${_name} PROPERTY SOVERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}p) - endif() - if("${_name}" MATCHES "^[Vv][Tt][Kk]") - set(_vtk "") -unchanged: ---- a/Rendering/Tk/CMakeLists.txt -+++ b/Rendering/Tk/CMakeLists.txt -@@ -118,7 +118,7 @@ - vtk_target_install(vtkRenderingPythonTkWidgets) - - set_property(TARGET vtkRenderingPythonTkWidgets PROPERTY OUTPUT_NAME -- vtkRenderingPythonTkWidgets-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) -+ vtkRenderingPythonTkWidgets) - - set(Module_PYTHON_LIBS ${VTK_TK_LIBRARIES}) - if(VTK_USE_X) -unchanged: ---- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h -+++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h -@@ -156,6 +156,10 @@ - * to implement IsAvailable. - */ - static Availability CheckMPLAvailability(); -+ static void DisableMPL() -+ { -+ MPLMathTextAvailable = UNAVAILABLE; -+ }; - - //@{ - /** -unchanged: ---- a/IO/SQL/vtkSQLiteDatabase.cxx -+++ b/IO/SQL/vtkSQLiteDatabase.cxx -@@ -29,7 +29,7 @@ - #include - #include - --#include -+#include - - vtkStandardNewMacro(vtkSQLiteDatabase); - -@@ -307,15 +307,15 @@ - } - } - -- int result = vtk_sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance)); -+ int result = sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance)); - -- if (result != VTK_SQLITE_OK) -+ if (result != SQLITE_OK) - { - vtkDebugMacro(<<"SQLite open() failed. Error code is " - << result << " and message is " -- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); -+ << sqlite3_errmsg(this->SQLiteInstance) ); - -- vtk_sqlite3_close(this->SQLiteInstance); -+ sqlite3_close(this->SQLiteInstance); - return false; - } - else -@@ -334,8 +334,8 @@ - } - else - { -- int result = vtk_sqlite3_close(this->SQLiteInstance); -- if (result != VTK_SQLITE_OK) -+ int result = sqlite3_close(this->SQLiteInstance); -+ if (result != SQLITE_OK) - { - vtkWarningMacro(<< "Close(): SQLite returned result code " << result); - } -@@ -368,13 +368,13 @@ - } - - vtkSQLQuery *query = this->GetQueryInstance(); -- query->SetQuery("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"); -+ query->SetQuery("SELECT name FROM sqlite3_master WHERE type='table' ORDER BY name"); - bool status = query->Execute(); - - if (!status) - { - vtkErrorMacro(<< "GetTables(): Database returned error: " -- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); -+ << sqlite3_errmsg(this->SQLiteInstance) ); - query->Delete(); - return this->Tables; - } -@@ -403,7 +403,7 @@ - if (!status) - { - vtkErrorMacro(<< "GetRecord(" << table << "): Database returned error: " -- << vtk_sqlite3_errmsg(this->SQLiteInstance) ); -+ << sqlite3_errmsg(this->SQLiteInstance) ); - query->Delete(); - return NULL; - } -@@ -467,10 +467,10 @@ - // ---------------------------------------------------------------------- - bool vtkSQLiteDatabase::HasError() - { -- return (vtk_sqlite3_errcode(this->SQLiteInstance)!=VTK_SQLITE_OK); -+ return (sqlite3_errcode(this->SQLiteInstance)!=SQLITE_OK); - } - - const char* vtkSQLiteDatabase::GetLastErrorText() - { -- return vtk_sqlite3_errmsg(this->SQLiteInstance); -+ return sqlite3_errmsg(this->SQLiteInstance); - } -unchanged: ---- a/IO/SQL/vtkSQLiteDatabase.h -+++ b/IO/SQL/vtkSQLiteDatabase.h -@@ -52,7 +52,7 @@ - class vtkSQLQuery; - class vtkSQLiteQuery; - class vtkStringArray; --struct vtk_sqlite3; -+struct sqlite3; - - class VTKIOSQL_EXPORT vtkSQLiteDatabase : public vtkSQLDatabase - { -@@ -167,7 +167,7 @@ - virtual bool ParseURL(const char* url); - - private: -- vtk_sqlite3 *SQLiteInstance; -+ sqlite3 *SQLiteInstance; - - // We want this to be private, a user of this class - // should not be setting this for any reason -unchanged: ---- a/IO/SQL/vtkSQLiteQuery.cxx -+++ b/IO/SQL/vtkSQLiteQuery.cxx -@@ -25,7 +25,7 @@ - #include "vtkVariant.h" - #include "vtkVariantArray.h" - --#include -+#include - - #include - -@@ -43,7 +43,7 @@ - { - this->Statement = NULL; - this->InitialFetch = true; -- this->InitialFetchResult=VTK_SQLITE_DONE; -+ this->InitialFetchResult=SQLITE_DONE; - this->LastErrorText = NULL; - this->TransactionInProgress = false; - } -@@ -61,7 +61,7 @@ - { - if (this->Database != NULL) - { -- vtk_sqlite3_finalize(this->Statement); -+ sqlite3_finalize(this->Statement); - this->Statement = NULL; - } - } -@@ -128,8 +128,8 @@ - if (this->Statement) - { - vtkDebugMacro(<<"Finalizing old statement"); -- int finalizeStatus = vtk_sqlite3_finalize(this->Statement); -- if (finalizeStatus != VTK_SQLITE_OK) -+ int finalizeStatus = sqlite3_finalize(this->Statement); -+ if (finalizeStatus != SQLITE_OK) - { - vtkWarningMacro(<<"SetQuery(): Finalize returned unexpected code " - << finalizeStatus); -@@ -148,19 +148,19 @@ - return false; - } - -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - const char *unused_statement; - -- int prepareStatus = vtk_sqlite3_prepare_v2(db, -+ int prepareStatus = sqlite3_prepare_v2(db, - this->Query, - static_cast(strlen(this->Query)), - &this->Statement, - &unused_statement); - -- if (prepareStatus != VTK_SQLITE_OK) -+ if (prepareStatus != SQLITE_OK) - { -- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); -- vtkWarningMacro(<<"SetQuery(): vtk_sqlite3_prepare_v2() failed with error message " -+ this->SetLastErrorText(sqlite3_errmsg(db)); -+ vtkWarningMacro(<<"SetQuery(): sqlite3_prepare_v2() failed with error message " - << this->GetLastErrorText() - << " on statement: '" - << this->Query << "'"); -@@ -191,31 +191,31 @@ - } - else - { -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - - vtkDebugMacro(<<"Execute(): Query ready to execute."); - - this->InitialFetch = true; -- int result = vtk_sqlite3_step(this->Statement); -+ int result = sqlite3_step(this->Statement); - this->InitialFetchResult = result; - -- if (result == VTK_SQLITE_DONE) -+ if (result == SQLITE_DONE) - { - this->SetLastErrorText(NULL); - this->Active = true; - return true; - } -- else if (result != VTK_SQLITE_ROW) -+ else if (result != SQLITE_ROW) - { - vtkSQLiteDatabase *dbContainer = - vtkSQLiteDatabase::SafeDownCast(this->Database); - assert(dbContainer != NULL); - -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - -- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); -- vtkDebugMacro(<< "Execute(): vtk_sqlite3_step() returned error message " -+ this->SetLastErrorText(sqlite3_errmsg(db)); -+ vtkDebugMacro(<< "Execute(): sqlite3_step() returned error message " - << this->GetLastErrorText()); - this->Active = false; - return false; -@@ -236,7 +236,7 @@ - } - else - { -- return vtk_sqlite3_column_count(this->Statement); -+ return sqlite3_column_count(this->Statement); - } - } - -@@ -256,7 +256,7 @@ - } - else - { -- return vtk_sqlite3_column_name(this->Statement, column); -+ return sqlite3_column_name(this->Statement, column); - } - } - -@@ -276,22 +276,22 @@ - } - else - { -- switch (vtk_sqlite3_column_type(this->Statement, column)) -+ switch (sqlite3_column_type(this->Statement, column)) - { -- case VTK_SQLITE_INTEGER: -+ case SQLITE_INTEGER: - return VTK_INT; -- case VTK_SQLITE_FLOAT: -+ case SQLITE_FLOAT: - return VTK_FLOAT; -- case VTK_SQLITE_TEXT: -+ case SQLITE_TEXT: - return VTK_STRING; -- case VTK_SQLITE_BLOB: -+ case SQLITE_BLOB: - return VTK_STRING; // until we have a BLOB type of our own -- case VTK_SQLITE_NULL: -+ case SQLITE_NULL: - return VTK_VOID; // ??? what makes sense here? - default: - { - vtkErrorMacro(<<"GetFieldType(): Unknown data type " -- << vtk_sqlite3_column_type(this->Statement, column) -+ << sqlite3_column_type(this->Statement, column) - <<" from SQLite."); - return VTK_VOID; - } -@@ -312,7 +312,7 @@ - { - vtkDebugMacro(<<"NextRow(): Initial fetch being handled."); - this->InitialFetch = false; -- if (this->InitialFetchResult == VTK_SQLITE_DONE) -+ if (this->InitialFetchResult == SQLITE_DONE) - { - return false; - } -@@ -323,12 +323,12 @@ - } - else - { -- int result = vtk_sqlite3_step(this->Statement); -- if (result == VTK_SQLITE_DONE) -+ int result = sqlite3_step(this->Statement); -+ if (result == SQLITE_DONE) - { - return false; - } -- else if (result == VTK_SQLITE_ROW) -+ else if (result == SQLITE_ROW) - { - return true; - } -@@ -336,8 +336,8 @@ - { - vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); - assert(dbContainer != NULL); -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -- this->SetLastErrorText(vtk_sqlite3_errmsg(db)); -+ sqlite3 *db = dbContainer->SQLiteInstance; -+ this->SetLastErrorText(sqlite3_errmsg(db)); - vtkErrorMacro(<<"NextRow(): Database returned error code " - << result << " with the following message: " - << this->GetLastErrorText()); -@@ -363,33 +363,33 @@ - } - else - { -- switch (vtk_sqlite3_column_type(this->Statement, column)) -+ switch (sqlite3_column_type(this->Statement, column)) - { -- case VTK_SQLITE_INTEGER: -- return vtkVariant(vtk_sqlite3_column_int(this->Statement, column)); -+ case SQLITE_INTEGER: -+ return vtkVariant(sqlite3_column_int(this->Statement, column)); - -- case VTK_SQLITE_FLOAT: -- return vtkVariant(vtk_sqlite3_column_double(this->Statement, column)); -+ case SQLITE_FLOAT: -+ return vtkVariant(sqlite3_column_double(this->Statement, column)); - -- case VTK_SQLITE_TEXT: -+ case SQLITE_TEXT: - { - std::ostringstream str; -- str << vtk_sqlite3_column_text(this->Statement, column); -+ str << sqlite3_column_text(this->Statement, column); - return vtkVariant(vtkStdString(str.str())); - } - -- case VTK_SQLITE_BLOB: -+ case SQLITE_BLOB: - { - // This is a hack ... by passing the BLOB to vtkStdString with an explicit - // byte count, we ensure that the string will store all of the BLOB's bytes, - // even if there are NULL values. - - return vtkVariant(vtkStdString( -- static_cast(vtk_sqlite3_column_blob(this->Statement, column)), -- vtk_sqlite3_column_bytes(this->Statement, column))); -+ static_cast(sqlite3_column_blob(this->Statement, column)), -+ sqlite3_column_bytes(this->Statement, column))); - } - -- case VTK_SQLITE_NULL: -+ case SQLITE_NULL: - default: - return vtkVariant(); - } -@@ -420,11 +420,11 @@ - vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); - assert(dbContainer != NULL); - -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - char *errorMessage = NULL; -- int result = vtk_sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage); -+ int result = sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage); - -- if (result == VTK_SQLITE_OK) -+ if (result == SQLITE_OK) - { - this->TransactionInProgress = true; - this->SetLastErrorText(NULL); -@@ -448,7 +448,7 @@ - { - if (this->Statement) - { -- vtk_sqlite3_finalize(this->Statement); -+ sqlite3_finalize(this->Statement); - this->Statement = NULL; - } - -@@ -460,11 +460,11 @@ - - vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); - assert(dbContainer != NULL); -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - char *errorMessage = NULL; -- int result = vtk_sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage); -+ int result = sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage); - -- if (result == VTK_SQLITE_OK) -+ if (result == SQLITE_OK) - { - this->TransactionInProgress = false; - this->SetLastErrorText(NULL); -@@ -496,11 +496,11 @@ - - vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database ); - assert(dbContainer != NULL); -- vtk_sqlite3 *db = dbContainer->SQLiteInstance; -+ sqlite3 *db = dbContainer->SQLiteInstance; - char *errorMessage = NULL; -- int result = vtk_sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage); -+ int result = sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage); - -- if (result == VTK_SQLITE_OK) -+ if (result == SQLITE_OK) - { - this->TransactionInProgress = false; - this->SetLastErrorText(NULL); -@@ -644,14 +644,14 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } -- int status = vtk_sqlite3_bind_int(this->Statement, index+1, value); -+ int status = sqlite3_bind_int(this->Statement, index+1, value); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_int returned error: " << status; -+ errormessage << "sqlite3_bind_int returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } -- int status = vtk_sqlite3_bind_int(this->Statement, index+1, static_cast(value)); -+ int status = sqlite3_bind_int(this->Statement, index+1, static_cast(value)); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_int64 returned error: " << status; -+ errormessage << "sqlite3_bind_int64 returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -@@ -702,15 +702,15 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - -- int status = vtk_sqlite3_bind_double(this->Statement, index+1, value); -+ int status = sqlite3_bind_double(this->Statement, index+1, value); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_double returned error: " << status; -+ errormessage << "sqlite3_bind_double returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -@@ -731,15 +731,15 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - -- int status = vtk_sqlite3_bind_text(this->Statement, index+1, value, length, VTK_SQLITE_TRANSIENT); -+ int status = sqlite3_bind_text(this->Statement, index+1, value, length, SQLITE_TRANSIENT); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_text returned error: " << status; -+ errormessage << "sqlite3_bind_text returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -@@ -760,20 +760,20 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - - int status = -- vtk_sqlite3_bind_blob(this->Statement, -+ sqlite3_bind_blob(this->Statement, - index+1, - data, - length, -- VTK_SQLITE_TRANSIENT); -+ SQLITE_TRANSIENT); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_bind_blob returned error: " << status; -+ errormessage << "sqlite3_bind_blob returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -@@ -794,15 +794,15 @@ - if (this->Active) - { - this->Active = false; -- vtk_sqlite3_reset(this->Statement); -+ sqlite3_reset(this->Statement); - } - -- int status = vtk_sqlite3_clear_bindings(this->Statement); -+ int status = sqlite3_clear_bindings(this->Statement); - -- if (status != VTK_SQLITE_OK) -+ if (status != SQLITE_OK) - { - std::ostringstream errormessage; -- errormessage << "sqlite_clear_bindings returned error: " << status; -+ errormessage << "sqlite3_clear_bindings returned error: " << status; - this->SetLastErrorText(errormessage.str().c_str()); - vtkErrorMacro(<GetLastErrorText()); - return false; -unchanged: ---- a/IO/SQL/vtkSQLiteQuery.h -+++ b/IO/SQL/vtkSQLiteQuery.h -@@ -50,7 +50,7 @@ - class vtkSQLiteDatabase; - class vtkVariant; - class vtkVariantArray; --struct vtk_sqlite3_stmt; -+struct sqlite3_stmt; - - class VTKIOSQL_EXPORT vtkSQLiteQuery : public vtkSQLQuery - { -@@ -175,7 +175,7 @@ - vtkSQLiteQuery(const vtkSQLiteQuery &) VTK_DELETE_FUNCTION; - void operator=(const vtkSQLiteQuery &) VTK_DELETE_FUNCTION; - -- vtk_sqlite3_stmt *Statement; -+ sqlite3_stmt *Statement; - bool InitialFetch; - int InitialFetchResult; - char *LastErrorText; -unchanged: ---- a/ThirdParty/sqlite/CMakeLists.txt -+++ b/ThirdParty/sqlite/CMakeLists.txt -@@ -1,4 +1,4 @@ - set(vtksqlite_THIRD_PARTY 1) --set(vtksqlite_LIBRARIES vtksqlite) -+set(vtksqlite_LIBRARIES sqlite3) - vtk_module_export_info() --add_subdirectory(vtksqlite) -+ -unchanged: ---- a/Parallel/MPI4Py/CMakeLists.txt -+++ b/Parallel/MPI4Py/CMakeLists.txt -@@ -18,7 +18,7 @@ - mark_as_advanced(MPI4PY_INCLUDE_DIR) - endif() - else() -- set(MPI4PY_INCLUDE_DIR "${vtkmpi4py_SOURCE_DIR}/vtkmpi4py/src/include") -+ set(MPI4PY_INCLUDE_DIR "/usr/include") - endif() - include_directories("${MPI4PY_INCLUDE_DIR}") - -unchanged: ---- a/Parallel/MPI4Py/module.cmake -+++ b/Parallel/MPI4Py/module.cmake -@@ -2,8 +2,6 @@ - vtk_module(vtkParallelMPI4Py - GROUPS - MPI -- COMPILE_DEPENDS -- vtkmpi4py - EXCLUDE_FROM_TCL_WRAPPING - EXCLUDE_FROM_JAVA_WRAPPING - KIT -@@ -14,4 +12,4 @@ - PRIVATE_DEPENDS - vtkParallelMPI - ) --endif () -\ No newline at end of file -+endif () -unchanged: ---- a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx -+++ b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx -@@ -1113,7 +1113,10 @@ - vtkIdType cellsPerNode = numTotalCells / nprocs; - - vtkIdList **sendCells = new vtkIdList * [ nprocs ]; -- memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); -+ -+ if (sizeof(vtkIdList *) * nprocs > 0) { -+ memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); -+ } - - if (numConsumers == nprocs - 1) - { -@@ -1598,7 +1601,9 @@ - // Exchange int arrays - - float **recvArrays = new float * [nprocs]; -- memset(recvArrays, 0, sizeof(float *) * nprocs); -+ if (sizeof(float *) * nprocs > 0) { -+ memset(recvArrays, 0, sizeof(float *) * nprocs); -+ } - - if (sendSize[me] > 0) // sent myself an array - { -@@ -1720,7 +1725,9 @@ - // Exchange int arrays - - vtkIdType **recvArrays = new vtkIdType * [nprocs]; -- memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); -+ if (sizeof(vtkIdType *) * nprocs > 0) { -+ memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); -+ } - - if (sendSize[me] > 0) // sent myself an array - { -@@ -2789,7 +2796,9 @@ - - unsigned char *vals = new unsigned char [npoints]; - -- memset(vals, val, npoints); -+ if (npoints > 0) { -+ memset(vals, val, npoints); -+ } - - vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); - Array->SetName(arrayName); -@@ -2809,7 +2818,9 @@ - - unsigned char *vals = new unsigned char [ncells]; - -- memset(vals, val, ncells); -+ if (ncells > 0) { -+ memset(vals, val, ncells); -+ } - - vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New(); - Array->SetName(arrayName); -@@ -3008,7 +3019,9 @@ - vtkIdType nGridPoints = grid->GetNumberOfPoints(); - - vtkIdType *numPointsOutside = new vtkIdType [nprocs]; -- memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); -+ if (sizeof(vtkIdType) * nprocs > 0) { -+ memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); -+ } - - vtkIdTypeArray *globalIds = vtkIdTypeArray::New(); - globalIds->SetNumberOfValues(nGridPoints); -@@ -3090,10 +3103,16 @@ - // global ID back? - - vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs]; -- memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); -+ -+ if (sizeof(vtkFloatArray *) * nprocs > 0) { -+ memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); -+ } - - vtkIdTypeArray **localIds = new vtkIdTypeArray * [nprocs]; -- memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ -+ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { -+ memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - vtkIdType *next = new vtkIdType [nprocs]; - vtkIdType *next3 = new vtkIdType [nprocs]; -@@ -3268,7 +3287,9 @@ - { - // There are no cells in my assigned region - -- memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { -+ memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - return gids; - } -@@ -3473,7 +3494,10 @@ - std::multimap::iterator mapIt; - - vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs]; -- memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); -+ -+ if (sizeof (vtkIdTypeArray *) * nprocs > 0) { -+ memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); -+ } - - for (int i=0; iGetNumberOfPoints(); - - vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs]; -- memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ if (sizeof(vtkIdTypeArray *) * nprocs) { -+ memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - if (numPoints < 1) - { -unchanged: ---- a/Examples/Infovis/Cxx/CMakeLists.txt -+++ b/Examples/Infovis/Cxx/CMakeLists.txt -@@ -48,15 +48,6 @@ - target_link_LIBRARIES(MultiView ${VTK_LIBRARIES}) - endif() - --# If Qt is enabled include the QT based examples --if(vtkGUISupportQt_LOADED AND vtkViewsQt_LOADED) -- add_subdirectory(EasyView) -- add_subdirectory(CustomLinkView) -- if(vtkIOSQL_LOADED) -- add_subdirectory(StatsView) -- endif() --endif() -- - if(vtkInfovisParallel_LOADED) - add_executable(ParallelBFS ParallelBFS.cxx) - find_package(MPI REQUIRED) -unchanged: ---- VTK-6.3.0.orig/Wrapping/Java/CMakeLists.txt -+++ VTK-6.3.0/Wrapping/Java/CMakeLists.txt -@@ -80,6 +80,8 @@ if(APPLE) - set(JAVAC_OPTIONS -J-Xmx512m) - endif() - -+set(JAVAC_OPTIONS -J-Xmx1024m) -+ - get_property(java_modules GLOBAL PROPERTY VTK_JAVA_WRAPPED) - foreach(module IN LISTS java_modules) - if(NOT ${module}_EXCLUDE_FROM_WRAPPING) -unchanged: ---- VTK-6.3.0.orig/CMake/vtkJavaWrapping.cmake -+++ VTK-6.3.0/CMake/vtkJavaWrapping.cmake -@@ -79,7 +79,7 @@ function(vtk_add_java_wrapping module_na - install(TARGETS ${module_name}Java - EXPORT ${VTK_INSTALL_EXPORT_NAME} - RUNTIME DESTINATION ${VTK_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries -- LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries -+ LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR}/jni COMPONENT RuntimeLibraries - ARCHIVE DESTINATION ${VTK_INSTALL_ARCHIVE_DIR} COMPONENT Development) - endif() - endfunction() -unchanged: ---- b/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -200,7 +200,7 @@ - endif() - - # default to not using the system GLEW as ours has fixes in it right now --set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" FORCE) -+set(VTK_USE_SYSTEM_GLEW OFF CACHE BOOL "do not use a system glew" ON) - - set(VTK_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) - -@@ -540,9 +540,7 @@ - - # The doxygen documentation needs to be aware of all modules. - option(BUILD_DOCUMENTATION "Build the VTK documentation" OFF) --if(BUILD_DOCUMENTATION) -- add_subdirectory(Utilities/Doxygen) --endif() -+add_subdirectory(Utilities/Doxygen) - - # If python wrapping and testing is enabled then add driver scripts to run - # tests. Note: Many pythong tests used to be automatically converted from TCL -unchanged: ---- a/Rendering/OpenGL2/CMakeLists.txt -+++ b/Rendering/OpenGL2/CMakeLists.txt -@@ -353,7 +353,7 @@ - vtk_opengl_link(${vtk-module}) - if(VTK_USE_X) - vtk_module_link_libraries(${vtk-module} -- LINK_PUBLIC ${X11_LIBRARIES} ${X11_Xt_LIB}) -+ LINK_PUBLIC ${GLEW_LIBRARY} ${X11_LIBRARIES} ${X11_Xt_LIB}) - elseif(VTK_USE_COCOA) - vtk_module_link_libraries(${vtk-module} LINK_PUBLIC "-framework Cocoa") - endif() -unchanged: ---- b/Utilities/Doxygen/CMakeLists.txt -+++ b/Utilities/Doxygen/CMakeLists.txt -@@ -1,69 +1,79 @@ - # - # Build the documentation - # --find_package(Doxygen REQUIRED) --find_package(Perl REQUIRED) --find_package(HTMLHelp) -+if (BUILD_DOCUMENTATION) -+ find_package(Doxygen REQUIRED) -+ find_package(Perl REQUIRED) -+ find_package(HTMLHelp) - --option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) --option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) --option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) --mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) --if(DOXYGEN_SHORT_NAMES) -- set(DOXYGEN_SHORT_NAMES YES) --else() -- set(DOXYGEN_SHORT_NAMES NO) --endif() --if(DOXYGEN_GENERATE_HTMLHELP) -- set(DOXYGEN_GENERATE_HTMLHELP YES) --else() -- set(DOXYGEN_GENERATE_HTMLHELP NO) --endif() -- --# --# Configure the script and the doxyfile, then add target --# --set(HAVE_DOT_YESNO NO) --if(DOT) -- set(HAVE_DOT_YESNO YES) -- if(NOT DOT_PATH) -- get_filename_component(DOT_PATH ${DOT} PATH) -+ option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) -+ option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) -+ option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) -+ mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) -+ if(DOXYGEN_SHORT_NAMES) -+ set(DOXYGEN_SHORT_NAMES YES) -+ else() -+ set(DOXYGEN_SHORT_NAMES NO) - endif() --endif() -- --# Build up a list of all module source directories. Note that this should be --# all source directories and so does not use the normal variables. --unset(VTK_MODULE_DIRS_DOXYGEN) --file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") --foreach(module ${src}) -- get_filename_component(module_BASE ${module} PATH) -- if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") -- # Skip the utilities and third parties directories. -+ if(DOXYGEN_GENERATE_HTMLHELP) -+ set(DOXYGEN_GENERATE_HTMLHELP YES) - else() -- # Use both the source and binary directories, this ensures that -- # generated files will be included, but they may then be architecture, -- # build configuration and/or compiler specific. All source directories -- # are included whether the module is enabled or not. -- set(VTK_MODULE_DIRS_DOXYGEN -- "${VTK_MODULE_DIRS_DOXYGEN} -+ set(DOXYGEN_GENERATE_HTMLHELP NO) -+ endif() -+ -+ # -+ # Configure the script and the doxyfile, then add target -+ # -+ set(HAVE_DOT_YESNO NO) -+ if(DOT) -+ set(HAVE_DOT_YESNO YES) -+ if(NOT DOT_PATH) -+ get_filename_component(DOT_PATH ${DOT} PATH) -+ endif() -+ endif() -+ -+ # Build up a list of all module source directories. Note that this should be -+ # all source directories and so does not use the normal variables. -+ unset(VTK_MODULE_DIRS_DOXYGEN) -+ file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") -+ foreach(module ${src}) -+ get_filename_component(module_BASE ${module} PATH) -+ if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") -+ # Skip the utilities and third parties directories. -+ else() -+ # Use both the source and binary directories, this ensures that -+ # generated files will be included, but they may then be architecture, -+ # build configuration and/or compiler specific. All source directories -+ # are included whether the module is enabled or not. -+ set(VTK_MODULE_DIRS_DOXYGEN -+ "${VTK_MODULE_DIRS_DOXYGEN} - \"${VTK_SOURCE_DIR}/${module_BASE}\" - \"${VTK_BINARY_DIR}/${module_BASE}\"") -- endif() --endforeach() -+ endif() -+ endforeach() -+ -+ FIND_PATH(MATHJAX_CODEFILE MathJax.js -+ PATHS -+ /usr/share/mathjax/ -+ /usr/share/javascript/ -+ /usr/share/javascript/mathjax/ -+ ) -+ -+ configure_file( -+ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in -+ ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) -+ -+ configure_file( -+ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in -+ ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -+ @ONLY) -+ -+ add_custom_target(DoxygenDoc -+ ${CMAKE_COMMAND} -+ -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -+ DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) - --configure_file( -- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in -- ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) -- --configure_file( -- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in -- ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -- @ONLY) -- --add_custom_target(DoxygenDoc -- ${CMAKE_COMMAND} -- -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -- DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) -+endif() - - if(NOT VTK_INSTALL_NO_DOCUMENTATION) - macro(__vtk_install_documentation_files glob) -unchanged: ---- a/Utilities/Doxygen/doxyfile.in -+++ b/Utilities/Doxygen/doxyfile.in -@@ -19,6 +19,9 @@ - GENERATE_TAGFILE = "@VTK_BINARY_DIR@/Utilities/Doxygen/vtk@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@.tag" - - PDF_HYPERLINKS = YES -+USE_MATHJAX = YES -+MATHJAX_RELPATH = @MATHJAX_CODEFILE@ -+ - - HAVE_DOT = @HAVE_DOT_YESNO@ - DOT_PATH = "@DOT_PATH@" -unchanged: ---- a/Wrapping/Java/CMakeLists.txt -+++ b/Wrapping/Java/CMakeLists.txt -@@ -259,7 +259,7 @@ - if(VTK_JAVA_SWT_COMPONENT) - set(VTK_JAVA_SAMPLE_DEPENDENCIES ${VTK_JAVA_SAMPLE_DEPENDENCIES} - rendering/SwtConeRendering -- ) -+q ) - endif() - endif() - -@@ -358,11 +358,10 @@ - COMMENT "Compiling Java Classes" - ) - --# Create the JAR file containing all compiled classes and -+ - add_custom_command( -- COMMAND ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" -- -C ${VTK_BINARY_DIR}/java -- vtk -+ COMMAND cd ${VTK_BINARY_DIR}/java && find . -name "*.class" -print | sort -u > classes.list -+ COMMAND cd ${VTK_BINARY_DIR}/java && ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" @${VTK_BINARY_DIR}/java/classes.list - DEPENDS ${VTK_BINARY_DIR}/java/javac_stamp.txt ${JAVA_LIBRARIES} - OUTPUT ${VTK_JAR_PATH}/vtk.jar - COMMENT "Java Archive" -unchanged: ---- a/Wrapping/PythonCore/vtkPythonArgs.cxx -+++ b/Wrapping/PythonCore/vtkPythonArgs.cxx -@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext) - else if (PyUnicode_Check(o)) - { - #if PY_VERSION_HEX >= 0x03030000 -- a = PyUnicode_AsUTF8(o); -+ a = const_cast(PyUnicode_AsUTF8(o)); - return true; - #else - PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL); -unchanged: ---- a/Utilities/Doxygen/doc_class2example.pl -+++ b/Utilities/Doxygen/doc_class2example.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2004-06-09 11:12:38 barre> - # - # Build cross-references between classes and examples -unchanged: ---- a/Utilities/Doxygen/doc_cleanhtml.pl -+++ b/Utilities/Doxygen/doc_cleanhtml.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2002-10-25 20:17:59 barre> - # - # Clean the HTML generated by Doxygen to remove some layout quicks -unchanged: ---- a/Utilities/Doxygen/doc_codematch.pl -+++ b/Utilities/Doxygen/doc_codematch.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2002-01-18 16:17:26 barre> - # - # Summary ? -unchanged: ---- a/Utilities/Doxygen/doc_contributors.pl -+++ b/Utilities/Doxygen/doc_contributors.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2002-11-01 15:33:04 barre> - # - # Get author and contributors. -unchanged: ---- a/Utilities/Doxygen/doc_header2doxygen.pl -+++ b/Utilities/Doxygen/doc_header2doxygen.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2011-01-16 21:15:53 barre> - # - # Convert VTK headers to doxygen format -unchanged: ---- a/Utilities/Doxygen/doc_index.pl -+++ b/Utilities/Doxygen/doc_index.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2001-11-21 17:40:48 barre> - # - # Build full-text index -unchanged: ---- a/Utilities/Doxygen/doc_rmpath.pl -+++ b/Utilities/Doxygen/doc_rmpath.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2001-10-05 11:49:40 barre> - # - # Remove path to intermediate Doxygen dir from html doc -unchanged: ---- a/Utilities/Doxygen/doc_version.pl -+++ b/Utilities/Doxygen/doc_version.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2006-11-15 13:25:02 barre> - # - # Extract VTK version and add it to documentation -unchanged: ---- vtk7-7.1.1+dfsg1.orig/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h -+++ vtk7-7.1.1+dfsg1/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h -@@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY wa - #elif defined(__XTENSA_EL__) - # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE - -+/* RISC-V */ -+#elif defined(__riscv) || defined(__riscv__) -+# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE -+ - /* Unknown CPU */ - #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) - # error "Byte order of target CPU unknown." -unchanged: ---- a/Wrapping/Python/vtk/numpy_interface/algorithms.py -+++ b/Wrapping/Python/vtk/numpy_interface/algorithms.py -@@ -197,7 +197,7 @@ - return dsa.NoneArray; - - if res is dsa.NoneArray: -- if max_dims is 1: -+ if max_dims == 1: - # Weird trick to make the array look like a scalar - max_dims = () - res = numpy.empty(max_dims) -unchanged: ---- a/CMake/VTKGenerateExportHeader.cmake -+++ b/CMake/VTKGenerateExportHeader.cmake -@@ -174,7 +174,7 @@ - execute_process(COMMAND ${CMAKE_C_COMPILER} --version - OUTPUT_VARIABLE _gcc_version_info - ERROR_VARIABLE _gcc_version_info) -- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" -+ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" - _gcc_version "${_gcc_version_info}") - # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the - # patch level, handle this here: -unchanged: ---- a/IO/MySQL/vtkMySQLDatabasePrivate.h -+++ b/IO/MySQL/vtkMySQLDatabasePrivate.h -@@ -7,6 +7,10 @@ - - #include "vtkIOMySQLModule.h" // For export macro - #include // needed for MYSQL typedefs -+#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) && \ -+ MYSQL_VERSION_ID >= 80001 && MYSQL_VERSION_ID != 80002 -+typedef bool my_bool; -+#endif - - class VTKIOMYSQL_EXPORT vtkMySQLDatabasePrivate - { -unchanged: ---- vtk7.orig/Rendering/FreeType/vtkFreeTypeTools.cxx -+++ vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx -@@ -273,8 +273,7 @@ - } - - //---------------------------------------------------------------------------- --FT_CALLBACK_DEF(FT_Error) --vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, -+static FT_Error vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, - FT_Pointer request_data, - FT_Face* face) -unchanged: ---- a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx -+++ b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx -@@ -31,8 +31,7 @@ vtkStandardNewMacro(vtkFontConfigFreeTypeTools); - namespace - { - // The FreeType face requester callback: --FT_CALLBACK_DEF(FT_Error) --vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, -+static FT_Error vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, - FT_Pointer request_data, - FT_Face* face) -unchanged: ---- vtk7-7.1.1+dfsg2.orig/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx -+++ vtk7-7.1.1+dfsg2/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfDsmComm.cxx -@@ -52,7 +52,7 @@ - XdmfErrorMessage("Cannot Receive Message of Length = " << Msg->Length); - return(XDMF_FAIL); - } -- if(Msg->Data <= 0 ){ -+ if(!Msg->Data){ - XdmfErrorMessage("Cannot Receive Message into Data Buffer = " << Msg->Length); - return(XDMF_FAIL); - } -@@ -66,7 +66,7 @@ - XdmfErrorMessage("Cannot Send Message of Length = " << Msg->Length); - return(XDMF_FAIL); - } -- if(Msg->Data <= 0 ){ -+ if(!Msg->Data){ - XdmfErrorMessage("Cannot Send Message from Data Buffer = " << Msg->Length); - return(XDMF_FAIL); - } -unchanged: ---- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchyPrivate.h -+++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchyPrivate.h -@@ -66,7 +66,7 @@ - { - } - -- bool operator () ( const vtkIdType& a, const vtkIdType& b ) -+ bool operator () ( const vtkIdType& a, const vtkIdType& b ) const - { - if (0 == this->Hierarchy) - { -unchanged: ---- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchy.cxx -+++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchy.cxx -@@ -525,7 +525,7 @@ - { - public: - bool operator()(const vtkHierarchyNode & a, -- const vtkHierarchyNode & b) -+ const vtkHierarchyNode & b) const - { - if (a.Level != b.Level) - { -only in patch2: -unchanged: ---- a/CMake/FindFFMPEG.cmake -+++ b/CMake/FindFFMPEG.cmake -@@ -107,13 +107,14 @@ - FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h) - FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h) - FFMPEG_FIND(LIBAVUTIL avutil avutil.h) -+FFMPEG_FIND(LIBSWRESAMPLE swresample swresample.h) - FFMPEG_FIND(LIBSWSCALE swscale swscale.h) # not sure about the header to look for here. - - SET(FFMPEG_FOUND "NO") - - # Note we don't check FFMPEG_LIBSWSCALE_FOUND, FFMPEG_LIBAVDEVICE_FOUND, - # and FFMPEG_LIBAVUTIL_FOUND as they are optional. --IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND STDINT_OK) -+IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBSWRESAMPLE_FOUND AND STDINT_OK) - - SET(FFMPEG_FOUND "YES") - -only in patch2: -unchanged: ---- a/IO/FFMPEG/CMakeLists.txt -+++ b/IO/FFMPEG/CMakeLists.txt -@@ -22,7 +22,7 @@ - ) - - set(_ffmpeg_libs ${FFMPEG_LIBAVFORMAT_LIBRARIES} ${FFMPEG_LIBAVCODEC_LIBRARIES} -- ${FFMPEG_LIBAVUTIL_LIBRARIES} -+ ${FFMPEG_LIBAVUTIL_LIBRARIES} ${FFMPEG_LIBSWRESAMPLE_LIBRARIES} - ) - - if(NOT VTK_FFMPEG_HAS_IMG_CONVERT) -only in patch2: -unchanged: ---- a/IO/FFMPEG/vtkFFMPEGWriter.cxx -+++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx -@@ -15,99 +15,77 @@ - - #include "vtkFFMPEGWriter.h" - -+#include "vtkErrorCode.h" - #include "vtkImageData.h" - #include "vtkObjectFactory.h" --#include "vtkErrorCode.h" --#include "vtkFFMPEGConfig.h" - --extern "C" { --#ifdef VTK_FFMPEG_HAS_OLD_HEADER --# include --#else --# include --#endif -- --#ifndef VTK_FFMPEG_HAS_IMG_CONVERT --# ifdef VTK_FFMPEG_HAS_OLD_HEADER --# include --# else --# include --# endif --#endif -+extern "C" -+{ -+#include -+#include -+#include - } - --#ifdef __GNUC__ --#pragma GCC diagnostic ignored "-Wdeprecated-declarations" --#endif -- --#if LIBAVCODEC_VERSION_MAJOR < 55 --# define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG --# define AV_CODEC_ID_RAWVIDEO CODEC_ID_RAWVIDEO --# define AV_PIX_FMT_BGR24 PIX_FMT_BGR24 --# define AV_PIX_FMT_RGB24 PIX_FMT_RGB24 --# define AV_PIX_FMT_YUVJ422P PIX_FMT_YUVJ422P -+#if LIBAVFORMAT_VERSION_MAJOR < 59 -+#define vtk_ff_const59 -+#else -+#define vtk_ff_const59 const - #endif - --#if LIBAVCODEC_VERSION_MAJOR < 56 || \ -- LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR < 28 || \ -- LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR == 28 && LIBAVCODEC_VERSION_MICRO < 1 --# define av_frame_alloc avcodec_alloc_frame -+#if defined(LIBAVFORMAT_VERSION_MAJOR) && LIBAVFORMAT_VERSION_MAJOR >= 57 -+extern "C" -+{ -+#include -+} - #endif - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - class vtkFFMPEGWriterInternal -- { -+{ - public: -- vtkFFMPEGWriterInternal(vtkFFMPEGWriter *creator); -+ vtkFFMPEGWriterInternal(vtkFFMPEGWriter* creator); - ~vtkFFMPEGWriterInternal(); - - int Start(); -- int Write(vtkImageData *id); -+ int Write(vtkImageData* id); - void End(); - - int Dim[2]; - int FrameRate; - - private: -+ vtkFFMPEGWriter* Writer; - -- vtkFFMPEGWriter *Writer; -+ AVFormatContext* avFormatContext; - -- AVFormatContext *avFormatContext; -+ vtk_ff_const59 AVOutputFormat* avOutputFormat; - -- AVOutputFormat *avOutputFormat; -+ AVStream* avStream; - -- AVStream *avStream; -+ AVFrame* rgbInput; -+ AVFrame* yuvOutput; - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- unsigned char *codecBuf; -- int codecBufSize; --#endif -- -- AVFrame *rgbInput; -- AVFrame *yuvOutput; -+ AVCodecContext* avCodecContext; - - int openedFile; - int closedFile; -- }; -+}; - --//--------------------------------------------------------------------------- --vtkFFMPEGWriterInternal::vtkFFMPEGWriterInternal(vtkFFMPEGWriter *creator) -+//------------------------------------------------------------------------------ -+vtkFFMPEGWriterInternal::vtkFFMPEGWriterInternal(vtkFFMPEGWriter* creator) - { - this->Writer = creator; - this->Dim[0] = 0; - this->Dim[1] = 0; - -- this->avFormatContext = NULL; -+ this->avFormatContext = nullptr; - -- this->avOutputFormat = NULL; -+ this->avOutputFormat = nullptr; - -- this->avStream = NULL; -+ this->avStream = nullptr; - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- this->codecBuf = NULL; --#endif -- this->rgbInput = NULL; -- this->yuvOutput = NULL; -+ this->rgbInput = nullptr; -+ this->yuvOutput = nullptr; - - this->openedFile = 0; - this->closedFile = 1; -@@ -115,7 +93,7 @@ - this->FrameRate = 25; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - vtkFFMPEGWriterInternal::~vtkFFMPEGWriterInternal() - { - if (!this->closedFile) -@@ -124,41 +102,316 @@ - } - } - --//--------------------------------------------------------------------------- -+// for newer versions of ffmpeg use the new API as the old has been deprecated -+#if defined(LIBAVFORMAT_VERSION_MAJOR) && LIBAVFORMAT_VERSION_MAJOR >= 57 -+ -+//------------------------------------------------------------------------------ - int vtkFFMPEGWriterInternal::Start() - { - this->closedFile = 0; - -- //initialize libavcodec, and register all codecs and formats -+#ifdef NDEBUG -+ av_log_set_level(AV_LOG_ERROR); -+#endif -+ -+ // choose avi media file format -+ this->avOutputFormat = av_guess_format("avi", nullptr, nullptr); -+ if (!this->avOutputFormat) -+ { -+ vtkGenericWarningMacro(<< "Could not open the avi media file format."); -+ return 0; -+ } -+ -+ 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( -+ &this->avFormatContext, this->avOutputFormat, nullptr, this->Writer->GetFileName()) < 0) -+ { -+ vtkGenericWarningMacro(<< "Could not open the format context."); -+ return 0; -+ } -+ -+ vtk_ff_const59 AVCodec* codec; -+ if (!(codec = avcodec_find_encoder(video_codec))) -+ { -+ vtkGenericWarningMacro(<< "Failed to get video codec."); -+ return 0; -+ } -+ -+ // create a stream for that file -+ this->avStream = avformat_new_stream(this->avFormatContext, codec); -+ if (!this->avStream) -+ { -+ vtkGenericWarningMacro(<< "Could not create video stream."); -+ return 0; -+ } -+ -+ // Set up the codec. -+ if (!(this->avCodecContext = avcodec_alloc_context3(codec))) -+ { -+ vtkGenericWarningMacro(<< "Failed to allocate codec context."); -+ return 0; -+ } -+ -+ 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]; -+ if (this->Writer->GetCompression()) -+ { -+ this->avStream->codecpar->format = AV_PIX_FMT_YUVJ420P; -+ } -+ else -+ { -+ this->avStream->codecpar->format = AV_PIX_FMT_BGR24; -+ } -+ this->avStream->time_base.den = this->FrameRate; -+ this->avStream->time_base.num = 1; -+ -+ if (!this->Writer->GetBitRate()) -+ { -+ // allow a variable quality/size tradeoff -+ switch (this->Writer->GetQuality()) -+ { -+ case 0: -+ this->avStream->codecpar->bit_rate = 3 * 1024 * 1024; -+ break; -+ case 1: -+ this->avStream->codecpar->bit_rate = 6 * 1024 * 1024; -+ break; -+ default: -+ this->avStream->codecpar->bit_rate = 12 * 1024 * 1024; -+ break; -+ } -+ } -+ else -+ { -+ this->avStream->codecpar->bit_rate = this->Writer->GetBitRate(); -+ } -+ -+ // to do playback at actual recorded rate, this will need more work see also below -+ avcodec_parameters_to_context(this->avCodecContext, this->avStream->codecpar); -+ this->avCodecContext->time_base.den = this->FrameRate; -+ this->avCodecContext->time_base.num = 1; -+ // this->avCodecContext->max_b_frames = 2; -+ // about one full frame per second -+ this->avCodecContext->gop_size = this->FrameRate; -+ if (this->avFormatContext->oformat->flags & AVFMT_GLOBALHEADER) -+ { -+ this->avCodecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+ } -+ if (!this->Writer->GetBitRateTolerance()) -+ { -+ this->avCodecContext->bit_rate_tolerance = -+ this->avCodecContext->bit_rate; // ffmpeg won't create a codec if brt
avCodecContext->bit_rate_tolerance = this->Writer->GetBitRateTolerance(); -+ } -+ avcodec_parameters_from_context(this->avStream->codecpar, this->avCodecContext); -+ -+ if (avcodec_open2(this->avCodecContext, codec, nullptr) < 0) -+ { -+ vtkGenericWarningMacro(<< "Could not open codec."); -+ return 0; -+ } -+ -+ // for the output of the writer's input... -+ this->rgbInput = av_frame_alloc(); -+ if (!this->rgbInput) -+ { -+ vtkGenericWarningMacro(<< "Could not make rgbInput avframe."); -+ return 0; -+ } -+ this->rgbInput->format = AV_PIX_FMT_RGB24; -+ this->rgbInput->width = this->avCodecContext->width; -+ this->rgbInput->height = this->avCodecContext->height; -+ av_frame_get_buffer(this->rgbInput, 1); -+ -+ // and for the output to the codec's input. -+ this->yuvOutput = av_frame_alloc(); -+ if (!this->yuvOutput) -+ { -+ vtkGenericWarningMacro(<< "Could not make yuvOutput avframe."); -+ return 0; -+ } -+ this->yuvOutput->format = this->avCodecContext->pix_fmt; -+ this->yuvOutput->width = this->avCodecContext->width; -+ this->yuvOutput->height = this->avCodecContext->height; -+ this->yuvOutput->pts = 0; -+ av_frame_get_buffer(this->yuvOutput, 1); -+ -+ // Finally, open the file and start it off. -+ if (!(this->avOutputFormat->flags & AVFMT_NOFILE)) -+ { -+ if (avio_open(&this->avFormatContext->pb, this->Writer->GetFileName(), AVIO_FLAG_WRITE) < 0) -+ { -+ vtkGenericWarningMacro(<< "Could not open " << this->Writer->GetFileName() << "."); -+ return 0; -+ } -+ } -+ this->openedFile = 1; -+ -+ if (avformat_write_header(this->avFormatContext, nullptr) < 0) -+ { -+ vtkGenericWarningMacro(<< "Could not allocate avcodec private data."); -+ return 0; -+ } -+ return 1; -+} -+ -+//------------------------------------------------------------------------------ -+int vtkFFMPEGWriterInternal::Write(vtkImageData* id) -+{ -+ this->Writer->GetInputAlgorithm(0, 0)->UpdateWholeExtent(); -+ -+ // copy the image from the input to the RGB buffer while flipping Y -+ unsigned char* rgb = (unsigned char*)id->GetScalarPointer(); -+ unsigned char* src; -+ for (int y = 0; y < this->avCodecContext->height; y++) -+ { -+ src = rgb + (this->avCodecContext->height - y - 1) * this->avCodecContext->width * 3; // flip Y -+ unsigned char* dest = &this->rgbInput->data[0][y * this->rgbInput->linesize[0]]; -+ memcpy((void*)dest, (void*)src, this->avCodecContext->width * 3); -+ } -+ -+ // convert that to YUV for input to the codec -+ SwsContext* convert_ctx = -+ sws_getContext(this->avCodecContext->width, this->avCodecContext->height, AV_PIX_FMT_RGB24, -+ this->avCodecContext->width, this->avCodecContext->height, this->avCodecContext->pix_fmt, -+ SWS_BICUBIC, nullptr, nullptr, nullptr); -+ -+ if (convert_ctx == nullptr) -+ { -+ vtkGenericWarningMacro(<< "swscale context initialization failed"); -+ return 0; -+ } -+ -+ int result = sws_scale(convert_ctx, this->rgbInput->data, this->rgbInput->linesize, 0, -+ this->avCodecContext->height, this->yuvOutput->data, this->yuvOutput->linesize); -+ -+ sws_freeContext(convert_ctx); -+ -+ if (!result) -+ { -+ vtkGenericWarningMacro(<< "sws_scale() failed"); -+ return 0; -+ } -+ -+ int ret = avcodec_send_frame(this->avCodecContext, this->yuvOutput); -+ this->yuvOutput->pts++; -+ -+ if (ret < 0) -+ { -+ return 1; -+ } -+ -+ // run the encoder -+ AVPacket pkt; -+ av_init_packet(&pkt); -+ pkt.data = nullptr; -+ pkt.size = 0; -+ -+ while (!ret) -+ { -+ // dump the compressed result to file -+ ret = avcodec_receive_packet(this->avCodecContext, &pkt); -+ if (!ret) -+ { -+ pkt.stream_index = this->avStream->index; -+ int wret = av_write_frame(this->avFormatContext, &pkt); -+ if (wret < 0) -+ { -+ vtkGenericWarningMacro(<< "Problem encoding frame."); -+ return 0; -+ } -+ } -+ } -+ -+ return 1; -+} -+ -+//------------------------------------------------------------------------------ -+void vtkFFMPEGWriterInternal::End() -+{ -+ if (this->yuvOutput) -+ { -+ av_frame_free(&this->yuvOutput); -+ this->yuvOutput = nullptr; -+ } -+ -+ if (this->rgbInput) -+ { -+ av_frame_free(&this->rgbInput); -+ this->rgbInput = nullptr; -+ } -+ -+ if (this->avFormatContext) -+ { -+ if (this->openedFile) -+ { -+ av_write_trailer(this->avFormatContext); -+ avio_close(this->avFormatContext->pb); -+ this->openedFile = 0; -+ } -+ -+ avformat_free_context(this->avFormatContext); -+ this->avFormatContext = nullptr; -+ } -+ -+ if (this->avOutputFormat) -+ { -+ // Next line was done inside av_free(this->avFormatContext). -+ // av_free(this->avOutputFormat); -+ -+ this->avOutputFormat = nullptr; -+ } -+ -+ if (this->avCodecContext) -+ { -+ avcodec_close(this->avCodecContext); -+ avcodec_free_context(&this->avCodecContext); -+ this->avCodecContext = nullptr; -+ } -+ -+ this->closedFile = 1; -+} -+ -+// for old versions of ffmpeg use the old API, eventually remove this code -+// The new API was introduced around 2016 -+#else -+ -+//------------------------------------------------------------------------------ -+int vtkFFMPEGWriterInternal::Start() -+{ -+ this->closedFile = 0; -+ -+ // initialize libavcodec, and register all codecs and formats - av_register_all(); - -- //create the format context that wraps all of the media output structures --#if LIBAVFORMAT_VERSION_MAJOR >= 52 -+ // create the format context that wraps all of the media output structures - this->avFormatContext = avformat_alloc_context(); --#else -- this->avFormatContext = av_alloc_format_context(); --#endif - if (!this->avFormatContext) - { -- vtkGenericWarningMacro (<< "Coult not open the format context."); -+ vtkGenericWarningMacro(<< "Could not open the format context."); - return 0; - } - -- //choose avi media file format --#ifdef VTK_FFMPEG_HAS_OLD_HEADER -- this->avOutputFormat = guess_format("avi", NULL, NULL); --#else -- this->avOutputFormat = av_guess_format("avi", NULL, NULL); --#endif -+ // choose avi media file format -+ this->avOutputFormat = av_guess_format("avi", nullptr, nullptr); - if (!this->avOutputFormat) - { -- vtkGenericWarningMacro (<< "Could not open the avi media file format."); -+ vtkGenericWarningMacro(<< "Could not open the avi media file format."); - return 0; - } - - if (this->Writer->GetCompression()) - { -- //choose a codec that is easily playable on windows -+ // choose a codec that is easily playable on windows - this->avOutputFormat->video_codec = AV_CODEC_ID_MJPEG; - } - else -@@ -166,36 +419,24 @@ - this->avOutputFormat->video_codec = AV_CODEC_ID_RAWVIDEO; - } - -- //assign the format to the context -+ // assign the format to the context - this->avFormatContext->oformat = this->avOutputFormat; - -- //choose a filename for the output -+ // choose a filename for the output - strcpy(this->avFormatContext->filename, this->Writer->GetFileName()); - -- //create a stream for that file --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- this->avStream = av_new_stream(this->avFormatContext, 0); --#else -+ // create a stream for that file - this->avStream = avformat_new_stream(this->avFormatContext, 0); --#endif - if (!this->avStream) - { -- vtkGenericWarningMacro (<< "Could not create video stream."); -+ vtkGenericWarningMacro(<< "Could not create video stream."); - return 0; - } - -- //Set up the codec. -- AVCodecContext *c = this->avStream->codec; --#ifdef VTK_FFMPEG_AVCODECID -+ // Set up the codec. -+ AVCodecContext* c = this->avStream->codec; - c->codec_id = static_cast(this->avOutputFormat->video_codec); --#else -- c->codec_id = static_cast(this->avOutputFormat->video_codec); --#endif --#ifdef VTK_FFMPEG_HAS_OLD_HEADER -- c->codec_type = CODEC_TYPE_VIDEO; --#else -- c->codec_type = AVMEDIA_TYPE_VIDEO; --#endif -+ c->codec_type = AVMEDIA_TYPE_VIDEO; - c->width = this->Dim[0]; - c->height = this->Dim[1]; - if (this->Writer->GetCompression()) -@@ -207,25 +448,25 @@ - c->pix_fmt = AV_PIX_FMT_BGR24; - } - -- //to do playback at actual recorded rate, this will need more work see also below -+ // to do playback at actual recorded rate, this will need more work see also below - c->time_base.den = this->FrameRate; - c->time_base.num = 1; -- //about one full frame per second -+ // about one full frame per second - c->gop_size = this->FrameRate; - -- if( !this->Writer->GetBitRate() ) -+ if (!this->Writer->GetBitRate()) - { -- //allow a variable quality/size tradeoff -+ // allow a variable quality/size tradeoff - switch (this->Writer->GetQuality()) - { - case 0: -- c->bit_rate = 3*1024*1024; -+ c->bit_rate = 3 * 1024 * 1024; - break; - case 1: -- c->bit_rate = 6*1024*1024; -+ c->bit_rate = 6 * 1024 * 1024; - break; - default: -- c->bit_rate = 12*1024*1024; -+ c->bit_rate = 12 * 1024 * 1024; - break; - } - } -@@ -234,262 +475,164 @@ - c->bit_rate = this->Writer->GetBitRate(); - } - -- if(!this->Writer->GetBitRateTolerance()) -+ if (!this->Writer->GetBitRateTolerance()) - { -- c->bit_rate_tolerance = c->bit_rate; //ffmpeg won't create a codec if brt
bit_rate_tolerance = c->bit_rate; // ffmpeg won't create a codec if brt
bit_rate_tolerance = this->Writer->GetBitRateTolerance(); - } - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- //apply the chosen parameters -- if (av_set_parameters(this->avFormatContext, NULL) < 0) -- { -- vtkGenericWarningMacro (<< "Invalid output format parameters." ); -- return 0; -- } --#endif -- -- //manufacture a codec with the chosen parameters -- AVCodec *codec = avcodec_find_encoder(c->codec_id); -+ // manufacture a codec with the chosen parameters -+ AVCodec* codec = avcodec_find_encoder(c->codec_id); - if (!codec) - { -- vtkGenericWarningMacro (<< "Codec not found." ); -- return 0; -- } --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- if (avcodec_open(c, codec) < 0) --#else -- if (avcodec_open2(c, codec, NULL) < 0) --#endif -- { -- vtkGenericWarningMacro (<< "Could not open codec."); -+ vtkGenericWarningMacro(<< "Codec not found."); - return 0; - } -- -- //create buffers for the codec to work with. -- --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- //working compression space -- this->codecBufSize = 2*c->width*c->height*4; //hopefully this is enough -- this->codecBuf = new unsigned char[this->codecBufSize]; -- if (!this->codecBuf) -+ if (avcodec_open2(c, codec, nullptr) < 0) - { -- vtkGenericWarningMacro (<< "Could not make codec working space." ); -+ vtkGenericWarningMacro(<< "Could not open codec."); - return 0; - } --#endif - -- //for the output of the writer's input... -+ // for the output of the writer's input... - this->rgbInput = av_frame_alloc(); - if (!this->rgbInput) - { -- vtkGenericWarningMacro (<< "Could not make rgbInput avframe." ); -+ vtkGenericWarningMacro(<< "Could not make rgbInput avframe."); - return 0; - } - int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height); -- unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize); -+ unsigned char* rgb = (unsigned char*)av_malloc(sizeof(unsigned char) * RGBsize); - if (!rgb) - { -- vtkGenericWarningMacro (<< "Could not make rgbInput's buffer." ); -+ vtkGenericWarningMacro(<< "Could not make rgbInput's buffer."); - return 0; - } -- //The rgb buffer should get deleted when this->rgbInput is. -- avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); -+ // The rgb buffer should get deleted when this->rgbInput is. -+ avpicture_fill((AVPicture*)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); - -- //and for the output to the codec's input. -+ // and for the output to the codec's input. - this->yuvOutput = av_frame_alloc(); - if (!this->yuvOutput) - { -- vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." ); -+ vtkGenericWarningMacro(<< "Could not make yuvOutput avframe."); - return 0; - } - int YUVsize = avpicture_get_size(c->pix_fmt, c->width, c->height); -- unsigned char *yuv = (unsigned char *)av_malloc(sizeof(unsigned char) * YUVsize); -+ unsigned char* yuv = (unsigned char*)av_malloc(sizeof(unsigned char) * YUVsize); - if (!yuv) - { -- vtkGenericWarningMacro (<< "Could not make yuvOutput's buffer." ); -+ vtkGenericWarningMacro(<< "Could not make yuvOutput's buffer."); - return 0; - } -- //The yuv buffer should get deleted when this->yuv_input is. -- avpicture_fill((AVPicture *)this->yuvOutput, yuv, c->pix_fmt, c->width, c->height); -- -+ // The yuv buffer should get deleted when this->yuv_input is. -+ avpicture_fill((AVPicture*)this->yuvOutput, yuv, c->pix_fmt, c->width, c->height); - -- //Finally, open the file and start it off. --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- if (url_fopen(&this->avFormatContext->pb, this->avFormatContext->filename, URL_WRONLY) < 0) --#else -+ // Finally, open the file and start it off. - if (avio_open(&this->avFormatContext->pb, this->avFormatContext->filename, AVIO_FLAG_WRITE) < 0) --#endif - { -- vtkGenericWarningMacro (<< "Could not open " << this->Writer->GetFileName() << "." ); -+ vtkGenericWarningMacro(<< "Could not open " << this->Writer->GetFileName() << "."); - return 0; - } - this->openedFile = 1; - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- av_write_header(this->avFormatContext); --#else -- if (avformat_write_header(this->avFormatContext, NULL) < 0) -+ if (avformat_write_header(this->avFormatContext, nullptr) < 0) - { -- vtkGenericWarningMacro (<< "Could not allocate avcodec private data."); -+ vtkGenericWarningMacro(<< "Could not allocate avcodec private data."); - return 0; - } --#endif - return 1; - } - --//--------------------------------------------------------------------------- --int vtkFFMPEGWriterInternal::Write(vtkImageData *id) -+//------------------------------------------------------------------------------ -+int vtkFFMPEGWriterInternal::Write(vtkImageData* id) - { - this->Writer->GetInputAlgorithm(0, 0)->UpdateWholeExtent(); - -- AVCodecContext *cc = this->avStream->codec; -+ AVCodecContext* cc = this->avStream->codec; - -- //copy the image from the input to the RGB buffer while flipping Y -- unsigned char *rgb = (unsigned char*)id->GetScalarPointer(); -- unsigned char *src; -+ // copy the image from the input to the RGB buffer while flipping Y -+ unsigned char* rgb = (unsigned char*)id->GetScalarPointer(); -+ unsigned char* src; - for (int y = 0; y < cc->height; y++) - { -- src = rgb + (cc->height-y-1) * cc->width * 3; //flip Y -- unsigned char *dest = -- &this->rgbInput->data[0][y*this->rgbInput->linesize[0]]; -- memcpy((void*)dest, (void*)src, cc->width*3); -+ src = rgb + (cc->height - y - 1) * cc->width * 3; // flip Y -+ unsigned char* dest = &this->rgbInput->data[0][y * this->rgbInput->linesize[0]]; -+ memcpy((void*)dest, (void*)src, cc->width * 3); - } - -- //convert that to YUV for input to the codec --#ifdef VTK_FFMPEG_HAS_IMG_CONVERT -- img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt, -- (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24, -- cc->width, cc->height); --#else -- //convert that to YUV for input to the codec -- SwsContext* convert_ctx = sws_getContext( -- cc->width, cc->height, AV_PIX_FMT_RGB24, -- cc->width, cc->height, cc->pix_fmt, -- SWS_BICUBIC, NULL, NULL, NULL); -+ // convert that to YUV for input to the codec -+ SwsContext* convert_ctx = sws_getContext(cc->width, cc->height, AV_PIX_FMT_RGB24, cc->width, -+ cc->height, cc->pix_fmt, SWS_BICUBIC, nullptr, nullptr, nullptr); - -- if(convert_ctx == NULL) -+ if (convert_ctx == nullptr) - { - vtkGenericWarningMacro(<< "swscale context initialization failed"); - return 0; - } - -- int result = sws_scale(convert_ctx, -- this->rgbInput->data, this->rgbInput->linesize, -- 0, cc->height, -- this->yuvOutput->data, this->yuvOutput->linesize -- ); -+ int result = sws_scale(convert_ctx, this->rgbInput->data, this->rgbInput->linesize, 0, cc->height, -+ this->yuvOutput->data, this->yuvOutput->linesize); - - sws_freeContext(convert_ctx); - -- if(!result) -+ if (!result) - { - vtkGenericWarningMacro(<< "sws_scale() failed"); - return 0; - } --#endif - -- //run the encoder -+ // run the encoder - AVPacket pkt; - av_init_packet(&pkt); -- pkt.data = NULL; -+ pkt.data = nullptr; - pkt.size = 0; - --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- int toAdd = avcodec_encode_video(cc, -- this->codecBuf, -- this->codecBufSize, -- this->yuvOutput); -- if (toAdd) -- { -- //to do playback at actual recorded rate, this will need more work -- pkt.pts = cc->coded_frame->pts; -- //pkt.dts = ?; not dure what decompression time stamp should be -- pkt.data = this->codecBuf; -- pkt.size = toAdd; -- pkt.stream_index = this->avStream->index; -- if (cc->coded_frame->key_frame) //treat keyframes well -- { --#ifdef VTK_FFMPEG_HAS_OLD_HEADER -- pkt.flags |= PKT_FLAG_KEY; --#else -- pkt.flags |= AV_PKT_FLAG_KEY; --#endif -- } -- pkt.duration = 0; //presentation duration in time_base units or 0 if NA -- pkt.pos = -1; //byte position in stream or -1 if NA -- -- toAdd = av_write_frame(this->avFormatContext, &pkt); -- } -- if (toAdd) //should not have anything left over -- { -- vtkGenericWarningMacro (<< "Problem encoding frame." ); -- return 0; -- } -- --#else - int got_frame; -- int ret = avcodec_encode_video2(cc, -- &pkt, -- this->yuvOutput, -- &got_frame); -+ int ret = avcodec_encode_video2(cc, &pkt, this->yuvOutput, &got_frame); - -- //dump the compressed result to file -+ // dump the compressed result to file - if (got_frame) - { - pkt.stream_index = this->avStream->index; - ret = av_write_frame(this->avFormatContext, &pkt); - } - -- if (ret<0) -+ if (ret < 0) - { -- vtkGenericWarningMacro (<< "Problem encoding frame." ); -+ vtkGenericWarningMacro(<< "Problem encoding frame."); - return 0; - } --#endif - - return 1; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriterInternal::End() - { - if (this->yuvOutput) - { - av_free(this->yuvOutput->data[0]); - av_free(this->yuvOutput); -- this->yuvOutput = NULL; -+ this->yuvOutput = nullptr; - } - - if (this->rgbInput) - { - av_free(this->rgbInput->data[0]); - av_free(this->rgbInput); -- this->rgbInput = NULL; -+ this->rgbInput = nullptr; - } - -- --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- if (this->codecBuf) -- { -- av_free(this->codecBuf); -- this->codecBuf = NULL; -- } --#endif -- - if (this->avFormatContext) - { - if (this->openedFile) - { - av_write_trailer(this->avFormatContext); --#if LIBAVFORMAT_VERSION_MAJOR < 54 -- url_fclose(this->avFormatContext->pb); --#else - avio_close(this->avFormatContext->pb); --#endif - this->openedFile = 0; - } - -@@ -500,13 +643,13 @@ - if (this->avStream) - { - av_free(this->avStream); -- this->avStream = NULL; -+ this->avStream = nullptr; - } - - if (this->avOutputFormat) - { -- //Next line was done inside av_free(this->avFormatContext). -- //av_free(this->avOutputFormat); -+ // Next line was done inside av_free(this->avFormatContext). -+ // av_free(this->avOutputFormat); - - this->avOutputFormat = 0; - } -@@ -514,14 +657,15 @@ - this->closedFile = 1; - } - -+#endif - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - vtkStandardNewMacro(vtkFFMPEGWriter); - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - vtkFFMPEGWriter::vtkFFMPEGWriter() - { -- this->Internals = 0; -+ this->Internals = nullptr; - this->Quality = 2; - this->Compression = true; - this->Rate = 25; -@@ -529,24 +673,24 @@ - this->BitRateTolerance = 0; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - vtkFFMPEGWriter::~vtkFFMPEGWriter() - { - delete this->Internals; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriter::Start() - { - this->Error = 1; - -- if ( this->Internals ) -+ if (this->Internals) - { - vtkErrorMacro("Movie already started."); - this->SetErrorCode(vtkGenericMovieWriter::InitError); - return; - } -- if ( this->GetInput() == NULL ) -+ if (this->GetInput() == nullptr) - { - vtkErrorMacro("Please specify an input."); - this->SetErrorCode(vtkGenericMovieWriter::NoInputError); -@@ -566,7 +710,7 @@ - this->Initialized = 0; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriter::Write() - { - if (this->Error) -@@ -574,7 +718,7 @@ - return; - } - -- if ( !this->Internals ) -+ if (!this->Internals) - { - vtkErrorMacro("Movie not started."); - this->Error = 1; -@@ -588,13 +732,13 @@ - - int dim[4]; - input->GetDimensions(dim); -- if ( this->Internals->Dim[0] == 0 && this->Internals->Dim[1] == 0 ) -+ if (this->Internals->Dim[0] == 0 && this->Internals->Dim[1] == 0) - { - this->Internals->Dim[0] = dim[0]; - this->Internals->Dim[1] = dim[1]; - } - -- if (this->Internals->Dim[0]!= dim[0] || this->Internals->Dim[1]!= dim[1]) -+ if (this->Internals->Dim[0] != dim[0] || this->Internals->Dim[1] != dim[1]) - { - vtkErrorMacro("Image not of the same size."); - this->Error = 1; -@@ -602,7 +746,7 @@ - return; - } - -- if ( !this->Initialized ) -+ if (!this->Initialized) - { - this->Internals->FrameRate = this->Rate; - if (!this->Internals->Start()) -@@ -623,21 +767,21 @@ - } - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriter::End() - { - this->Internals->End(); - - delete this->Internals; -- this->Internals = 0; -+ this->Internals = nullptr; - } - --//--------------------------------------------------------------------------- -+//------------------------------------------------------------------------------ - void vtkFFMPEGWriter::PrintSelf(ostream& os, vtkIndent indent) - { - this->Superclass::PrintSelf(os, indent); - os << indent << "Quality: " << this->Quality << endl; -- os << indent << "Compression: " << (this->Compression?"true":"false") << endl; -+ os << indent << "Compression: " << (this->Compression ? "true" : "false") << endl; - os << indent << "Rate: " << this->Rate << endl; - os << indent << "BitRate: " << this->BitRate << endl; - os << indent << "BitRateTolerance: " << this->BitRateTolerance << endl; diff --git a/scripts/patches/vtk7.1_patches.sh b/scripts/patches/vtk7.1_patches.sh deleted file mode 100755 index 21e0959..0000000 --- a/scripts/patches/vtk7.1_patches.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -# https://sources.debian.org/patches/vtk7/7.1.1%2Bdfsg2-10.2/ - -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/10_allpatches.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/20_soversion-sharedlib.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/30_matplotlib.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/40_use_system_sqlite.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/60_use_system_mpi4py.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/70_fix_ftbfs_gcc49.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/80_fix_arm_compilation.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/100_javac-heap.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/101_java_install_path.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/105_unforce_embedded_glew.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/106_install_doxygen_scripts_in_nodoc_build.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/99-hdf5-1.10-compatibility -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/108_Doxygen-use-mathjax.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/109_java-jar-nonjavafiles.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/110_python-371.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/111_fix_perl.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/112_riscv_support.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/113_fix_python_equal.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/115_support-gcc10.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/mysq8_my_bool.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/gcc-11.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/ffmpeg-5.patch - -combinediff 10_allpatches.patch 20_soversion-sharedlib.patch > tmp1.patch -combinediff tmp1.patch 30_matplotlib.patch > tmp2.patch -combinediff tmp2.patch 40_use_system_sqlite.patch > tmp1.patch -combinediff tmp1.patch 60_use_system_mpi4py.patch > tmp2.patch -combinediff tmp2.patch 70_fix_ftbfs_gcc49.patch > tmp1.patch -combinediff tmp1.patch 80_fix_arm_compilation.patch > tmp2.patch -combinediff tmp2.patch 100_javac-heap.patch > tmp1.patch -combinediff tmp1.patch 101_java_install_path.patch > tmp2.patch -combinediff tmp2.patch 105_unforce_embedded_glew.patch > tmp1.patch -combinediff tmp1.patch 106_install_doxygen_scripts_in_nodoc_build.patch > tmp2.patch -combinediff tmp2.patch 108_Doxygen-use-mathjax.patch > tmp1.patch -combinediff tmp1.patch 109_java-jar-nonjavafiles.patch > tmp2.patch -combinediff tmp2.patch 110_python-371.patch > tmp1.patch -combinediff tmp1.patch 111_fix_perl.patch > tmp2.patch -combinediff tmp2.patch 112_riscv_support.patch > tmp1.patch -combinediff tmp1.patch 113_fix_python_equal.patch > tmp2.patch -combinediff tmp2.patch 115_support-gcc10.patch > tmp1.patch -combinediff tmp1.patch mysq8_my_bool.patch > tmp2.patch -combinediff tmp2.patch 3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch > tmp1.patch -combinediff tmp1.patch 581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch > tmp2.patch -combinediff tmp2.patch gcc-11.patch > tmp1.patch -combinediff tmp1.patch ffmpeg-5.patch > vtk7.1.patch - -rm tmp1.patch tmp2.patch diff --git a/scripts/patches/vtk8.2.patch b/scripts/patches/vtk8.2.patch deleted file mode 100644 index 6fd5344..0000000 --- a/scripts/patches/vtk8.2.patch +++ /dev/null @@ -1,589 +0,0 @@ -unchanged: ---- a/CMake/vtkModuleMacros.cmake -+++ b/CMake/vtkModuleMacros.cmake -@@ -417,8 +417,8 @@ - function(vtk_target_name _name) - get_property(_type TARGET ${_name} PROPERTY TYPE) - if(NOT "${_type}" STREQUAL EXECUTABLE AND NOT VTK_JAVA_INSTALL) -- set_property(TARGET ${_name} PROPERTY VERSION 1) -- set_property(TARGET ${_name} PROPERTY SOVERSION 1) -+ set_property(TARGET ${_name} PROPERTY VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}p.${VTK_BUILD_VERSION}) -+ set_property(TARGET ${_name} PROPERTY SOVERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}p) - endif() - if("${_name}" MATCHES "^[Vv][Tt][Kk]") - set(_vtk "") -unchanged: ---- a/Rendering/Tk/CMakeLists.txt -+++ b/Rendering/Tk/CMakeLists.txt -@@ -118,7 +118,7 @@ - vtk_target_install(vtkRenderingPythonTkWidgets) - - set_property(TARGET vtkRenderingPythonTkWidgets PROPERTY OUTPUT_NAME -- vtkRenderingPythonTkWidgets-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}) -+ vtkRenderingPythonTkWidgets) - - set(Module_PYTHON_LIBS ${VTK_TK_LIBRARIES}) - if(VTK_USE_X) -unchanged: ---- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h -+++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h -@@ -156,6 +156,10 @@ - * to implement IsAvailable. - */ - static Availability CheckMPLAvailability(); -+ static void DisableMPL() -+ { -+ MPLMathTextAvailable = UNAVAILABLE; -+ }; - - //@{ - /** -unchanged: ---- a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx -+++ b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx -@@ -1206,7 +1206,10 @@ - vtkIdType cellsPerNode = numTotalCells / nprocs; - - vtkIdList **sendCells = new vtkIdList * [ nprocs ]; -- memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); -+ -+ if (sizeof(vtkIdList *) * nprocs > 0) { -+ memset(sendCells, 0, sizeof(vtkIdList *) * nprocs); -+ } - - if (numConsumers == nprocs - 1) - { -@@ -1700,7 +1703,9 @@ - // Exchange int arrays - - float **recvArrays = new float * [nprocs]; -- memset(recvArrays, 0, sizeof(float *) * nprocs); -+ if (sizeof(float *) * nprocs > 0) { -+ memset(recvArrays, 0, sizeof(float *) * nprocs); -+ } - - if (sendSize[me] > 0) // sent myself an array - { -@@ -1822,7 +1827,9 @@ - // Exchange int arrays - - vtkIdType **recvArrays = new vtkIdType * [nprocs]; -- memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); -+ if (sizeof(vtkIdType *) * nprocs > 0) { -+ memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs); -+ } - - if (sendSize[me] > 0) // sent myself an array - { -@@ -2938,7 +2945,9 @@ - if (npoints) - { - unsigned char *vals = new unsigned char [npoints]; -- memset(vals, val, npoints); -+ if (npoints > 0) { -+ memset(vals, val, npoints); -+ } - - Array->SetArray(vals, npoints, 0, - vtkUnsignedCharArray::VTK_DATA_ARRAY_DELETE); -@@ -2960,7 +2969,9 @@ - if (ncells) - { - unsigned char *vals = new unsigned char [ncells]; -- memset(vals, val, ncells); -+ if (ncells > 0) { -+ memset(vals, val, ncells); -+ } - - Array->SetArray(vals, ncells, 0, vtkUnsignedCharArray::VTK_DATA_ARRAY_DELETE); - } -@@ -3167,7 +3178,9 @@ - vtkIdType nGridPoints = grid->GetNumberOfPoints(); - - vtkIdType *numPointsOutside = new vtkIdType [nprocs]; -- memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); -+ if (sizeof(vtkIdType) * nprocs > 0) { -+ memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs); -+ } - - vtkIdTypeArray *globalIds = vtkIdTypeArray::New(); - globalIds->SetNumberOfValues(nGridPoints); -@@ -3249,10 +3262,16 @@ - // global ID back? - - vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs]; -- memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); -+ -+ if (sizeof(vtkFloatArray *) * nprocs > 0) { -+ memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs); -+ } - - vtkIdTypeArray **localIds = new vtkIdTypeArray * [nprocs]; -- memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ -+ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { -+ memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - vtkIdType *next = new vtkIdType [nprocs]; - vtkIdType *next3 = new vtkIdType [nprocs]; -@@ -3430,7 +3449,9 @@ - { - // There are no cells in my assigned region - -- memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ if (sizeof(vtkIdTypeArray *) * nprocs > 0) { -+ memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - return gids; - } -@@ -3641,7 +3662,10 @@ - std::multimap::iterator mapIt; - - vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs]; -- memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); -+ -+ if (sizeof (vtkIdTypeArray *) * nprocs > 0) { -+ memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs); -+ } - - for (int i=0; iGetNumberOfPoints(); - - vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs]; -- memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ if (sizeof(vtkIdTypeArray *) * nprocs) { -+ memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs); -+ } - - if (numPoints < 1) - { -unchanged: ---- VTK-6.3.0.orig/Wrapping/Java/CMakeLists.txt -+++ VTK-6.3.0/Wrapping/Java/CMakeLists.txt -@@ -80,6 +80,8 @@ if(APPLE) - set(JAVAC_OPTIONS -J-Xmx512m) - endif() - -+set(JAVAC_OPTIONS -J-Xmx1024m) -+ - get_property(java_modules GLOBAL PROPERTY VTK_JAVA_WRAPPED) - foreach(module IN LISTS java_modules) - if(NOT ${module}_EXCLUDE_FROM_WRAPPING) -unchanged: ---- VTK-6.3.0.orig/CMake/vtkJavaWrapping.cmake -+++ VTK-6.3.0/CMake/vtkJavaWrapping.cmake -@@ -79,7 +79,7 @@ function(vtk_add_java_wrapping module_na - install(TARGETS ${module_name}Java - EXPORT ${VTK_INSTALL_EXPORT_NAME} - RUNTIME DESTINATION ${VTK_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries -- LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries -+ LIBRARY DESTINATION ${VTK_INSTALL_LIBRARY_DIR}/jni COMPONENT RuntimeLibraries - ARCHIVE DESTINATION ${VTK_INSTALL_ARCHIVE_DIR} COMPONENT Development) - endif() - endfunction() -unchanged: ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -540,9 +540,7 @@ - - # The doxygen documentation needs to be aware of all modules. - option(BUILD_DOCUMENTATION "Build the VTK documentation" OFF) --if(BUILD_DOCUMENTATION) -- add_subdirectory(Utilities/Doxygen) --endif() -+add_subdirectory(Utilities/Doxygen) - - # If python wrapping and testing is enabled then add driver scripts to run - # tests. Note: Many pythong tests used to be automatically converted from TCL -unchanged: ---- b/Utilities/Doxygen/CMakeLists.txt -+++ b/Utilities/Doxygen/CMakeLists.txt -@@ -1,69 +1,79 @@ - # - # Build the documentation - # --find_package(Doxygen REQUIRED) --find_package(Perl REQUIRED) --find_package(HTMLHelp) -+if (BUILD_DOCUMENTATION) -+ find_package(Doxygen REQUIRED) -+ find_package(Perl REQUIRED) -+ find_package(HTMLHelp) - --option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) --option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) --option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) --mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) --if(DOXYGEN_SHORT_NAMES) -- set(DOXYGEN_SHORT_NAMES YES) --else() -- set(DOXYGEN_SHORT_NAMES NO) --endif() --if(DOXYGEN_GENERATE_HTMLHELP) -- set(DOXYGEN_GENERATE_HTMLHELP YES) --else() -- set(DOXYGEN_GENERATE_HTMLHELP NO) --endif() -- --# --# Configure the script and the doxyfile, then add target --# --set(HAVE_DOT_YESNO NO) --if(DOT) -- set(HAVE_DOT_YESNO YES) -- if(NOT DOT_PATH) -- get_filename_component(DOT_PATH ${DOT} PATH) -+ option(DOXYGEN_SHORT_NAMES "Build Doxygen of VTK using short file names" OFF) -+ option(DOXYGEN_KEEP_TEMP "Do not delete the temporary Doxygen headers" OFF) -+ option(DOXYGEN_GENERATE_HTMLHELP "Generate HTML help (CHM) files" ON) -+ mark_as_advanced(DOXYGEN_SHORT_NAMES DOXYGEN_KEEP_TEMP DOXYGEN_GENERATE_HTMLHELP) -+ if(DOXYGEN_SHORT_NAMES) -+ set(DOXYGEN_SHORT_NAMES YES) -+ else() -+ set(DOXYGEN_SHORT_NAMES NO) - endif() --endif() -- --# Build up a list of all module source directories. Note that this should be --# all source directories and so does not use the normal variables. --unset(VTK_MODULE_DIRS_DOXYGEN) --file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") --foreach(module ${src}) -- get_filename_component(module_BASE ${module} PATH) -- if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") -- # Skip the utilities and third parties directories. -+ if(DOXYGEN_GENERATE_HTMLHELP) -+ set(DOXYGEN_GENERATE_HTMLHELP YES) - else() -- # Use both the source and binary directories, this ensures that -- # generated files will be included, but they may then be architecture, -- # build configuration and/or compiler specific. All source directories -- # are included whether the module is enabled or not. -- set(VTK_MODULE_DIRS_DOXYGEN -- "${VTK_MODULE_DIRS_DOXYGEN} -+ set(DOXYGEN_GENERATE_HTMLHELP NO) -+ endif() -+ -+ # -+ # Configure the script and the doxyfile, then add target -+ # -+ set(HAVE_DOT_YESNO NO) -+ if(DOT) -+ set(HAVE_DOT_YESNO YES) -+ if(NOT DOT_PATH) -+ get_filename_component(DOT_PATH ${DOT} PATH) -+ endif() -+ endif() -+ -+ # Build up a list of all module source directories. Note that this should be -+ # all source directories and so does not use the normal variables. -+ unset(VTK_MODULE_DIRS_DOXYGEN) -+ file(GLOB src RELATIVE "${VTK_SOURCE_DIR}" "${VTK_SOURCE_DIR}/*/*/module.cmake") -+ foreach(module ${src}) -+ get_filename_component(module_BASE ${module} PATH) -+ if("${module_BASE}" MATCHES "^Utilities" OR ${module_BASE} MATCHES "^Third") -+ # Skip the utilities and third parties directories. -+ else() -+ # Use both the source and binary directories, this ensures that -+ # generated files will be included, but they may then be architecture, -+ # build configuration and/or compiler specific. All source directories -+ # are included whether the module is enabled or not. -+ set(VTK_MODULE_DIRS_DOXYGEN -+ "${VTK_MODULE_DIRS_DOXYGEN} - \"${VTK_SOURCE_DIR}/${module_BASE}\" - \"${VTK_BINARY_DIR}/${module_BASE}\"") -- endif() --endforeach() -+ endif() -+ endforeach() -+ -+ FIND_PATH(MATHJAX_CODEFILE MathJax.js -+ PATHS -+ /usr/share/mathjax/ -+ /usr/share/javascript/ -+ /usr/share/javascript/mathjax/ -+ ) -+ -+ configure_file( -+ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in -+ ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) -+ -+ configure_file( -+ ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in -+ ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -+ @ONLY) -+ -+ add_custom_target(DoxygenDoc -+ ${CMAKE_COMMAND} -+ -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -+ DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) - --configure_file( -- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in -- ${VTK_BINARY_DIR}/Utilities/Doxygen/doxyfile) -- --configure_file( -- ${VTK_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.cmake.in -- ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -- @ONLY) -- --add_custom_target(DoxygenDoc -- ${CMAKE_COMMAND} -- -P ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake -- DEPENDS ${VTK_BINARY_DIR}/Utilities/Doxygen/doc_makeall.cmake) -+endif() - - if(NOT VTK_INSTALL_NO_DOCUMENTATION) - macro(__vtk_install_documentation_files glob) -unchanged: ---- a/Utilities/Doxygen/doxyfile.in -+++ b/Utilities/Doxygen/doxyfile.in -@@ -19,6 +19,9 @@ - GENERATE_TAGFILE = "@VTK_BINARY_DIR@/Utilities/Doxygen/vtk@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@.tag" - - PDF_HYPERLINKS = YES -+USE_MATHJAX = YES -+MATHJAX_RELPATH = @MATHJAX_CODEFILE@ -+ - - HAVE_DOT = @HAVE_DOT_YESNO@ - DOT_PATH = "@DOT_PATH@" -unchanged: ---- a/Wrapping/Java/CMakeLists.txt -+++ b/Wrapping/Java/CMakeLists.txt -@@ -259,7 +259,7 @@ - if(VTK_JAVA_SWT_COMPONENT) - set(VTK_JAVA_SAMPLE_DEPENDENCIES ${VTK_JAVA_SAMPLE_DEPENDENCIES} - rendering/SwtConeRendering -- ) -+q ) - endif() - endif() - -@@ -358,11 +358,10 @@ - COMMENT "Compiling Java Classes" - ) - --# Create the JAR file containing all compiled classes and -+ - add_custom_command( -- COMMAND ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" -- -C ${VTK_BINARY_DIR}/java -- vtk -+ COMMAND cd ${VTK_BINARY_DIR}/java && find . -name "*.class" -print | sort -u > classes.list -+ COMMAND cd ${VTK_BINARY_DIR}/java && ${JAVA_ARCHIVE} -cvf "${VTK_JAR_PATH}/vtk.jar" @${VTK_BINARY_DIR}/java/classes.list - DEPENDS ${VTK_BINARY_DIR}/java/javac_stamp.txt ${JAVA_LIBRARIES} - OUTPUT ${VTK_JAR_PATH}/vtk.jar - COMMENT "Java Archive" -unchanged: ---- a/Wrapping/PythonCore/vtkPythonArgs.cxx -+++ b/Wrapping/PythonCore/vtkPythonArgs.cxx -@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext) - else if (PyUnicode_Check(o)) - { - #if PY_VERSION_HEX >= 0x03030000 -- a = PyUnicode_AsUTF8(o); -+ a = const_cast(PyUnicode_AsUTF8(o)); - return true; - #else - PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL); -unchanged: ---- a/Utilities/Doxygen/doc_class2example.pl -+++ b/Utilities/Doxygen/doc_class2example.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2004-06-09 11:12:38 barre> - # - # Build cross-references between classes and examples -unchanged: ---- a/Utilities/Doxygen/doc_cleanhtml.pl -+++ b/Utilities/Doxygen/doc_cleanhtml.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2002-10-25 20:17:59 barre> - # - # Clean the HTML generated by Doxygen to remove some layout quicks -unchanged: ---- a/Utilities/Doxygen/doc_codematch.pl -+++ b/Utilities/Doxygen/doc_codematch.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2002-01-18 16:17:26 barre> - # - # Summary ? -unchanged: ---- a/Utilities/Doxygen/doc_contributors.pl -+++ b/Utilities/Doxygen/doc_contributors.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2002-11-01 15:33:04 barre> - # - # Get author and contributors. -unchanged: ---- a/Utilities/Doxygen/doc_header2doxygen.pl -+++ b/Utilities/Doxygen/doc_header2doxygen.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2011-01-16 21:15:53 barre> - # - # Convert VTK headers to doxygen format -unchanged: ---- a/Utilities/Doxygen/doc_index.pl -+++ b/Utilities/Doxygen/doc_index.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2001-11-21 17:40:48 barre> - # - # Build full-text index -unchanged: ---- a/Utilities/Doxygen/doc_rmpath.pl -+++ b/Utilities/Doxygen/doc_rmpath.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2001-10-05 11:49:40 barre> - # - # Remove path to intermediate Doxygen dir from html doc -unchanged: ---- a/Utilities/Doxygen/doc_version.pl -+++ b/Utilities/Doxygen/doc_version.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/bin/perl - # Time-stamp: <2006-11-15 13:25:02 barre> - # - # Extract VTK version and add it to documentation -unchanged: ---- vtk7-7.1.1+dfsg1.orig/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h -+++ vtk7-7.1.1+dfsg1/Utilities/KWIML/vtkkwiml/include/kwiml/abi.h -@@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY wa - #elif defined(__XTENSA_EL__) - # define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE - -+/* RISC-V */ -+#elif defined(__riscv) || defined(__riscv__) -+# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE -+ - /* Unknown CPU */ - #elif !defined(KWIML_ABI_NO_ERROR_ENDIAN) - # error "Byte order of target CPU unknown." -unchanged: ---- a/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py -+++ b/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py -@@ -197,7 +197,7 @@ - return dsa.NoneArray; - - if res is dsa.NoneArray: -- if max_dims is 1: -+ if max_dims == 1: - # Weird trick to make the array look like a scalar - max_dims = () - res = numpy.empty(max_dims) -unchanged: ---- a/CMake/VTKGenerateExportHeader.cmake -+++ b/CMake/VTKGenerateExportHeader.cmake -@@ -174,7 +174,7 @@ - execute_process(COMMAND ${CMAKE_C_COMPILER} --version - OUTPUT_VARIABLE _gcc_version_info - ERROR_VARIABLE _gcc_version_info) -- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" -+ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" - _gcc_version "${_gcc_version_info}") - # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the - # patch level, handle this here: -unchanged: ---- a/IO/MySQL/vtkMySQLDatabasePrivate.h -+++ b/IO/MySQL/vtkMySQLDatabasePrivate.h -@@ -7,6 +7,10 @@ - - #include "vtkIOMySQLModule.h" // For export macro - #include // needed for MYSQL typedefs -+#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) && \ -+ MYSQL_VERSION_ID >= 80001 && MYSQL_VERSION_ID != 80002 -+typedef bool my_bool; -+#endif - - class VTKIOMYSQL_EXPORT vtkMySQLDatabasePrivate - { -unchanged: ---- vtk7.orig/Rendering/FreeType/vtkFreeTypeTools.cxx -+++ vtk7/Rendering/FreeType/vtkFreeTypeTools.cxx -@@ -273,8 +273,7 @@ - } - - //---------------------------------------------------------------------------- --FT_CALLBACK_DEF(FT_Error) --vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, -+static FT_Error vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, - FT_Pointer request_data, - FT_Face* face) -unchanged: ---- a/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx -+++ b/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx -@@ -31,8 +31,7 @@ vtkStandardNewMacro(vtkFontConfigFreeTypeTools); - namespace - { - // The FreeType face requester callback: --FT_CALLBACK_DEF(FT_Error) --vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, -+static FT_Error vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, - FT_Pointer request_data, - FT_Face* face) -unchanged: ---- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchyPrivate.h -+++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchyPrivate.h -@@ -66,7 +66,7 @@ - { - } - -- bool operator () ( const vtkIdType& a, const vtkIdType& b ) -+ bool operator () ( const vtkIdType& a, const vtkIdType& b ) const - { - if (0 == this->Hierarchy) - { -unchanged: ---- vtk7-7.1.1+dfsg2.orig/Rendering/Label/vtkLabelHierarchy.cxx -+++ vtk7-7.1.1+dfsg2/Rendering/Label/vtkLabelHierarchy.cxx -@@ -525,7 +525,7 @@ - { - public: - bool operator()(const vtkHierarchyNode & a, -- const vtkHierarchyNode & b) -+ const vtkHierarchyNode & b) const - { - if (a.Level != b.Level) - { -only in patch2: -unchanged: ---- a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c -+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c -@@ -216,5 +216,5 @@ int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, MPI - * Prevent warning in some versions of ranlib(1) because the object - * file has no symbols. - */ --const char exodus_unused_symbol_dummy_1; -+const char exodus_unused_symbol_dummy_ex_create_par; - #endif -only in patch2: -unchanged: ---- a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c -+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c -@@ -459,5 +459,5 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float - * Prevent warning in some versions of ranlib(1) because the object - * file has no symbols. - */ --const char exodus_unused_symbol_dummy_1; -+const char exodus_unused_symbol_dummy_ex_open_par; - #endif diff --git a/scripts/patches/vtk8.2_patches.sh b/scripts/patches/vtk8.2_patches.sh deleted file mode 100755 index 5cf4b12..0000000 --- a/scripts/patches/vtk8.2_patches.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# https://sources.debian.org/patches/vtk7/7.1.1%2Bdfsg2-10.2/ - -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/20_soversion-sharedlib.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/30_matplotlib.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/70_fix_ftbfs_gcc49.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/100_javac-heap.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/101_java_install_path.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/106_install_doxygen_scripts_in_nodoc_build.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/108_Doxygen-use-mathjax.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/109_java-jar-nonjavafiles.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/110_python-371.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/111_fix_perl.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/112_riscv_support.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/115_support-gcc10.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/mysq8_my_bool.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch -wget -nc https://sources.debian.org/data/main/v/vtk7/7.1.1%2Bdfsg2-10.2/debian/patches/581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch - -combinediff 20_soversion-sharedlib.patch 30_matplotlib.patch > tmp1.patch -combinediff tmp1.patch vtk8-70_fix_ftbfs_gcc49.patch > tmp2.patch -combinediff tmp2.patch 100_javac-heap.patch > tmp1.patch -combinediff tmp1.patch 101_java_install_path.patch > tmp2.patch -combinediff tmp2.patch 106_install_doxygen_scripts_in_nodoc_build.patch > tmp1.patch -combinediff tmp1.patch 108_Doxygen-use-mathjax.patch > tmp2.patch -combinediff tmp2.patch 109_java-jar-nonjavafiles.patch > tmp1.patch -combinediff tmp1.patch 110_python-371.patch > tmp2.patch -combinediff tmp2.patch 111_fix_perl.patch > tmp1.patch -combinediff tmp1.patch 112_riscv_support.patch > tmp2.patch -combinediff tmp2.patch vtk8-113_fix_python_equal.patch > tmp1.patch -combinediff tmp1.patch 115_support-gcc10.patch > tmp2.patch -combinediff tmp2.patch mysq8_my_bool.patch > tmp1.patch -combinediff tmp1.patch 3edc0de2b04ae1e100c229e592d6b9fa94f2915a.patch > tmp2.patch -combinediff tmp2.patch 581d9eb874b2b80a3fb21c739a96fa6f955ffb5e.patch > tmp1.patch -combinediff tmp1.patch vtk8-gcc-11-exodus.patch > vtk8.2.patch - -rm tmp1.patch tmp2.patch