diff --git a/CMakeLists.txt b/CMakeLists.txt index 588800b3..93b3c743 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1120,8 +1120,7 @@ endif() ################################ if( ENABLE_VTK ) set( VTK_DIR "${CMAKE_INSTALL_PREFIX}/vtk" ) - set( VTK_URL "${TPL_MIRROR_DIR}/VTK-9.4.2.tar.gz" ) - + set( VTK_URL "${TPL_MIRROR_DIR}/VTK-v9.6.0.tar.gz" ) message( STATUS "Building VTK found at ${VTK_URL}" ) # Depending on the platform, the install directory could be 'lib' or 'lib64'. diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index 3bcac0cb..90a4689d 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -157,7 +157,7 @@ class Geosx(CMakePackage, CudaPackage, ROCmPackage): depends_on('pugixml@1.13 ~shared') depends_on('fmt@10.0.0 cxxstd=14') - depends_on('vtk@9.4.2', when='+vtk') + depends_on('vtk@9.6.0', when='+vtk') # # Math diff --git a/scripts/spack_packages/packages/vtk/9.6.0-patch/vtkCellGridReader.cxx.patch b/scripts/spack_packages/packages/vtk/9.6.0-patch/vtkCellGridReader.cxx.patch new file mode 100644 index 00000000..600acf61 --- /dev/null +++ b/scripts/spack_packages/packages/vtk/9.6.0-patch/vtkCellGridReader.cxx.patch @@ -0,0 +1,14 @@ +--- a/IO/CellGrid/vtkCellGridReader.cxx 2025-03-27 23:59:55 ++++ b/IO/CellGrid/vtkCellGridReader.cxx 2025-04-15 13:17:03 +@@ -419,7 +419,10 @@ + // The final "false" below allows the data to not be fully consumed, + // which may happen if sizeof(istream::char_type) > 1. In the future, + // it may also happen that a file contains multiple JSON streams. +- jj = nlohmann::json::from_msgpack(data.begin(), data.end(), false); ++ ++ char const * const begin = reinterpret_cast(data.data()); ++ char const * const end = begin + data.size(); ++ jj = nlohmann::json::from_msgpack(begin, end, false); + } + catch (...) + { diff --git a/scripts/spack_packages/packages/vtk/9.6.0-patch/vtkLegacyCellGridReader.cxx.patch b/scripts/spack_packages/packages/vtk/9.6.0-patch/vtkLegacyCellGridReader.cxx.patch new file mode 100644 index 00000000..3ce4667c --- /dev/null +++ b/scripts/spack_packages/packages/vtk/9.6.0-patch/vtkLegacyCellGridReader.cxx.patch @@ -0,0 +1,14 @@ +--- a/IO/Legacy/vtkLegacyCellGridReader.cxx 2025-03-27 23:59:55 ++++ b/IO/Legacy/vtkLegacyCellGridReader.cxx 2025-04-15 13:28:24 +@@ -116,7 +116,10 @@ + // The final argument (false) indicates that the decoder should allow + // partial consumption of raw.data() (meaning the trailing newline will + // not cause an exception): +- jdata = nlohmann::json::from_msgpack(raw.data(), raw.data() + contentLength, false); ++ ++ char const * const begin = reinterpret_cast(raw.data()); ++ char const * const end = begin + contentLength; ++ jdata = nlohmann::json::from_msgpack(begin, end, false); + } + catch (nlohmann::json::exception& e) + { diff --git a/scripts/spack_packages/packages/vtk/package.py b/scripts/spack_packages/packages/vtk/package.py index c75d6cfe..d5cf2ea3 100644 --- a/scripts/spack_packages/packages/vtk/package.py +++ b/scripts/spack_packages/packages/vtk/package.py @@ -15,12 +15,14 @@ class Vtk(CMakePackage): processing and visualization. """ homepage = "http://www.vtk.org" - url = "https://www.vtk.org/files/release/9.4/VTK-9.4.2.tar.gz" + #url = "https://www.vtk.org/files/release/9.4/VTK-9.4.2.tar.gz" + git = "https://gitlab.kitware.com/vtk/vtk.git" list_url = "http://www.vtk.org/download/" maintainers = ['chuckatkins', 'danlipsa'] - version("9.4.2", sha256="36c98e0da96bb12a30fe53708097aa9492e7b66d5c3b366e1c8dc251e2856a02", preferred=True) + version("9.6.0", tag="v9.6.0", branch="master", get_full_repo=True) + version("9.4.2", sha256="36c98e0da96bb12a30fe53708097aa9492e7b66d5c3b366e1c8dc251e2856a02") version("9.3.1", sha256="8354ec084ea0d2dc3d23dbe4243823c4bfc270382d0ce8d658939fd50061cab8") version("9.2.6", sha256="06fc8d49c4e56f498c40fcb38a563ed8d4ec31358d0101e8988f0bb4d539dd12") version('9.1.0', sha256='8fed42f4f8f1eb8083107b68eaa9ad71da07110161a3116ad807f43e5ca5ce96') @@ -57,12 +59,12 @@ class Vtk(CMakePackage): depends_on('mpi', when='+mpi') - patch_dir = os.path.join(os.path.dirname(__file__), '9.4.2-patch') + patch_dir = os.path.join(os.path.dirname(__file__), '9.6.0-patch') if os.path.isdir(patch_dir): for fname in sorted(os.listdir(patch_dir)): full_path = os.path.join(patch_dir, fname) if fname.endswith('.patch') and os.path.isfile(full_path): - patch(os.path.join('9.4.2-patch', fname), when='@9.4.2') + patch(os.path.join('9.6.0-patch', fname), when='@9.6.0') def cmake_args(self): spec = self.spec diff --git a/tplMirror/VTK-9.4.2.tar.gz b/tplMirror/VTK-9.4.2.tar.gz deleted file mode 100644 index 4a9c9cc5..00000000 --- a/tplMirror/VTK-9.4.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:36c98e0da96bb12a30fe53708097aa9492e7b66d5c3b366e1c8dc251e2856a02 -size 118621433 diff --git a/tplMirror/vtk-v9.6.0.tar.gz b/tplMirror/vtk-v9.6.0.tar.gz new file mode 100644 index 00000000..4323c209 --- /dev/null +++ b/tplMirror/vtk-v9.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b48dd64a6c474d3d9425dcb549bff277753a9a56a3d08231e42598ce8e79521a +size 54146584