From 03766d0834c1ca8dea25ffafbe4fe1c60786a412 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Tue, 23 Jun 2020 19:20:18 +0200 Subject: [PATCH] [CGNS/ParaView] Add new ports (#9960) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [cgns] add port cgns * [paraview] add new port * [paraview] correct dependencies; disable catalyst * [VTK/ParaView] Make ParaView build * [paraview] add missing patch * [paraview] add cgns patch * [paraview] add qt plugin patches back in. Remove in the future * [vtk] slightly improved patches * [vtk] don't disable findPython * [paraview] add more features * [paraview] remove X11Extras from OSX * [vtk] make vtk workcorrectly with python and prepare for paraview with python * [paraview] Python fixes * [paraview] small bin -> lib replacement fix for static builds * [vtk] fix patch path * update baseline to exclude paraview for the time being on osx and linux. requires a fix in qt5-base linkage of libpq. * [paraview]try setting LD_LIBRARY_PATH for unix systems * [paraview] a bit of cleanup * update baseline * fix typo in baseline * [paraview] remove unnecessary patch * [vtk] replace custom patch with upstream patch * [paraview] cleanup in the portfile. * Update ports/paraview/CONTROL Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> --- ports/cgns/CONTROL | 32 + ports/cgns/cgnsconfig.h | 6 + ports/cgns/defines.patch | 16 + ports/cgns/hdf5.patch | 108 +++ ports/cgns/linux_lfs.patch | 12 + ports/cgns/portfile.cmake | 88 +++ ports/cgns/zlib_szip_mpi.patch | 35 + ports/paraview/CONTROL | 25 + ports/paraview/VisIt_Build.patch | 107 +++ ports/paraview/cgns.patch | 29 + ports/paraview/paraview_build.patch | 745 +++++++++++++++++++++ ports/paraview/portfile.cmake | 173 +++++ ports/paraview/python_include.patch | 13 + ports/paraview/python_wrapper.patch | 19 + ports/paraview/qt_plugin.patch | 50 ++ ports/paraview/qt_static_plugins.patch | 77 +++ ports/paraview/remove_duplicates.patch | 14 + ports/paraview/removedoublesymbols.patch | 89 +++ ports/vtk/6890.diff | 74 ++ ports/vtk/CONTROL | 2 +- ports/vtk/FindLZMA.patch | 2 +- ports/vtk/FindLibHaru.patch | 37 - ports/vtk/NoUndefDebug.patch | 16 +- ports/vtk/SplitLibraryConfigurations.cmake | 28 - ports/vtk/portfile.cmake | 62 +- ports/vtk/python_debug.patch | 13 + ports/vtk/pythonwrapper.patch | 12 +- scripts/ci.baseline.txt | 2 + 28 files changed, 1776 insertions(+), 110 deletions(-) create mode 100644 ports/cgns/CONTROL create mode 100644 ports/cgns/cgnsconfig.h create mode 100644 ports/cgns/defines.patch create mode 100644 ports/cgns/hdf5.patch create mode 100644 ports/cgns/linux_lfs.patch create mode 100644 ports/cgns/portfile.cmake create mode 100644 ports/cgns/zlib_szip_mpi.patch create mode 100644 ports/paraview/CONTROL create mode 100644 ports/paraview/VisIt_Build.patch create mode 100644 ports/paraview/cgns.patch create mode 100644 ports/paraview/paraview_build.patch create mode 100644 ports/paraview/portfile.cmake create mode 100644 ports/paraview/python_include.patch create mode 100644 ports/paraview/python_wrapper.patch create mode 100644 ports/paraview/qt_plugin.patch create mode 100644 ports/paraview/qt_static_plugins.patch create mode 100644 ports/paraview/remove_duplicates.patch create mode 100644 ports/paraview/removedoublesymbols.patch create mode 100644 ports/vtk/6890.diff delete mode 100644 ports/vtk/FindLibHaru.patch delete mode 100644 ports/vtk/SplitLibraryConfigurations.cmake create mode 100644 ports/vtk/python_debug.patch diff --git a/ports/cgns/CONTROL b/ports/cgns/CONTROL new file mode 100644 index 000000000..3398bad14 --- /dev/null +++ b/ports/cgns/CONTROL @@ -0,0 +1,32 @@ +Source: cgns +Version: 3.4.0-1 +Homepage: http://cgns.org/ +Description: The CFD General Notation System (CGNS) provides a standard for recording and recovering computer data associated with the numerical solution of fluid dynamics equations. +Default-Features: hdf5, lfsselector + +Feature: mpi +Description: Compile with support for the message passage interface (MPI) +Build-Depends: hdf5[core,parallel] + +Feature: fortran +Description: Enable fortran support (not yet implemented) + +Feature: tests +Description: Build tests + +Feature: tools +Description: Build tools + +Feature: hdf5 +Description: Enable hdf5 support +Build-Depends: hdf5[core,tools] + +Feature: lfsselector +Description: Selector for LFS +Build-Depends: cgns[core,lfs] (!osx) + +Feature: lfs +Description: Enable LFS support + +Feature: legacy +Description: Enable legacy support diff --git a/ports/cgns/cgnsconfig.h b/ports/cgns/cgnsconfig.h new file mode 100644 index 000000000..7ebe18ac5 --- /dev/null +++ b/ports/cgns/cgnsconfig.h @@ -0,0 +1,6 @@ +#ifndef CGNSCONFIG_H +#define CGNSCONFIG_H + +#include "cgnstypes.h" + +#endif \ No newline at end of file diff --git a/ports/cgns/defines.patch b/ports/cgns/defines.patch new file mode 100644 index 000000000..e17d48828 --- /dev/null +++ b/ports/cgns/defines.patch @@ -0,0 +1,16 @@ +diff --git a/src/cgnstypes.h.in b/src/cgnstypes.h.in +index 98c4e7fdc..8c6bcea62 100644 +--- a/src/cgnstypes.h.in ++++ b/src/cgnstypes.h.in +@@ -29,6 +29,11 @@ + #ifndef CGNSTYPES_H + #define CGNSTYPES_H + ++#define CG_BUILD_HDF5 @BUILDHDF5@ ++#define CG_BUILD_FORTRAN @BUILDFORTRAN@ ++#define CG_BUILD_PARALLEL @BUILDPARALLEL@ ++#define CG_BUILD_BASESCOPE @BUILDBASESCOPE@ ++ + #define CG_BUILD_LEGACY @BUILDLEGACY@ + #define CG_BUILD_64BIT @BUILD64BIT@ + #define CG_BUILD_SCOPE @BUILDSCOPE@ diff --git a/ports/cgns/hdf5.patch b/ports/cgns/hdf5.patch new file mode 100644 index 000000000..4de9ee35b --- /dev/null +++ b/ports/cgns/hdf5.patch @@ -0,0 +1,108 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 58f078fe7..46446da8a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -194,71 +194,17 @@ endif (CGNS_ENABLE_FORTRAN AND HAS_FORTRAN) + option(CGNS_ENABLE_HDF5 "Enable or disable HDF5 interface" "OFF") + if (CGNS_ENABLE_HDF5) + +- if (CGNS_BUILD_SHARED) +- set (FIND_HDF_COMPONENTS C shared) +- else (CGNS_BUILD_SHARED) +- set (FIND_HDF_COMPONENTS C static) +- endif (CGNS_BUILD_SHARED) +- message (STATUS "HDF5 find comps: ${FIND_HDF_COMPONENTS}") +- +- #set (SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME}) +- set (SEARCH_PACKAGE_NAME "hdf5") +- +- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) +- message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") +- if (HDF5_FOUND) +- add_executable (h5dump IMPORTED) +- if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) +- set (FIND_HDF_COMPONENTS C) +- +- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) +- message (STATUS "HDF5 libs:${HDF5_FOUND} C:${HDF5_C_FOUND}") +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) +- if (HDF5_BUILD_SHARED_LIBS) +- add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) +- else (HDF5_BUILD_SHARED_LIBS) +- add_definitions (-DH5_BUILT_AS_STATIC_LIB) +- endif (HDF5_BUILD_SHARED_LIBS) +- if (BUILD_SHARED_LIBS AND WIN32) +- set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dumpdll") +- else (BUILD_SHARED_LIBS AND WIN32) +- set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") +- endif (BUILD_SHARED_LIBS AND WIN32) +- else (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) +- if (BUILD_SHARED_LIBS AND HDF5_shared_C_FOUND) +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) +- else (HDF5_static_C_FOUND) +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) +- endif (BUILD_SHARED_LIBS AND HDF5_shared_C_FOUND) +- set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") +- endif (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) ++ find_package(HDF5 CONFIG REQUIRED) ++ if(TARGET hdf5::hdf5-shared) ++ set (LINK_LIBS ${LINK_LIBS} hdf5::hdf5-shared) ++ #add_executable(h5dump ALIAS hdf5::h5dump-shared) ++ set (HDF5_DUMP_EXECUTABLE $) ++ else() ++ set (LINK_LIBS ${LINK_LIBS} hdf5::hdf5-static) ++ #add_executable(h5dump ALIAS hdf5::h5dump) + set (HDF5_DUMP_EXECUTABLE $) +- +- set (HDF5_HAVE_H5PUBCONF_H 1) +- set (HDF5_HAVE_HDF5 1) +- set (HDF5_HDF5_HEADER "h5pubconf.h") +- set (HDF5_INCLUDE_DIR_GEN ${HDF5_INCLUDE_DIR}) +- message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") +- else (HDF5_FOUND) +- find_package (HDF5) # Legacy find +-#Legacy find_package does not set HDF5_TOOLS_DIR, so we set it here +- set(HDF5_TOOLS_DIR ${HDF5_LIBRARY_DIRS}/../bin) +-#Legacy find_package does not set HDF5_BUILD_SHARED_LIBS, so we set it here +- if (CGNS_BUILD_SHARED AND EXISTS "${HDF5_LIBRARY_DIRS}/libhdf5${CMAKE_SHARED_LIBRARY_SUFFIX}") +- set (HDF5_BUILD_SHARED_LIBS 1) +- add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) +- else () +- set (HDF5_BUILD_SHARED_LIBS 0) +- add_definitions (-DH5_BUILT_AS_STATIC_LIB) +- endif () +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) +- +- add_executable (h5dump IMPORTED) +- set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") +- set (HDF5_DUMP_EXECUTABLE $) +- endif (HDF5_FOUND) +- set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) +- ++ endif() ++ + if (HDF5_FOUND) + set (HDF5_HAVE_H5PUBCONF_H 1) + set (HDF5_HAVE_HDF5 1) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 66b547ed1..4051f07d4 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -12,13 +12,14 @@ include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}) + if (CGNS_ENABLE_HDF5) + add_definitions(-DBUILD_HDF5) + if (WIN32) +- if (HDF5_LIBRARY) ++ add_definitions(-DWIN32) ++ if (HDF5_BUILD_SHARED_LIBS) + # file(STRINGS ${HDF5_LIBRARY} HDF5isDLL REGEX "__imp__H5close") + # if (HDF5isDLL) + # this is only needed when using hdf5 dll libs +- add_definitions(-DWIN32 -D_HDF5USEDLL_) ++ add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB) + # endif (HDF5isDLL) +- endif (HDF5_LIBRARY) ++ endif (HDF5_BUILD_SHARED_LIBS) + endif (WIN32) + if(HDF5_NEED_MPI AND MPI_INC) + include_directories(${MPI_INC}) diff --git a/ports/cgns/linux_lfs.patch b/ports/cgns/linux_lfs.patch new file mode 100644 index 000000000..3ccda64e2 --- /dev/null +++ b/ports/cgns/linux_lfs.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 46446da8a..a3d8cd98f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -82,6 +82,7 @@ if (CGNS_ENABLE_LFS) + else (WIN32) + check_symbol_exists(open64 "sys/types.h;sys/stat.h;unistd.h" HAVE_OPEN64) + check_symbol_exists(lseek64 "sys/types.h;unistd.h" HAVE_LSEEK64) ++ add_definitions(-D_FILE_OFFSET_BITS=64 -D__LARGEFILE64_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) + endif (WIN32) + if (HAVE_OPEN64) + add_definitions(-DHAVE_OPEN64) diff --git a/ports/cgns/portfile.cmake b/ports/cgns/portfile.cmake new file mode 100644 index 000000000..39b65d55f --- /dev/null +++ b/ports/cgns/portfile.cmake @@ -0,0 +1,88 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CGNS/CGNS + REF 3420e23febf0eb38c1b05af3c157d614d8476557 # v3.4.0 + SHA512 3fec1c32f1514cd9bc327f12f3f9db6a229df05f514193bd9e913d06b8ae6465664410a3c77a30b0c29f3e999e5efcb1ebed3a8b80e14be92035940c10b1d6d7 + HEAD_REF develop + PATCHES + hdf5.patch + linux_lfs.patch + zlib_szip_mpi.patch + defines.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + mpi HDF5_NEEDS_MPI + fortran CGNS_ENABLE_FORTRAN + tests CGNS_ENABLE_TESTS + hdf5 CGNS_ENABLE_HDF5 + lfs CGNS_ENABLE_LFS + legacy CGNS_ENABLE_LEGACY +) + +if(VCPKG_TARGET_ARCHITECTURE MATCHES "64") + list(APPEND CGNS_BUILD_OPTS "-DCGNS_ENABLE_64BIT=ON") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=ON;-DCGNS_USE_SHARED=ON") +else() + list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=OFF;-DCGNS_USE_SHARED=OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${FEATURE_OPTIONS} + ${CGNS_BUILD_OPTS} +) + +vcpkg_install_cmake() + +file(INSTALL ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/include/cgnsconfig.h) + +file(INSTALL ${CURRENT_PORT_DIR}/cgnsconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) # we patched the config and the include is all that is needed + +set(TOOLS cgnscheck cgnscompress cgnsconvert cgnsdiff cgnslist cgnsnames) + +foreach(tool ${TOOLS}) + set(suffix ${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + endif() +endforeach() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +IF(EXISTS ${CURRENT_PACKAGES_DIR}/debug) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/debug/include/cgnsconfig.h) +endif() + +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/include/cgnsconfig.h) +file(GLOB_RECURSE BATCH_FILES ${CURRENT_PACKAGES_DIR}/bin/*.bat) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# # Moves all .cmake files from /debug/share/cgns/ to /share/cgns/ +# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details +# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/cgns) + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# # Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME cgns) diff --git a/ports/cgns/zlib_szip_mpi.patch b/ports/cgns/zlib_szip_mpi.patch new file mode 100644 index 000000000..4f6608cf4 --- /dev/null +++ b/ports/cgns/zlib_szip_mpi.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 46446da8a..cd05cf51a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -219,20 +221,10 @@ if (CGNS_ENABLE_HDF5) + endif (HDF5_FOUND) + + set(HDF5_NEED_ZLIB "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?") +- if(HDF5_NEED_ZLIB) +- find_library(ZLIB_LIBRARY z) +- mark_as_advanced(CLEAR ZLIB_LIBRARY) +- else (HDF5_NEED_ZLIB) +- mark_as_advanced(FORCE ZLIB_LIBRARY) +- endif(HDF5_NEED_ZLIB) ++ set(HDF5_NEED_ZLIB ${HDF5_ENABLE_Z_LIB_SUPPORT} CACHE INTERNAL "" FORCE) + + set(HDF5_NEED_SZIP "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?") +- if (HDF5_NEED_SZIP) +- find_library(SZIP_LIBRARY szip) +- mark_as_advanced(CLEAR SZIP_LIBRARY) +- else (HDF5_NEED_SZIP) +- mark_as_advanced(FORCE SZIP_LIBRARY) +- endif (HDF5_NEED_SZIP) ++ set(HDF5_NEED_SZIP ${HDF5_ENABLE_SZIP_SUPPORT} CACHE INTERNAL "" FORCE) + + # Check if HDF5 version is 1.8 or greater + if (HDF5_VERSION VERSION_LESS "1.8.0") +@@ -240,6 +231,7 @@ if (CGNS_ENABLE_HDF5) + endif (HDF5_VERSION VERSION_LESS "1.8.0") + + set(HDF5_NEED_MPI "OFF" CACHE BOOL "Does the HDF5 library require linking to mpi? (Only true if using parallel HDF5)") ++ set(HDF5_NEED_MPI ${HDF5_ENABLE_PARALLEL} CACHE INTERNAL "" FORCE) + set(MPI_INC) + set(MPI_LIBS) + if (HDF5_NEED_MPI) diff --git a/ports/paraview/CONTROL b/ports/paraview/CONTROL new file mode 100644 index 000000000..e22b8f385 --- /dev/null +++ b/ports/paraview/CONTROL @@ -0,0 +1,25 @@ +Source: paraview +Version: 5.8.0 +Homepage: https://www.paraview.org/ +Description: VTK-based Data Analysis and Visualization Application +Build-Depends: vtk[core,paraview], protobuf, cgns, boost-core, boost-format, boost-algorithm + +Feature: vtkm +Description: enables vtkm for the build of paraview +Build-Depends: vtk[core,vtkm] + +Feature: python +Description: enables the build of python wrappers +Build-Depends: vtk[core,python] + +Feature: cuda +Description: enables cuda within paraview +Build-Depends: cuda, vtk[core, cuda] + +Feature: mpi +Description: enables cuda within paraview +Build-Depends: hdf5[core,parallel], vtk[core, mpi] + +Feature: all_modules +Description: enables the build of all paraview modules +Build-Depends: gdal, pdal, ffmpeg, laszip diff --git a/ports/paraview/VisIt_Build.patch b/ports/paraview/VisIt_Build.patch new file mode 100644 index 000000000..fb676a737 --- /dev/null +++ b/ports/paraview/VisIt_Build.patch @@ -0,0 +1,107 @@ +diff --git a/databases/readers/CEAucd/vtkCEAucdReader.C b/databases/readers/CEAucd/vtkCEAucdReader.C +index 0ad9a828a..cf37beb86 100644 +--- a/databases/readers/CEAucd/vtkCEAucdReader.C ++++ b/databases/readers/CEAucd/vtkCEAucdReader.C +@@ -172,7 +172,7 @@ const char *vtkCEAucdReader::GetByteOrderAsString() + } + } + +-void vtkCEAucdReader::SetFileStream( ifstream* istr ) ++void vtkCEAucdReader::SetFileStream( std::ifstream* istr ) + { + if( istr == this->FileStream ) return; + +@@ -311,9 +311,9 @@ int vtkCEAucdReader::RequestInformation( + { + vtkDebugMacro(<<"Open file "<FileName<<"\n"); + #ifdef _WIN32 +- this->FileStream = new ifstream(this->FileName, ios::in | ios::binary); ++ this->FileStream = new std::ifstream(this->FileName, std::ios::in | std::ios::binary); + #else +- this->FileStream = new ifstream(this->FileName, ios::in); ++ this->FileStream = new std::ifstream(this->FileName, std::ios::in); + #endif + } + +@@ -340,7 +340,7 @@ int vtkCEAucdReader::RequestInformation( + vtkDebugMacro(<<"Re-open file "<FileName<<" in ASCII mode"); + delete this->FileStream; // close file to reopen it later + this->FileStream = NULL; +- this->FileStream = new ifstream(this->FileName, ios::in); ++ this->FileStream = new std::ifstream(this->FileName, std::ios::in); + } + + char c='\0', buf[100]; +diff --git a/databases/readers/CEAucd/vtkCEAucdReader.h b/databases/readers/CEAucd/vtkCEAucdReader.h +index c3a86c16b..434556488 100644 +--- a/databases/readers/CEAucd/vtkCEAucdReader.h ++++ b/databases/readers/CEAucd/vtkCEAucdReader.h +@@ -49,7 +49,7 @@ class vtkCEAucdReader : public vtkUnstructuredGridAlgorithm + public: + static vtkCEAucdReader *New(); + vtkTypeMacro(vtkCEAucdReader,vtkUnstructuredGridAlgorithm); +- void PrintSelf(ostream& os, vtkIndent indent) override; ++ void PrintSelf(std::ostream& os, vtkIndent indent) override; + + // Description: + // Specify file name of CEA UCD datafile to read +@@ -120,7 +120,7 @@ class vtkCEAucdReader : public vtkUnstructuredGridAlgorithm + vtkSetStringMacro(ActivePointArray); + vtkGetStringMacro(ActivePointArray); + +- void SetFileStream( ifstream* istr ); ++ void SetFileStream( std::ifstream* istr ); + + // Description: + // The following methods allow selective reading of solutions fields. by +@@ -173,7 +173,7 @@ class vtkCEAucdReader : public vtkUnstructuredGridAlgorithm + vtkIdType * PointsInMaterial; + vtkIdType * CellIndexInMaterial; + +- ifstream *FileStream; ++ std::ifstream *FileStream; + long GlobalOffset; + long FileSize; + bool OwnStream; +diff --git a/databases/readers/Image/vtkStimulateReader.C b/databases/readers/Image/vtkStimulateReader.C +index be91dc91e..aeec88891 100644 +--- a/databases/readers/Image/vtkStimulateReader.C ++++ b/databases/readers/Image/vtkStimulateReader.C +@@ -104,7 +104,6 @@ int vtkStimulateReader::OpenFile(void) + // Close file from any previous image + if (this->File) + { +- this->File->close(); + delete this->File; + this->File = NULL; + } +@@ -122,9 +121,9 @@ int vtkStimulateReader::OpenFile(void) + if ( !FileFunctions::VisItStat( sdt_name, &fs) ) + { + #ifdef _WIN32 +- this->File = new ifstream(sdt_name, ios::in | ios::binary); ++ this->File = new std::ifstream(sdt_name, std::ios::in | std::ios::binary); + #else +- this->File = new ifstream(sdt_name, ios::in); ++ this->File = new std::ifstream(sdt_name, std::ios::in); + #endif + } + if (! this->File || this->File->fail()) +@@ -246,7 +245,7 @@ int vtkStimulateReader::CanReadFile(const char* fname) + return 0; + } + +- ifstream sdt_file(sdt_name); ++ std::ifstream sdt_file(sdt_name); + if (sdt_file.fail()) + { + vtkErrorMacro(<<"Cannot read file: invalid sdt_file " << sdt_name); +@@ -266,7 +265,7 @@ bool vtkStimulateReader::ReadSPRFile(const char *spr_name) + haveReadSPRFile = true; + validSPRFile = false; + +- ifstream spr_file(spr_name); ++ std::ifstream spr_file(spr_name); + if (spr_file.fail()) + { + vtkErrorMacro(<<"Unable to read SPR file " << spr_name << ": file " diff --git a/ports/paraview/cgns.patch b/ports/paraview/cgns.patch new file mode 100644 index 000000000..2ebb05e1b --- /dev/null +++ b/ports/paraview/cgns.patch @@ -0,0 +1,29 @@ +diff --git a/CMake/FindCGNS.cmake b/CMake/FindCGNS.cmake +index 005f1afd9..a45103a9f 100644 +--- a/CMake/FindCGNS.cmake ++++ b/CMake/FindCGNS.cmake +@@ -16,7 +16,7 @@ mark_as_advanced(CGNS_INCLUDE_DIR) + + find_library(CGNS_LIBRARY + NAMES +- cgns ++ cgnsdll cgns + DOC "CGNS library") + mark_as_advanced(CGNS_LIBRARY) + +@@ -45,4 +45,15 @@ if (CGNS_FOUND) + IMPORTED_LOCATION "${CGNS_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CGNS_INCLUDE_DIR}") + endif () ++ include(CMakeFindDependencyMacro) ++ find_dependency(hdf5 CONFIG) ++ if(TARGET hdf5::hdf5-shared) ++ set_property(TARGET CGNS::CGNS APPEND PROPERTY ++ INTERFACE_LINK_LIBRARIES "hdf5::hdf5-shared") ++ elseif(TARGET hdf5::hdf5-static) ++ set_property(TARGET CGNS::CGNS APPEND PROPERTY ++ INTERFACE_LINK_LIBRARIES "hdf5::hdf5-static") ++ else() ++ message(FATAL_ERROR "No HDF5 target to link cgns against") ++ endif() + endif () diff --git a/ports/paraview/paraview_build.patch b/ports/paraview/paraview_build.patch new file mode 100644 index 000000000..042bbe6b5 --- /dev/null +++ b/ports/paraview/paraview_build.patch @@ -0,0 +1,745 @@ +diff --git a/CMake/ParaViewClient.cmake b/CMake/ParaViewClient.cmake +index 7dadad937..dd271739d 100644 +--- a/CMake/ParaViewClient.cmake ++++ b/CMake/ParaViewClient.cmake +@@ -516,6 +516,7 @@ function (paraview_client_documentation) + NAMES xmlpatterns-qt5 xmlpatterns + HINTS "${Qt5_DIR}/../../../bin" + "${Qt5_DIR}/../../../libexec/qt5/bin" ++ "${Qt5_DIR}/../../../tools/qt5/bin" + DOC "Path to xmlpatterns") + mark_as_advanced(qt_xmlpatterns_executable) + +diff --git a/CMake/ParaViewOptions.cmake b/CMake/ParaViewOptions.cmake +index 5e402e9fc..ccb553e8f 100644 +--- a/CMake/ParaViewOptions.cmake ++++ b/CMake/ParaViewOptions.cmake +@@ -88,7 +88,7 @@ endif() + #======================================================================== + + # XXX(VTK): External VTK is not yet actually supported. +-if (FALSE) ++if (TRUE) + option(PARAVIEW_USE_EXTERNAL_VTK "Use an external VTK." OFF) + mark_as_advanced(PARAVIEW_USE_EXTERNAL_VTK) + else () +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d7e8f1dfe..8b0e7a8c6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -73,7 +73,9 @@ if (NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) + endif () + + set(paraview_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/CMake") +-set(vtk_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake") ++set(vtk_cmake_dir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/vtk") ++string(REPLACE "/debug" "" vtk_cmake_dir "${vtk_cmake_dir}") ++message(STATUS "vtk_cmake_dir:${vtk_cmake_dir}") + list(APPEND CMAKE_MODULE_PATH + "${paraview_cmake_dir}" + "${vtk_cmake_dir}") +@@ -214,6 +216,7 @@ if (NOT WIN32) + endif () + endif () + ++message(STATUS "PARAVIEW_USE_EXTERNAL_VTK:${PARAVIEW_USE_EXTERNAL_VTK}") + if (PARAVIEW_USE_EXTERNAL_VTK) + find_package(VTK REQUIRED) + else () +@@ -369,9 +372,73 @@ endif () + + if (PARAVIEW_USE_EXTERNAL_VTK) + if (paraview_required_modules OR paraview_unrecognized_modules) +- message(FATAL_ERROR +- "The following modules were requested or required, but not found: " +- "${paraview_required_modules};${paraview_unrecognized_modules}.") ++ message(STATUS "REQUIRED:${paraview_required_modules}") ++ foreach(mod ${paraview_required_modules}) ++ if(NOT TARGET ${mod}) ++ message(STATUS "REQUIRED TARGET not defined: ${mod}") ++ list(APPEND modules_notarget ${mod}) ++ endif() ++ if(${mod} MATCHES "VTK::") # For better debugging ++ message(STATUS "VTK TARGET found: ${mod}") ++ list(APPEND vtk_modules ${mod}) ++ endif() ++ endforeach() ++ foreach(mod ${paraview_unrecognized_modules}) ++ if(NOT TARGET ${mod}) ++ message(STATUS "UNREC TARGET not defined: ${mod}") ++ list(FIND paraview_rejected_modules ${mod} _found_mod) ++ if(_found_mod GREATER_EQUAL 0) ++ message(STATUS "MODULE ${mod} not necessary; Removing from unrecognized") ++ list(APPEND _to_remove ${mod}) ++ endif() ++ else() ++ list(APPEND _to_remove ${mod}) ++ #list(APPEND vtk_modules ${mod}) #probably do not need to add unrecognized_modules to the wrapper ++ endif() ++ endforeach() ++ message(STATUS "UNRECOGNIZED:${paraview_unrecognized_modules}") ++ list(REMOVE_ITEM paraview_unrecognized_modules ${_to_remove}) ++ message(STATUS "REJECTED MODULES: ${paraview_rejected_modules}") ++ message(STATUS "UNRECOGNIZED WITHOUT REJECTED AND KNOWN TARGETS: ${paraview_unrecognized_modules}") ++ message(STATUS "ALL PROVIDED MODULES: ${paraview_modules}") ++ set(_unnecessary_moduls ${paraview_modules}) ++ list(REMOVE_ITEM _unnecessary_moduls ${paraview_required_modules}) ++ message(STATUS "Unnecessary MODULES: ${_unnecessary_moduls}") ++ if(modules_notarget) ++ message(FATAL_ERROR ++ "The following modules were requested or required, but not found: " ++ "${modules_notarget}") ++ endif() ++ list(REMOVE_DUPLICATES vtk_modules) ++ macro(search_dependent_targets) ++ set(vtk_mod_dep_list) ++ foreach(vtk_targ ${ARGN}) ++ get_target_property(vtk_mod_dep ${vtk_targ} "INTERFACE_vtk_module_depends") ++ if(vtk_mod_dep) ++ list(APPEND vtk_mod_dep_list ${vtk_mod_dep}) ++ endif() ++ get_target_property(vtk_mod_pdep ${vtk_targ} "INTERFACE_vtk_module_private_depends") ++ if(vtk_mod_pdep) ++ list(APPEND vtk_mod_dep_list ${vtk_mod_pdep}) ++ endif() ++ get_target_property(vtk_mod_odep ${vtk_targ} "INTERFACE_vtk_module_opional_depends") ++ if(vtk_mod_odep) ++ list(APPEND vtk_mod_dep_list ${vtk_mod_odep}) ++ endif() ++ if(vtk_mod_dep_list) ++ message(STATUS "Target ${vtk_targ} depends on ${vtk_mod_dep_list}") ++ list(REMOVE_ITEM vtk_mod_dep_list ${vtk_modules}) ++ if(vtk_mod_dep_list) ++ message(STATUS "Newly discovered modules: ${vtk_mod_dep_list}") ++ list(APPEND vtk_modules ${vtk_mod_dep_list}) ++ search_dependent_targets(${vtk_mod_dep_list}) ++ else() ++ message(STATUS "No new modules discovered!") ++ endif() ++ endif() ++ endforeach() ++ endmacro() ++ search_dependent_targets(${vtk_modules}) + endif () + + if (PARAVIEW_USE_PYTHON) +@@ -498,7 +565,7 @@ else () + TEST_INPUT_DATA_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/VTK/Testing" + TEST_OUTPUT_DATA_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ExternalData/VTK/Testing") + +- if (NOT PARAVIEW_USE_EXTERNAL_VTK AND PARAVIEW_INSTALL_DEVELOPMENT_FILES) ++ if (PARAVIEW_INSTALL_DEVELOPMENT_FILES) + set(vtk_cmake_dir + "${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake") + set(vtk_cmake_destination +@@ -543,9 +610,11 @@ vtk_module_build( + TEST_OUTPUT_DATA_DIRECTORY "${paraview_test_data_directory_output}") + + include(vtkModuleJson) +-vtk_module_json( +- MODULES "${vtk_modules}" +- OUTPUT "vtk-modules.json") ++if(NOT PARAVIEW_USE_EXTERNAL_VTK) ++ vtk_module_json( ++ MODULES "${vtk_modules}" ++ OUTPUT "vtk-modules.json") ++endif() + vtk_module_json( + MODULES "${paraview_modules}" + OUTPUT "paraview-modules.json") +diff --git a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx +index be318d6d4..80187dd69 100644 +--- a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx ++++ b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx +@@ -1381,8 +1381,8 @@ int vtkAnalyzeReader::CanReadFile(const char* fname) + return false; + } + +- ifstream local_InputStream; +- local_InputStream.open(HeaderFileName.c_str(), ios::in | ios::binary); ++ std::ifstream local_InputStream; ++ local_InputStream.open(HeaderFileName.c_str(), std::ios::in | std::ios::binary); + if (local_InputStream.fail()) + { + return false; +diff --git a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx +index e7df3dacc..1bae5ae22 100644 +--- a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx ++++ b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx +@@ -1277,8 +1277,8 @@ int vtkNIfTIReader::CanReadFile(const char* fname) + return false; + } + +- ifstream local_InputStream; +- local_InputStream.open(HeaderFileName.c_str(), ios::in | ios::binary); ++ std::ifstream local_InputStream; ++ local_InputStream.open(HeaderFileName.c_str(), std::ios::in | std::ios::binary); + if (local_InputStream.fail()) + { + return false; +diff --git a/Qt/Components/pqCustomFilterManager.cxx b/Qt/Components/pqCustomFilterManager.cxx +index 4c6911ac8..b04828168 100644 +--- a/Qt/Components/pqCustomFilterManager.cxx ++++ b/Qt/Components/pqCustomFilterManager.cxx +@@ -214,7 +214,7 @@ void pqCustomFilterManager::exportSelected(const QStringList& files) + QStringList::ConstIterator jter = files.begin(); + for (; jter != files.end(); ++jter) + { +- ofstream os((*jter).toLocal8Bit().data(), ios::out); ++ std::ofstream os((*jter).toLocal8Bit().data(), std::ios::out); + root->PrintXML(os, vtkIndent()); + } + +diff --git a/Qt/Components/pqPresetDialog.cxx b/Qt/Components/pqPresetDialog.cxx +index 411480e3e..af0195763 100644 +--- a/Qt/Components/pqPresetDialog.cxx ++++ b/Qt/Components/pqPresetDialog.cxx +@@ -952,7 +952,7 @@ void pqPresetDialog::exportPresets() + } + assert(presetCollection.size() > 0); + +- ofstream outfs; ++ std::ofstream outfs; + outfs.open(filename.toStdString().c_str()); + if (!outfs.is_open()) + { +diff --git a/Qt/Core/pqCoreTestUtility.cxx b/Qt/Core/pqCoreTestUtility.cxx +index 95c7df5b6..00f61e2f8 100644 +--- a/Qt/Core/pqCoreTestUtility.cxx ++++ b/Qt/Core/pqCoreTestUtility.cxx +@@ -45,7 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "QtTestingConfigure.h" + + #include "QVTKOpenGLNativeWidget.h" +-#include "QVTKOpenGLWidget.h" ++#include "QVTKOpenGLStereoWidget.h" + #include "pqApplicationCore.h" + #include "pqCollaborationEventPlayer.h" + #include "pqColorButtonEventPlayer.h" +@@ -309,13 +309,13 @@ bool pqCoreTestUtility::CompareImage(QWidget* widget, const QString& referenceIm + } + + // try to recover the render window directly +- QVTKOpenGLWidget* glWidget = qobject_cast(widget); ++ QVTKOpenGLStereoWidget* glWidget = qobject_cast(widget); + if (glWidget) + { + vtkRenderWindow* rw = glWidget->renderWindow(); + if (rw) + { +- cout << "Using QVTKOpenGLWidget RenderWindow API for capture" << endl; ++ cout << "Using QVTKOpenGLStereoWidget RenderWindow API for capture" << endl; + return pqCoreTestUtility::CompareImage( + rw, referenceImage, threshold, std::cerr, tempDirectory, size); + } +diff --git a/Qt/Core/pqQVTKWidgetBase.h b/Qt/Core/pqQVTKWidgetBase.h +index 5f11871de..c6b7dbcbb 100644 +--- a/Qt/Core/pqQVTKWidgetBase.h ++++ b/Qt/Core/pqQVTKWidgetBase.h +@@ -43,8 +43,8 @@ using pqQVTKWidgetBase = QVTKOpenGLNativeWidget; + #define PARAVIEW_USING_QVTKOPENGLNATIVEWIDGET 1 + #define PARAVIEW_USING_QVTKOPENGLWIDGET 0 + #else +-#include "QVTKOpenGLWidget.h" +-using pqQVTKWidgetBase = QVTKOpenGLWidget; ++#include "QVTKOpenGLStereoWidget.h" ++using pqQVTKWidgetBase = QVTKOpenGLStereoWidget; + #define PARAVIEW_USING_QVTKOPENGLNATIVEWIDGET 0 + #define PARAVIEW_USING_QVTKOPENGLWIDGET 1 + #endif +diff --git a/Qt/Core/pqQVTKWidgetEventPlayer.cxx b/Qt/Core/pqQVTKWidgetEventPlayer.cxx +index 105796d8a..63c0bde5f 100644 +--- a/Qt/Core/pqQVTKWidgetEventPlayer.cxx ++++ b/Qt/Core/pqQVTKWidgetEventPlayer.cxx +@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + + #include "QVTKOpenGLNativeWidget.h" +-#include "QVTKOpenGLWidget.h" ++#include "QVTKOpenGLStereoWidget.h" + #include "QVTKOpenGLWindow.h" + #include "pqEventDispatcher.h" + +@@ -49,7 +49,7 @@ pqQVTKWidgetEventPlayer::pqQVTKWidgetEventPlayer(QObject* p) + bool pqQVTKWidgetEventPlayer::playEvent( + QObject* Object, const QString& Command, const QString& Arguments, bool& Error) + { +- QVTKOpenGLWidget* qvtkWidget = qobject_cast(Object); ++ QVTKOpenGLStereoWidget* qvtkWidget = qobject_cast(Object); + QVTKOpenGLNativeWidget* qvtkNativeWidget = qobject_cast(Object); + if (qvtkWidget || qvtkNativeWidget) + { +@@ -92,7 +92,7 @@ bool pqQVTKWidgetEventPlayer::playEvent( + + if (qvtkWidget != nullptr) + { +- // Due to QTBUG-61836 (see QVTKOpenGLWidget::testingEvent()), events should ++ // Due to QTBUG-61836 (see QVTKOpenGLStereoWidget::testingEvent()), events should + // be propagated back to the internal QVTKOpenGLWindow when being fired + // explicitly on the widget instance. We have to use a custom event + // callback in this case to ensure that events are passed to the window. +diff --git a/Qt/Core/pqQVTKWidgetEventTranslator.cxx b/Qt/Core/pqQVTKWidgetEventTranslator.cxx +index f79d5c4e5..77950a0d1 100644 +--- a/Qt/Core/pqQVTKWidgetEventTranslator.cxx ++++ b/Qt/Core/pqQVTKWidgetEventTranslator.cxx +@@ -44,7 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + + #include "QVTKOpenGLNativeWidget.h" +-#include "QVTKOpenGLWidget.h" ++#include "QVTKOpenGLStereoWidget.h" + #include "QVTKOpenGLWindow.h" + + pqQVTKWidgetEventTranslator::pqQVTKWidgetEventTranslator(QObject* p) +@@ -70,7 +70,7 @@ bool pqQVTKWidgetEventTranslator::translateEvent( + // Look for a render window in the possible widget types. + vtkRenderWindow* rw = nullptr; + +- if (QVTKOpenGLWidget* const qvtkWidget = qobject_cast(Object)) ++ if (QVTKOpenGLStereoWidget* const qvtkWidget = qobject_cast(Object)) + { + rw = qvtkWidget->embeddedOpenGLWindow() ? qvtkWidget->renderWindow() : nullptr; + } +diff --git a/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx b/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx +index 487b5ad60..c6c24d81d 100644 +--- a/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx ++++ b/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx +@@ -184,7 +184,7 @@ void vtkClientServerInterpreter::SetLogFile(const char* name) + // If a non-empty name was given, open a new log file. + if (name && name[0]) + { +- this->LogFileStream = new ofstream(name); ++ this->LogFileStream = new std::ofstream(name); + if (this->LogFileStream && *this->LogFileStream) + { + this->LogStream = this->LogFileStream; +diff --git a/Remoting/ClientServerStream/vtkClientServerInterpreter.h b/Remoting/ClientServerStream/vtkClientServerInterpreter.h +index 1eafb27f3..1371ef727 100644 +--- a/Remoting/ClientServerStream/vtkClientServerInterpreter.h ++++ b/Remoting/ClientServerStream/vtkClientServerInterpreter.h +@@ -195,8 +195,8 @@ protected: + ~vtkClientServerInterpreter() override; + + // A stream to which a log is written. +- ostream* LogStream; +- ofstream* LogFileStream; ++ std::ostream* LogStream; ++ std::ofstream* LogFileStream; + + // Internal message processing functions. + int ProcessCommandNew(const vtkClientServerStream& css, int midx); +diff --git a/Remoting/Core/vtkPVPluginLoader.cxx b/Remoting/Core/vtkPVPluginLoader.cxx +index 5b04b2f00..447d9d63a 100644 +--- a/Remoting/Core/vtkPVPluginLoader.cxx ++++ b/Remoting/Core/vtkPVPluginLoader.cxx +@@ -73,12 +73,12 @@ public: + vtkPVXMLOnlyPlugin* instance = new vtkPVXMLOnlyPlugin(); + instance->PluginName = vtksys::SystemTools::GetFilenameWithoutExtension(xmlfile); + +- ifstream is; +- is.open(xmlfile, ios::binary); ++ std::ifstream is; ++ is.open(xmlfile, std::ios::binary); + // get length of file: +- is.seekg(0, ios::end); ++ is.seekg(0, std::ios::end); + size_t length = is.tellg(); +- is.seekg(0, ios::beg); ++ is.seekg(0, std::ios::beg); + + // allocate memory: + char* buffer = new char[length + 1]; +diff --git a/Remoting/ServerManager/vtkPVSessionCore.cxx b/Remoting/ServerManager/vtkPVSessionCore.cxx +index 8d36fad37..6ff043967 100644 +--- a/Remoting/ServerManager/vtkPVSessionCore.cxx ++++ b/Remoting/ServerManager/vtkPVSessionCore.cxx +@@ -293,7 +293,7 @@ vtkPVSessionCore::vtkPVSessionCore() + { + filename << this->ParallelController->GetLocalProcessId(); + } +- this->LogStream = new ofstream(filename.str().c_str()); ++ this->LogStream = new std::ofstream(filename.str().c_str()); + LOG("Log for " << options->GetArgv0() << " (" << this->ParallelController->GetLocalProcessId() + << ")"); + } +diff --git a/Remoting/ServerManager/vtkSMSessionProxyManager.cxx b/Remoting/ServerManager/vtkSMSessionProxyManager.cxx +index 8525457e5..05bdfd723 100644 +--- a/Remoting/ServerManager/vtkSMSessionProxyManager.cxx ++++ b/Remoting/ServerManager/vtkSMSessionProxyManager.cxx +@@ -1261,7 +1261,7 @@ void vtkSMSessionProxyManager::LoadXMLState( + bool vtkSMSessionProxyManager::SaveXMLState(const char* filename) + { + vtkPVXMLElement* rootElement = this->SaveXMLState(); +- ofstream os(filename, ios::out); ++ std::ofstream os(filename, std::ios::out); + if (!os.is_open()) + { + return false; +diff --git a/Remoting/Views/vtkPVRenderView.cxx b/Remoting/Views/vtkPVRenderView.cxx +index de9c50ab3..d7f739192 100644 +--- a/Remoting/Views/vtkPVRenderView.cxx ++++ b/Remoting/Views/vtkPVRenderView.cxx +@@ -2514,11 +2514,11 @@ void vtkPVRenderView::UpdateSkybox() + this->CubeMap->SetInputTexture(vtkOpenGLTexture::SafeDownCast(texture)); + this->CubeMap->InterpolateOn(); + this->GetRenderer()->AddActor(this->Skybox); +- this->GetRenderer()->SetEnvironmentCubeMap(this->CubeMap, true); ++ this->GetRenderer()->SetEnvironmentTexture(this->CubeMap, true); + } + else + { +- this->GetRenderer()->SetEnvironmentCubeMap(nullptr); ++ this->GetRenderer()->SetEnvironmentTexture(nullptr); + } + } + +diff --git a/Remoting/Views/vtkSMTransferFunctionPresets.cxx b/Remoting/Views/vtkSMTransferFunctionPresets.cxx +index 1151ce58f..21e5a28b7 100644 +--- a/Remoting/Views/vtkSMTransferFunctionPresets.cxx ++++ b/Remoting/Views/vtkSMTransferFunctionPresets.cxx +@@ -142,7 +142,7 @@ public: + Json::CharReaderBuilder builder; + builder["collectComments"] = false; + Json::Value root; +- ifstream file; ++ std::ifstream file; + file.open(filename); + if (!file) + { +@@ -456,7 +456,7 @@ bool vtkSMTransferFunctionPresets::ImportPresets(const char* filename) + if (vtksys::SystemTools::LowerCase(vtksys::SystemTools::GetFilenameLastExtension(filename)) == + ".xml") + { +- ifstream in(filename); ++ std::ifstream in(filename); + if (in) + { + std::ostringstream contents; +diff --git a/Remoting/Views/vtkSMTransferFunctionProxy.cxx b/Remoting/Views/vtkSMTransferFunctionProxy.cxx +index efa8e9341..2023ca41b 100644 +--- a/Remoting/Views/vtkSMTransferFunctionProxy.cxx ++++ b/Remoting/Views/vtkSMTransferFunctionProxy.cxx +@@ -273,7 +273,7 @@ bool vtkSMTransferFunctionProxy::ExportTransferFunction( + + exportCollection.append(transferFunction); + +- ofstream outfs; ++ std::ofstream outfs; + outfs.open(filename); + if (!outfs.is_open()) + { +@@ -1370,7 +1370,7 @@ bool vtkSMTransferFunctionProxy::ConvertLegacyColorMapsToJSON( + return false; + } + +- ofstream file; ++ std::ofstream file; + file.open(outjsonfile); + if (file) + { +diff --git a/ThirdParty/protobuf/CMakeLists.txt b/ThirdParty/protobuf/CMakeLists.txt +index 0502ca2d9..25b2e778f 100644 +--- a/ThirdParty/protobuf/CMakeLists.txt ++++ b/ThirdParty/protobuf/CMakeLists.txt +@@ -42,7 +42,8 @@ vtk_module_third_party( + PACKAGE Protobuf + VERSION "3.4" + TARGETS protobuf::libprotobuf +- STANDARD_INCLUDE_DIRS) ++ STANDARD_INCLUDE_DIRS ++ CONFIG_MODE) + + if (VTK_MODULE_USE_EXTERNAL_ParaView_protobuf) + # promote protobuf::protoc to GLOBAL to allow to call protobuf_generate from other directories +diff --git a/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx b/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx +index 66a7d6972..9d314b8ce 100644 +--- a/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx ++++ b/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx +@@ -211,7 +211,7 @@ bool vtkFileSeriesHelper::ReadMetaFile(const char* metafilename) + } + + // Open the metafile. +- ifstream metafile(metafilename); ++ std::ifstream metafile(metafilename); + if (metafile.bad()) + { + // vtkErrorMacro("Failed to open meta-file: " << metafilename); +diff --git a/VTKExtensions/IOCore/vtkCSVWriter.cxx b/VTKExtensions/IOCore/vtkCSVWriter.cxx +index 11f777c1a..a1773600c 100644 +--- a/VTKExtensions/IOCore/vtkCSVWriter.cxx ++++ b/VTKExtensions/IOCore/vtkCSVWriter.cxx +@@ -97,7 +97,7 @@ namespace + //----------------------------------------------------------------------------- + template + void vtkCSVWriterGetDataString( +- iterT* iter, vtkIdType tupleIndex, ofstream& stream, vtkCSVWriter* writer, bool* first) ++ iterT* iter, vtkIdType tupleIndex, std::ofstream& stream, vtkCSVWriter* writer, bool* first) + { + int numComps = iter->GetNumberOfComponents(); + vtkIdType index = tupleIndex * numComps; +@@ -118,7 +118,7 @@ void vtkCSVWriterGetDataString( + //----------------------------------------------------------------------------- + template <> + void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtkIdType tupleIndex, +- ofstream& stream, vtkCSVWriter* writer, bool* first) ++ std::ofstream& stream, vtkCSVWriter* writer, bool* first) + { + int numComps = iter->GetNumberOfComponents(); + vtkIdType index = tupleIndex * numComps; +@@ -139,7 +139,7 @@ void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtk + //----------------------------------------------------------------------------- + template <> + void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtkIdType tupleIndex, +- ofstream& stream, vtkCSVWriter* writer, bool* first) ++ std::ofstream& stream, vtkCSVWriter* writer, bool* first) + { + int numComps = iter->GetNumberOfComponents(); + vtkIdType index = tupleIndex * numComps; +@@ -160,7 +160,7 @@ void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtkIdType t + //----------------------------------------------------------------------------- + template <> + void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtkIdType tupleIndex, +- ofstream& stream, vtkCSVWriter* writer, bool* first) ++ std::ofstream& stream, vtkCSVWriter* writer, bool* first) + { + int numComps = iter->GetNumberOfComponents(); + vtkIdType index = tupleIndex * numComps; +@@ -190,7 +190,7 @@ void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vt + + class vtkCSVWriter::CSVFile + { +- ofstream Stream; ++ std::ofstream Stream; + std::vector > ColumnInfo; + double Time = vtkMath::Nan(); + +diff --git a/VTKExtensions/IOCore/vtkFileSeriesReader.cxx b/VTKExtensions/IOCore/vtkFileSeriesReader.cxx +index f2448f2b8..7d84bc1ab 100644 +--- a/VTKExtensions/IOCore/vtkFileSeriesReader.cxx ++++ b/VTKExtensions/IOCore/vtkFileSeriesReader.cxx +@@ -783,7 +783,7 @@ int vtkFileSeriesReader::ReadMetaDataFile(const char* metafilename, vtkStringArr + std::vector& timeValues, int maxFilesToRead /*= VTK_INT_MAX*/) + { + // Open the metafile. +- ifstream metafile(metafilename); ++ std::ifstream metafile(metafilename); + if (metafile.bad()) + { + return 0; +diff --git a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx +index 8370e21e3..ff90a0421 100644 +--- a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx ++++ b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx +@@ -50,7 +50,6 @@ vtkPEnSightGoldBinaryReader::~vtkPEnSightGoldBinaryReader() + { + if (this->IFile) + { +- this->IFile->close(); + delete this->IFile; + this->IFile = NULL; + } +@@ -72,7 +71,6 @@ int vtkPEnSightGoldBinaryReader::OpenFile(const char* filename) + // Close file from any previous image + if (this->IFile) + { +- this->IFile->close(); + delete this->IFile; + this->IFile = NULL; + } +@@ -86,9 +84,9 @@ int vtkPEnSightGoldBinaryReader::OpenFile(const char* filename) + this->FileSize = (long)(fs.st_size); + + #ifdef _WIN32 +- this->IFile = new ifstream(filename, ios::in | ios::binary); ++ this->IFile = new std::ifstream(filename, std::ios::in | std::ios::binary); + #else +- this->IFile = new ifstream(filename, ios::in); ++ this->IFile = new std::ifstream(filename, std::ios::in); + #endif + } + else +diff --git a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h +index c5a5551d5..9c871e4a1 100644 +--- a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h ++++ b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h +@@ -204,7 +204,7 @@ protected: + int ElementIdsListed; + int Fortran; + +- ifstream* IFile; ++ std::ifstream* IFile; + // The size of the file could be used to choose byte order. + long FileSize; + +diff --git a/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx b/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx +index b433bc57a..b5cdc2672 100644 +--- a/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx ++++ b/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx +@@ -91,7 +91,7 @@ int vtkPEnSightGoldReader::ReadGeometryFile( + + // Opening the text file as binary. If not, the reader fails to read + // files with Unix line endings on Windows machines. +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -291,7 +291,7 @@ int vtkPEnSightGoldReader::ReadMeasuredGeometryFile( + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -455,7 +455,7 @@ int vtkPEnSightGoldReader::ReadScalarsPerNode(const char* fileName, const char* + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -675,7 +675,7 @@ int vtkPEnSightGoldReader::ReadVectorsPerNode(const char* fileName, const char* + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -854,7 +854,7 @@ int vtkPEnSightGoldReader::ReadTensorsPerNode(const char* fileName, const char* + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -980,7 +980,7 @@ int vtkPEnSightGoldReader::ReadScalarsPerElement(const char* fileName, const cha + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -1187,7 +1187,7 @@ int vtkPEnSightGoldReader::ReadVectorsPerElement(const char* fileName, const cha + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -1356,7 +1356,7 @@ int vtkPEnSightGoldReader::ReadTensorsPerElement(const char* fileName, const cha + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +diff --git a/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx b/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx +index 4f4840f5c..dd515e5ca 100644 +--- a/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx ++++ b/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx +@@ -1319,7 +1319,7 @@ int vtkPEnSightReader::ReadCaseFile() + sfilename = this->CaseFileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in); ++ this->IS = new std::ifstream(sfilename.c_str(), ios::in); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +diff --git a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx +index 5768eb32f..8bbc582ae 100644 +--- a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx ++++ b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx +@@ -429,7 +429,7 @@ int vtkPVEnSightMasterServerReader::ParseMasterServerFile() + } + + // Open the file for reading. +- ifstream fin(sfilename.c_str(), ios::in); ++ std::ifstream fin(sfilename.c_str(), std::ios::in); + if (!fin) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +diff --git a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx +index e7701d458..a358b9df0 100644 +--- a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx ++++ b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx +@@ -512,7 +512,7 @@ int vtkPVEnSightMasterServerReader2::ParseMasterServerFile() + } + + // Open the file for reading. +- ifstream fin(sfilename.c_str(), ios::in); ++ std::ifstream fin(sfilename.c_str(), std::ios::in); + if (!fin) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +diff --git a/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx b/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx +index 1af09a68e..4aba88655 100644 +--- a/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx ++++ b/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx +@@ -1289,7 +1289,7 @@ int vtkSpyPlotReader::MergeVectors(vtkDataSetAttributes* da, vtkDataArray* a1, v + //----------------------------------------------------------------------------- + int vtkSpyPlotReader::CanReadFile(const char* fname) + { +- ifstream ifs(fname, ios::binary | ios::in); ++ std::ifstream ifs(fname, std::ios::binary | std::ios::in); + if (!ifs) + { + return 0; +diff --git a/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx b/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx +index c7e1bac87..157768255 100644 +--- a/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx ++++ b/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx +@@ -83,7 +83,7 @@ bool vtkSpyPlotReaderMap::Initialize(const char* filename) + { + this->Clean(NULL); + +- ifstream ifs(filename); ++ std::ifstream ifs(filename); + if (!ifs) + { + vtkGenericWarningMacro("Error opening file " << filename); +@@ -238,7 +238,7 @@ bool vtkSpyPlotReaderMap::InitializeFromSpyFile(const char* filename) + bool vtkSpyPlotReaderMap::InitializeFromCaseFile(const char* filename) + { + // Setup the filemap and spcth structures +- ifstream ifs(filename); ++ std::ifstream ifs(filename); + if (!ifs) + { + vtkGenericWarningMacro("Error opening file " << filename); +diff --git a/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx b/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx +index 7dfe451c9..f4ea91928 100644 +--- a/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx ++++ b/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx +@@ -212,7 +212,7 @@ int vtkSpyPlotUniReader::MakeCurrent() + } + + std::vector arrayBuffer; +- ifstream ifs(this->FileName, ios::binary | ios::in); ++ std::ifstream ifs(this->FileName, std::ios::binary | std::ios::in); + vtkSpyPlotIStream spis; + spis.SetStream(&ifs); + int dump; +@@ -1358,7 +1358,7 @@ int vtkSpyPlotUniReader::ReadInformation() + vtkErrorMacro("FileName not specified"); + return 0; + } +- ifstream ifs(this->FileName, ios::binary | ios::in); ++ std::ifstream ifs(this->FileName, std::ios::binary | std::ios::in); + if (!ifs) + { + vtkErrorMacro("Cannot open file: " << this->FileName); diff --git a/ports/paraview/portfile.cmake b/ports/paraview/portfile.cmake new file mode 100644 index 000000000..97c6d7670 --- /dev/null +++ b/ports/paraview/portfile.cmake @@ -0,0 +1,173 @@ +set(VERSION 5.8) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "cuda" PARAVIEW_USE_CUDA #untested; probably only affects internal VTK build so it does nothing here + "all_modules" PARAVIEW_BUILD_ALL_MODULES #untested + "mpi" PARAVIEW_USE_MPI #untested + "vtkm" PARAVIEW_USE_VTKM + "python" PARAVIEW_USE_PYTHON +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Kitware/ParaView + REF 56631fdd9a31f4acdfe5fce2c3be3c4fb6e6800f # v5.8.0 + SHA512 1cdf4065428debc301c98422233524cdafc843495c54569b0854bf53f6ffeba1e83acf60497450779d493e56051557cd377902325d6ece89ad1b98ae6ba831be + HEAD_REF master + PATCHES + paraview_build.patch + remove_duplicates.patch # Missed something in the above patch + cgns.patch + qt_plugin.patch # Remove with Qt version > 5.14 + qt_static_plugins.patch # Remove with Qt version > 5.14 + python_include.patch + python_wrapper.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND VisItPatches removedoublesymbols.patch) +endif() + +#The following two dependencies should probably be their own port +#but require additional patching in paraview to make it work. + +#Get VisItBridge Plugin +vcpkg_from_gitlab( + OUT_SOURCE_PATH VISITIT_SOURCE_PATH + GITLAB_URL https://gitlab.kitware.com/ + REPO paraview/visitbridge + REF c2605b5c3115bc4869c76a0d8bfdd8939b59f283 + SHA512 6d2c1d6e1cd345547926938451755e7a8be5dabd89e18a2ceb419db16c5b29f354554a5130eb365b7e522d655370fd4766953813ff530c06e4851fe26104ce58 + PATCHES + VisIt_Build.patch + #removeunusedsymbols.patch # These also get remove in master of ParaView + ${VisItPatches} +) +#Get QtTesting Plugin +vcpkg_from_gitlab( + OUT_SOURCE_PATH QTTESTING_SOURCE_PATH + GITLAB_URL https://gitlab.kitware.com/ + REPO paraview/qttesting + REF f2429588feb839e0d8f9f3ee73bfa8a032a3f178 + SHA512 752b13ff79095a14faa2edc134a64497ff0426da3aa6b1a5951624816fb4f113a26fbe559cedf495ebb775d782c9a1851421a88dd299a79f27cbebb730ea227e +) + +file(COPY ${VISITIT_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/Utilities/VisItBridge) +file(COPY ${QTTESTING_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/ThirdParty/QtTesting/vtkqttesting) + +if("python" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + list(APPEND ADDITIONAL_OPTIONS + -DPython3_FIND_REGISTRY=NEVER + "-DPython3_EXECUTABLE:PATH=${PYTHON3}" # Required by more than one feature + ) + + #VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS ${FEATURE_OPTIONS} + -DPARAVIEW_BUILD_WITH_EXTERNAL:BOOL=ON + -DPARAVIEW_USE_EXTERNAL_VTK:BOOL=ON + -DPARAVIEW_ENABLE_VISITBRIDGE:BOOL=ON + -DVTK_MODULE_ENABLE_ParaView_qttesting=YES + -DPARAVIEW_ENABLE_EMBEDDED_DOCUMENTATION:BOOL=OFF + -DPARAVIEW_USE_QTHELP:BOOL=OFF + + #A little bit of help in finding the boost headers + "-DBoost_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include" + + # Workarounds for CMake issues + -DHAVE_SYS_TYPES_H=0 ## For some strange reason the test first succeeds and then fails the second time around + -DWORDS_BIGENDIAN=0 ## Tests fails in VisItCommon.cmake for some unknown reason this is just a workaround since most systems are little endian. + ${ADDITIONAL_OPTIONS} + + #-DPARAVIEW_ENABLE_FFMPEG:BOOL=OFF +) +if(CMAKE_HOST_UNIX) + # ParaView runs Qt tools so LD_LIBRARY_PATH must be set correctly for them to find *.so files + set(BACKUP_LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH}) + set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}:${CURRENT_INSTALLED_DIR}/lib") +endif() + +vcpkg_install_cmake(ADD_BIN_TO_PATH) # Bin to path required since paraview will use some self build tools + +if(CMAKE_HOST_UNIX) + set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}") +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/paraview-${VERSION}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +set(TOOLVER pv${VERSION}) +set(TOOLS paraview + pvbatch + pvdataserver + pvpython + pvrenderserver + pvserver + smTestDriver + vtkProcessXML + vtkWrapClientServer) + +foreach(tool ${TOOLS}) + # Remove debug tools + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}d${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + + # Move release tools + set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(INSTALL ${filename} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(INSTALL ${filename} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${filename}) + endif() +endforeach() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/paraview RENAME Copyright.txt) # Which one is the correct one? +file(INSTALL ${SOURCE_PATH}/License_v1.2.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/paraview RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + macro(move_bin_to_lib name) + if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${name}) + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${name}" "${CURRENT_PACKAGES_DIR}/lib/${name}") + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin/${name}) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/${name}" "${CURRENT_PACKAGES_DIR}/debug/lib/${name}") + endif() + endmacro() + + set(to_move Lib paraview-${VERSION} paraview-config) + foreach(name ${to_move}) + move_bin_to_lib(${name}) + endforeach() + + file(GLOB_RECURSE cmake_files ${CURRENT_PACKAGES_DIR}/share/${PORT}/*.cmake) + foreach(cmake_file ${cmake_files}) + file(READ "${cmake_file}" _contents) + STRING(REPLACE "bin/" "lib/" _contents "${_contents}") + file(WRITE "${cmake_file}" "${_contents}") + endforeach() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() \ No newline at end of file diff --git a/ports/paraview/python_include.patch b/ports/paraview/python_include.patch new file mode 100644 index 000000000..42ada661b --- /dev/null +++ b/ports/paraview/python_include.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/ParaViewOptions.cmake b/CMake/ParaViewOptions.cmake +index 0ecb928e9..5b5459a37 100644 +--- a/CMake/ParaViewOptions.cmake ++++ b/CMake/ParaViewOptions.cmake +@@ -136,7 +136,7 @@ option(PARAVIEW_ENABLE_RAYTRACING "Build ParaView with OSPray and/or OptiX ray-t + + set(paraview_web_default ON) + if (PARAVIEW_USE_PYTHON AND WIN32) +- include("${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake/FindPythonModules.cmake") ++ include(FindPythonModules) + find_python_module(win32api have_pywin32) + set(paraview_web_default "${have_pywin32}") + endif () diff --git a/ports/paraview/python_wrapper.patch b/ports/paraview/python_wrapper.patch new file mode 100644 index 000000000..33a70f069 --- /dev/null +++ b/ports/paraview/python_wrapper.patch @@ -0,0 +1,19 @@ +diff --git a/CMake/vtkModuleWrapClientServer.cmake b/CMake/vtkModuleWrapClientServer.cmake +index 3804a24e2..91fdd593a 100644 +--- a/CMake/vtkModuleWrapClientServer.cmake ++++ b/CMake/vtkModuleWrapClientServer.cmake +@@ -37,10 +37,13 @@ function (_vtk_module_wrap_client_server_sources module sources classes) + "$") + set(_vtk_client_server_genex_include_directories + "$") ++ set(_vtk_client_server_genex_interface_include_directories ++ "$") + file(GENERATE + OUTPUT "${_vtk_client_server_args_file}" + CONTENT "$<$:\n-D\'$\'>\n +-$<$:\n-I\'$\'>\n") ++ $<$:\n-I\'$\'>\n ++ $<$:\n-I\'$\'>\n") + + _vtk_module_get_module_property("${module}" + PROPERTY "hierarchy" diff --git a/ports/paraview/qt_plugin.patch b/ports/paraview/qt_plugin.patch new file mode 100644 index 000000000..2f4763c49 --- /dev/null +++ b/ports/paraview/qt_plugin.patch @@ -0,0 +1,50 @@ +diff --git a/Qt/Widgets/CMakeLists.txt b/Qt/Widgets/CMakeLists.txt +index 93000c493..5f2a06752 100644 +--- a/Qt/Widgets/CMakeLists.txt ++++ b/Qt/Widgets/CMakeLists.txt +@@ -139,17 +139,43 @@ set(CMAKE_AUTORCC 1) + set(CMAKE_AUTOUIC 1) + set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/Resources/UI") + ++## ++if(NOT PARAVIEW_BUILD_SHARED_LIBS) # Should be a check if Qt is built statically and not ParaView ++ list(APPEND qt_components Svg Sql) # added due to svg rescources, sql due to VTK::GUISupportQtSQL ++ set(qt_plugin_list) ++ foreach(qt_component ${qt_components}) ++ list(APPEND qt_plugin_list ${Qt5${qt_component}_PLUGINS}) ++ message(STATUS "QtPlugin List: ${qt_plugin_list}") ++ endforeach() ++ set(qt_plugin_source "${CMAKE_CURRENT_BINARY_DIR}/qt_static_plugins.cxx") ++ if(EXISTS "${qt_plugin_source}") ++ file(REMOVE "${qt_plugin_source}") ++ endif() ++ set(qt_source_text "#include \n") ++ set(qt_source_text "#ifdef QT_STATIC\n") ++ foreach(qt_plugin ${qt_plugin_list}) ++ STRING(REGEX REPLACE "[^:]+::" "" qt_plugin_name "${qt_plugin}") ++ message(STATUS "RAW PLUGIN NAME: ${qt_plugin_name}") ++ string(APPEND qt_source_text " Q_IMPORT_PLUGIN(${qt_plugin_name})\n") ++ endforeach() ++ string(APPEND qt_source_text "#endif\n") ++ file(WRITE "${qt_plugin_source}" "${qt_source_text}") ++endif() ++## ++ + vtk_module_add_module(ParaView::pqWidgets + CLASSES ${classes} + SOURCES ${ui_files} +- ${resource_files}) ++ ${resource_files} ++ ${qt_plugin_source}) + vtk_module_link(ParaView::pqWidgets + PUBLIC + Qt5::Core + Qt5::Gui + Qt5::Widgets + PRIVATE +- Qt5::Network) ++ Qt5::Network ++ ${qt_plugin_list}) + + if (APPLE) + vtk_module_link(ParaView::pqWidgets diff --git a/ports/paraview/qt_static_plugins.patch b/ports/paraview/qt_static_plugins.patch new file mode 100644 index 000000000..e95685e60 --- /dev/null +++ b/ports/paraview/qt_static_plugins.patch @@ -0,0 +1,77 @@ +diff --git a/CMake/ParaViewClient.cmake b/CMake/ParaViewClient.cmake +index 31beb7e20..d4bb36844 100644 +--- a/CMake/ParaViewClient.cmake ++++ b/CMake/ParaViewClient.cmake +@@ -263,7 +263,11 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n") + endif () + + include("${_ParaViewClient_cmake_dir}/paraview-find-package-helpers.cmake" OPTIONAL) +- find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets) ++ find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets Svg Network Sql DBus OpenGL OpenGLExtensions) ++ if(UNIX AND NOT APPLE) ++ find_package(Qt5 REQUIRED QUIET COMPONENTS X11Extras) ++ list(APPEND qt_additional_libs Qt5::X11Extras) ++ endif() + + # CMake 3.13 started using Qt5's version variables to detect what version + # of Qt's tools to run for autorcc. However, they are looked up using the +@@ -322,11 +322,36 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n") + FILES + ${_paraview_client_resource_files}) + endif () ++ ++ if(NOT PARAVIEW_BUILD_SHARED_LIBS) # Should be a check if Qt is built statically and not ParaView ++ list(APPEND qt_components Svg Widgets Gui OpenGL OpenGLExtensions) # added due to svg rescources, sql due to VTK::GUISupportQtSQL ++ set(qt_plugin_list) ++ foreach(qt_component ${qt_components}) ++ message(STATUS "Qt5${qt_component}_PLUGINS: ${Qt5${qt_component}_PLUGINS}") ++ list(APPEND qt_plugin_list ${Qt5${qt_component}_PLUGINS}) ++ message(STATUS "QtPlugin List: ${qt_plugin_list}") ++ endforeach() ++ set(qt_plugin_source "${CMAKE_CURRENT_BINARY_DIR}/qt_static_plugins.cxx") ++ if(EXISTS "${qt_plugin_source}") ++ file(REMOVE "${qt_plugin_source}") ++ endif() ++ set(qt_source_text "#include \n") ++ string(APPEND qt_source_text "#ifdef QT_STATIC\n") ++ foreach(qt_plugin ${qt_plugin_list}) ++ STRING(REGEX REPLACE "[^:]+::" "" qt_plugin_name "${qt_plugin}") ++ message(STATUS "RAW PLUGIN NAME: ${qt_plugin_name}") ++ string(APPEND qt_source_text " Q_IMPORT_PLUGIN(${qt_plugin_name})\n") ++ endforeach() ++ string(APPEND qt_source_text "#endif\n") ++ file(WRITE "${qt_plugin_source}" "${qt_source_text}") ++ endif() ++ + add_executable("${_paraview_client_NAME}" ${_paraview_client_executable_flags} + ${_paraview_client_SOURCES} + ${_paraview_client_resource_files} + ${_paraview_client_source_files} +- ${_paraview_client_extra_sources}) ++ ${_paraview_client_extra_sources} ++ ${qt_plugin_source}) + if (DEFINED _paraview_client_NAMESPACE) + add_executable("${_paraview_client_NAMESPACE}::${_paraview_client_NAME}" ALIAS "${_paraview_client_NAME}") + endif () +@@ -338,9 +362,20 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n") + "$") + target_link_libraries("${_paraview_client_NAME}" + PRIVATE ++ ${qt_plugin_list} ++ Qt5::Svg ## added ++ Qt5::Sql ## added ++ Qt5::Network ## added ++ Qt5::Gui ## added ++ Qt5::OpenGL ++ Qt5::OpenGLExtensions ++ Qt5::DBus ##added ++ ${qt_additional_libs} ++ Qt5::Core # needed in VCPKG due to the extra Wrapper + ParaView::pqApplicationComponents + Qt5::Widgets +- VTK::vtksys) ++ VTK::vtksys ++ ) + + set(_paraview_client_export) + if (DEFINED _paraview_client_EXPORT) diff --git a/ports/paraview/remove_duplicates.patch b/ports/paraview/remove_duplicates.patch new file mode 100644 index 000000000..4ea223e3f --- /dev/null +++ b/ports/paraview/remove_duplicates.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b7101666c..ebac50016 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -592,6 +592,9 @@ set(_paraview_add_tests_default_data_directory + set(_paraview_add_tests_default_test_data_target + "ParaViewData") + ++list(REMOVE_DUPLICATES vtk_modules) # Missed this somewhere ++list(REMOVE_DUPLICATES paraview_modules) # probably not needed ++ + vtk_module_build( + MODULES ${paraview_modules} + KITS ${paraview_kits} diff --git a/ports/paraview/removedoublesymbols.patch b/ports/paraview/removedoublesymbols.patch new file mode 100644 index 000000000..70df9b0e8 --- /dev/null +++ b/ports/paraview/removedoublesymbols.patch @@ -0,0 +1,89 @@ +diff --git a/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C b/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C +index db64a0534..0d987d8e7 100644 +--- a/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C ++++ b/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C +@@ -69,7 +69,10 @@ + // + // Forward declare some of types used to hash faces. + // +-class Quad; ++namespace hidden { ++ class Quad; ++} ++using hidden::Quad; + class QuadMemoryManager; + class Tri; + class TriMemoryManager; +@@ -322,43 +325,43 @@ class HashEntryList + // Creation: October 21, 2002 + // + // **************************************************************************** ++namespace hidden { ++ class Quad ++ { ++ friend class Tri; + +-class Quad +-{ +- friend class Tri; +- +- public: +- Quad() { ordering_case = 255; }; +- +- vtkIdType AssignNodes(const vtkIdType *); +- bool Equals(Quad *); +- bool Equals(Tri *); +- void AddInRemainingTriangle(Tri *, int); +- inline void ReRegisterMemory(void) +- { +- hashEntryList->qmm.ReRegisterQuad(this); +- } ++ public: ++ Quad() { ordering_case = 255; }; + +- inline void SetOriginalZone(const int &oz) { orig_zone = oz; }; +- inline int GetOriginalZone(void) { return orig_zone; }; ++ vtkIdType AssignNodes(const vtkIdType *); ++ bool Equals(Quad *); ++ bool Equals(Tri *); ++ void AddInRemainingTriangle(Tri *, int); ++ inline void ReRegisterMemory(void) ++ { ++ hashEntryList->qmm.ReRegisterQuad(this); ++ } + +- void OutputCell(int,vtkPolyData *, vtkCellData *, vtkCellData *); ++ inline void SetOriginalZone(const int &oz) { orig_zone = oz; }; ++ inline int GetOriginalZone(void) { return orig_zone; }; + +- inline void RegisterHashEntryList(HashEntryList *hel) +- { hashEntryList = hel; }; +- inline void SetNumberOfPoints(int np) { npts = np; }; ++ void OutputCell(int,vtkPolyData *, vtkCellData *, vtkCellData *); + +- protected: +- unsigned char ordering_case; +- vtkIdType nodes[3]; +- vtkIdType orig_zone; ++ inline void RegisterHashEntryList(HashEntryList *hel) ++ { hashEntryList = hel; }; ++ inline void SetNumberOfPoints(int np) { npts = np; }; + +- HashEntryList *hashEntryList; +- int npts; ++ protected: ++ unsigned char ordering_case; ++ vtkIdType nodes[3]; ++ vtkIdType orig_zone; + +- void AddInRemainingTriangle(int, int); +-}; ++ HashEntryList *hashEntryList; ++ int npts; + ++ void AddInRemainingTriangle(int, int); ++ }; ++} + // + // We will be re-ordering the nodes into numerical order. This enumerated + // type will allow the ordering to be preserved. diff --git a/ports/vtk/6890.diff b/ports/vtk/6890.diff new file mode 100644 index 000000000..632e5f366 --- /dev/null +++ b/ports/vtk/6890.diff @@ -0,0 +1,74 @@ +diff --git a/CMake/FindFreetype.cmake b/CMake/FindFreetype.cmake +index 41029f461330ab23e185ca91a4a8c093944b2d54..7b3b8026383e13b5c6387f176a191dd520da1ada 100644 +--- a/CMake/FindFreetype.cmake ++++ b/CMake/FindFreetype.cmake +@@ -174,17 +174,27 @@ mark_as_advanced( + if(Freetype_FOUND) + if(NOT TARGET Freetype::Freetype) + include(vtkDetectLibraryType) ++ set(freetype_library_type UNKNOWN) + if (FREETYPE_LIBRARY_RELEASE) +- set(_freetype_library_path "${FREETYPE_LIBRARY_RELEASE}") +- elseif (FREETYPE_LIBRARY_DEBUG) +- set(_freetype_library_path "${FREETYPE_LIBRARY_DEBUG}") +- else () +- set(_freetype_library_path "${FREETYPE_LIBRARY}") ++ vtk_detect_library_type(freetype_release_library_type ++ PATH "${FREETYPE_LIBRARY_RELEASE}") ++ endif () ++ if (FREETYPE_LIBRARY_DEBUG) ++ vtk_detect_library_type(freetype_debug_library_type ++ PATH "${FREETYPE_LIBRARY_DEBUG}") ++ endif () ++ if (freetype_release_library_type AND freetype_debug_library_type) ++ if (freetype_release_library_type STREQUAL freetype_debug_library_type) ++ set(freetype_library_type "${freetype_release_library_type}") ++ endif () ++ elseif (freetype_release_library_type) ++ set(freetype_library_type "${freetype_release_library_type}") ++ elseif (freetype_debug_library_type) ++ set(freetype_library_type "${freetype_debug_library_type}") + endif () +- vtk_detect_library_type(freetype_library_type +- PATH "${_freetype_library_path}") +- unset(_freetype_library_path) + add_library(Freetype::Freetype "${freetype_library_type}" IMPORTED) ++ unset(freetype_release_library_type) ++ unset(freetype_debug_library_type) + unset(freetype_library_type) + set_target_properties(Freetype::Freetype PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${FREETYPE_INCLUDE_DIRS}") +diff --git a/CMake/FindLibHaru.cmake b/CMake/FindLibHaru.cmake +index 7ef877a49307309232c932576f1641b9ae28564d..1f5b881facca745910c7d1223e6f737b157424d7 100644 +--- a/CMake/FindLibHaru.cmake ++++ b/CMake/FindLibHaru.cmake +@@ -45,9 +45,27 @@ if (LibHaru_FOUND) + + if (NOT TARGET LibHaru::LibHaru) + include(vtkDetectLibraryType) +- vtk_detect_library_type(libharu_library_type +- PATH "${LibHaru_LIBRARY}") ++ set(libharu_library_type UNKNOWN) ++ if (LibHaru_LIBRARY_RELEASE) ++ vtk_detect_library_type(libharu_release_library_type ++ PATH "${LibHaru_LIBRARY_RELEASE}") ++ endif () ++ if (LibHaru_LIBRARY_DEBUG) ++ vtk_detect_library_type(libharu_debug_library_type ++ PATH "${LibHaru_LIBRARY_DEBUG}") ++ endif () ++ if (libharu_release_library_type AND libharu_debug_library_type) ++ if (libharu_release_library_type STREQUAL libharu_debug_library_type) ++ set(libharu_library_type "${libharu_release_library_type}") ++ endif () ++ elseif (libharu_release_library_type) ++ set(libharu_library_type "${libharu_release_library_type}") ++ elseif (libharu_debug_library_type) ++ set(libharu_library_type "${libharu_debug_library_type}") ++ endif () + add_library(LibHaru::LibHaru "${libharu_library_type}" IMPORTED) ++ unset(libharu_release_library_type) ++ unset(libharu_debug_library_type) + unset(libharu_library_type) + set_target_properties(LibHaru::LibHaru PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LibHaru_INCLUDE_DIR}") diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 1a3d93815..412869822 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 9.0-2 +Version: 9.0-3 Description: Software system for 3D computer graphics, image processing, and visualization Homepage: https://github.com/Kitware/VTK Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5[core], libjpeg-turbo, proj4, lz4, liblzma, libtheora, eigen3, double-conversion, pugixml, libharu[notiffsymbols], sqlite3, netcdf-c, utfcpp, libogg, pegtl-2 diff --git a/ports/vtk/FindLZMA.patch b/ports/vtk/FindLZMA.patch index 8da36b06b..cb7f80963 100644 --- a/ports/vtk/FindLZMA.patch +++ b/ports/vtk/FindLZMA.patch @@ -70,7 +70,7 @@ index 0c8c7943c..d60669484 100644 + IMPORTED_IMPLIB_DEBUG "${LZMA_LIBRARY_DEBUG}") + endif() + -+ # Guard against possible stupidity of VTK reading only LOCATION without configuration ++ # Guard against possible stupidity of depending projects reading only LOCATION without configuration + if(CMAKE_BUILD_TYPE MATCHES "Debug") + set_target_properties(LZMA::LZMA PROPERTIES + IMPORTED_LOCATION "${LZMA_LIBRARY_DEBUG}" diff --git a/ports/vtk/FindLibHaru.patch b/ports/vtk/FindLibHaru.patch deleted file mode 100644 index 1b47a14b7..000000000 --- a/ports/vtk/FindLibHaru.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/CMake/FindLibHaru.cmake b/CMake/FindLibHaru.cmake -index 7ef877a49..2a18e0694 100644 ---- a/CMake/FindLibHaru.cmake -+++ b/CMake/FindLibHaru.cmake -@@ -43,6 +43,31 @@ if (LibHaru_FOUND) - set(LibHaru_INCLUDE_DIRS "${LibHaru_INCLUDE_DIR}") - set(LibHaru_LIBRARIES "${LibHaru_LIBRARY}") - -+ add_library(LibHaru::LibHaru UNKNOWN IMPORTED) -+ set_target_properties(LibHaru::LibHaru PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LibHaru_INCLUDE_DIR}") -+ if(LZMA_LIBRARY_RELEASE) -+ set_target_properties(LibHaru::LibHaru PROPERTIES -+ IMPORTED_LOCATION_RELEASE "${LibHaru_LIBRARY_RELEASE}" -+ IMPORTED_IMPLIB_RELEASE "${LibHaru_LIBRARY_RELEASE}") -+ endif() -+ if(LZMA_LIBRARY_DEBUG) -+ set_target_properties(LibHaru::LibHaru PROPERTIES -+ IMPORTED_LOCATION_DEBUG "${LibHaru_LIBRARY_DEBUG}" -+ IMPORTED_IMPLIB_DEBUG "${LibHaru_LIBRARY_DEBUG}") -+ endif() -+ -+ # Guard against possible stupidity of VTK reading only LOCATION without configuration -+ if(CMAKE_BUILD_TYPE MATCHES "Debug") -+ set_target_properties(LibHaru::LibHaru PROPERTIES -+ IMPORTED_LOCATION "${LibHaru_LIBRARY_DEBUG}" -+ IMPORTED_IMPLIB "${LibHaru_LIBRARY_DEBUG}") -+ else() -+ set_target_properties(LibHaru::LibHaru PROPERTIES -+ IMPORTED_LOCATION "${LibHaru_LIBRARY_RELEASE}" -+ IMPORTED_IMPLIB "${LibHaru_LIBRARY_RELEASE}") -+ endif() -+ - if (NOT TARGET LibHaru::LibHaru) - include(vtkDetectLibraryType) - vtk_detect_library_type(libharu_library_type - \ No newline at end of file diff --git a/ports/vtk/NoUndefDebug.patch b/ports/vtk/NoUndefDebug.patch index 3fc8f5de8..a7bb750e7 100644 --- a/ports/vtk/NoUndefDebug.patch +++ b/ports/vtk/NoUndefDebug.patch @@ -2,12 +2,12 @@ diff --git a/Utilities/Python/vtkPython.h b/Utilities/Python/vtkPython.h index 166f24104..79ae1d371 100644 --- a/Utilities/Python/vtkPython.h +++ b/Utilities/Python/vtkPython.h -@@ -50,7 +50,7 @@ - # include - # include - # include --# undef _DEBUG +@@ -53,7 +53,7 @@ + #include + #include + #include +-#undef _DEBUG + - # if defined(_MSC_VER) - # define _CRT_NOFORCE_MANIFEST 1 - # endif + #if defined(_MSC_VER) + #define _CRT_NOFORCE_MANIFEST 1 + #endif diff --git a/ports/vtk/SplitLibraryConfigurations.cmake b/ports/vtk/SplitLibraryConfigurations.cmake deleted file mode 100644 index fc4d87ec8..000000000 --- a/ports/vtk/SplitLibraryConfigurations.cmake +++ /dev/null @@ -1,28 +0,0 @@ - -cmake_minimum_required(VERSION 3.2.0) - -function(split_library_configurations LIBRARIES OPTIMIZED_OUT_VAR DEBUG_OUT_VAR GENERAL_OUT_VAR) - set(OPTIMIZED_LIBRARIES) - set(DEBUG_LIBRARIES) - set(GENERAL_LIBRARIES) - - set(CURRENT_TYPE) - foreach(LIBRARY ${LIBRARIES}) - if("${LIBRARY}" STREQUAL "optimized" OR "${LIBRARY}" STREQUAL "debug" OR "${LIBRARY}" STREQUAL "general") - set(CURRENT_TYPE "${LIBRARY}") - else() - if("${CURRENT_TYPE}" STREQUAL "optimized") - list(APPEND OPTIMIZED_LIBRARIES "${LIBRARY}") - elseif("${CURRENT_TYPE}" STREQUAL "debug") - list(APPEND DEBUG_LIBRARIES "${LIBRARY}") - else() - list(APPEND GENERAL_LIBRARIES "${LIBRARY}") - endif() - set(CURRENT_TYPE) - endif() - endforeach() - - set(${OPTIMIZED_OUT_VAR} "${OPTIMIZED_LIBRARIES}" PARENT_SCOPE) - set(${DEBUG_OUT_VAR} "${DEBUG_LIBRARIES}" PARENT_SCOPE) - set(${GENERAL_OUT_VAR} "${GENERAL_LIBRARIES}" PARENT_SCOPE) -endfunction() \ No newline at end of file diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 99d332e59..ecc9176ce 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -16,8 +16,13 @@ if("qt" IN_LIST FEATURES) -DVTK_MODULE_ENABLE_VTK_RenderingQt=YES -DVTK_MODULE_ENABLE_VTK_ViewsQt=YES ) -endif() +endif() +if("atlmfc" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_GUISupportMFC=YES + ) +endif() if("vtkm" IN_LIST FEATURES) list(APPEND ADDITIONAL_OPTIONS -DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKm=YES @@ -31,20 +36,9 @@ if("python" IN_LIST FEATURES) -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3 -DPython3_FIND_REGISTRY=NEVER - -DCMAKE_DISABLE_FIND_PACKAGE_Python3=TRUE "-DPython3_EXECUTABLE:PATH=${PYTHON3}" ) - if(VCPKG_TARGET_IS_WINDOWS) - list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY:PATH=${CURRENT_INSTALLED_DIR}/lib/python38.lib" - "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.8") - elseif(VCPKG_TARGET_IS_LINUX) - list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY:PATH=${CURRENT_INSTALLED_DIR}/lib/libpython38.a" - "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.8") - elseif(VCPKG_TARGET_IS_OSX) - #Need Python3 information on OSX within VCPKG - endif() - #VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages endif() @@ -62,6 +56,7 @@ if("paraview" IN_LIST FEATURES) -DVTK_MODULE_ENABLE_VTK_IOVPIC=YES -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2=YES -DVTK_MODULE_ENABLE_VTK_RenderingAnnotation=YES + -DVTK_MODULE_ENABLE_VTK_DomainsChemistryOpenGL2=YES ) if("python" IN_LIST FEATURES) list(APPEND ADDITIONAL_OPTIONS @@ -97,21 +92,22 @@ vcpkg_from_github( SHA512 50a324f55b58bc4415f972f711420e83b41a100b27729266db4541c24bc7d7bcd27d9158ce2588178b9b2e43c20b9695ffe382605f5cde331e8371e213655164 HEAD_REF master PATCHES - FindLibHaru.patch - FindLZMA.patch + 6890.diff # already merged upstream + FindLZMA.patch # Will be fixed in 9.1? FindLZ4.patch Findproj.patch vtkm.patch # To include an external VTKm build (v.1.5 required) pegtl.patch - ##pythonwrapper.patch # needs checking with paraview PR if still required - ##NoUndefDebug.patch # needs checking with paraview PR if still required + pythonwrapper.patch # Required by ParaView to Wrap required classes + NoUndefDebug.patch # Required to link against correct Python library depending on build type. + python_debug.patch # Last patch TODO: Patch out internal loguru ) # ============================================================================= #Overwrite outdated modules if they have not been patched: -file(COPY "${CURRENT_PORT_DIR}/FindPostgreSQL.cmake" DESTINATION "${SOURCE_PATH}/CMake") -file(COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake/patches/99") +file(COPY "${CURRENT_PORT_DIR}/FindPostgreSQL.cmake" DESTINATION "${SOURCE_PATH}/CMake") # will be backported from CMake in VTK in a future release +file(COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake/patches/99") # due to usage of targets in netcdf-c # ============================================================================= # ============================================================================= @@ -140,7 +136,6 @@ vcpkg_configure_cmake( # Select modules / groups to install -DVTK_USE_EXTERNAL:BOOL=ON -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF # Not yet in VCPKG - ${ADDITIONAL_OPTIONS} ) @@ -258,22 +253,31 @@ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/vtk") ## Files Modules needed by ParaView if("paraview" IN_LIST FEATURES) - set(VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType vtkSupportMacros vtkDirectories vtkVersion FindPythonModules) + set(VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType + vtkSupportMacros vtkDirectories vtkVersion FindPythonModules vtkModuleDebugging vtkExternalData) foreach(module ${VTK_CMAKE_NEEDED}) - file(INSTALL "${SOURCE_PATH}/CMake/${module}.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk) + file(INSTALL "${SOURCE_PATH}/CMake/${module}.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") endforeach() - file(INSTALL "${SOURCE_PATH}/CMake/vtkRequireLargeFilesSupport.cxx" DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk) + + ## Check List on UPDATE !! + file(INSTALL "${SOURCE_PATH}/CMake/vtkRequireLargeFilesSupport.cxx" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") + + file(INSTALL "${SOURCE_PATH}/GUISupport/Qt/QVTKOpenGLWidget.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # Legacy header - #ParaView requires some internal headers - file(INSTALL ${SOURCE_PATH}/Rendering/Annotation/vtkScalarBarActorInternal.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) - file(INSTALL ${SOURCE_PATH}/Filters/Statistics/vtkStatisticsAlgorithmPrivate.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) - file(INSTALL ${SOURCE_PATH}/Rendering/OpenGL2/vtkCompositePolyDataMapper2Internal.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Rendering/OpenGL2/vtkTextureObjectVS.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) + file(INSTALL "${SOURCE_PATH}/Common/Core/vtkRange.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK + file(INSTALL "${SOURCE_PATH}/Common/Core/vtkRangeIterableTraits.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK + file(INSTALL "${SOURCE_PATH}/Common/DataModel/vtkCompositeDataSetNodeReference.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK + #ParaView requires some internal headers + file(INSTALL "${SOURCE_PATH}/Rendering/Annotation/vtkScalarBarActorInternal.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") + file(INSTALL "${SOURCE_PATH}/Filters/Statistics/vtkStatisticsAlgorithmPrivate.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") + file(INSTALL "${SOURCE_PATH}/Rendering/OpenGL2/vtkCompositePolyDataMapper2Internal.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Rendering/OpenGL2/vtkTextureObjectVS.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/static_python) #python headers - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/static_python DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/vtkpythonmodules/static_python) #python headers + file(GLOB_RECURSE STATIC_PYTHON_FILES "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/*/static_python/*.h") + file(INSTALL ${STATIC_PYTHON_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) endif() endif() diff --git a/ports/vtk/python_debug.patch b/ports/vtk/python_debug.patch new file mode 100644 index 000000000..6b69d8094 --- /dev/null +++ b/ports/vtk/python_debug.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/patches/3.18/FindPython/Support.cmake b/CMake/patches/3.18/FindPython/Support.cmake +index 0879537ed..122e7228d 100644 +--- a/CMake/patches/3.18/FindPython/Support.cmake ++++ b/CMake/patches/3.18/FindPython/Support.cmake +@@ -2253,7 +2257,7 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS + NAMES ${_${_PYTHON_PREFIX}_LIB_NAMES_DEBUG} + NAMES_PER_DIR + HINTS "${_${_PYTHON_PREFIX}_PATH}" ${_${_PYTHON_PREFIX}_HINTS} +- NO_DEFAULT_PATH) ++ ) + endif() + + # retrieve runtime libraries diff --git a/ports/vtk/pythonwrapper.patch b/ports/vtk/pythonwrapper.patch index d7585cf0f..6cdd4162a 100644 --- a/ports/vtk/pythonwrapper.patch +++ b/ports/vtk/pythonwrapper.patch @@ -2,7 +2,8 @@ diff --git a/CMake/vtkModuleWrapPython.cmake b/CMake/vtkModuleWrapPython.cmake index 5d2c2e1bf..e33a16d68 100644 --- a/CMake/vtkModuleWrapPython.cmake +++ b/CMake/vtkModuleWrapPython.cmake -@@ -75,10 +75,13 @@ function (_vtk_module_wrap_python_sources module sources classes) +@@ -152,11 +152,14 @@ function (_vtk_module_wrap_python_sources module sources classes) + set(_vtk_python_genex_compile_definitions "$") set(_vtk_python_genex_include_directories "$") @@ -11,9 +12,8 @@ index 5d2c2e1bf..e33a16d68 100644 file(GENERATE OUTPUT "${_vtk_python_args_file}" CONTENT "$<$:\n-D\'$\'>\n --$<$:\n-I\'$\'>\n") -+$<$:\n-I\'$\'>\n -+$<$:\n-I\'$\'>\n") + $<$:\n-I\'$\'>\n ++$<$:\n-I\'$\'>\n + $<$:\n--types \'$\'>\n") - _vtk_module_get_module_property("${module}" - PROPERTY "hierarchy" + set(_vtk_python_sources) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 713cc20bb..ca4e2a26f 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1385,6 +1385,8 @@ pangomm:x64-osx=fail pangomm:x64-windows=ignore pangomm:x86-windows=ignore pangomm:arm64-windows=fail +# Missing symbols will, probably fix itself with Qt >= 5.15 +paraview:x64-osx=fail parmetis:x64-linux=fail parmetis:x64-osx=fail pcre2:arm-uwp=fail