vtk: fix 9.4.1 concretization (#48946)

* seacas: conflict 2024-06-27 with windows

* vtk: fix 9.4.1 seacas dependency
This commit is contained in:
Vicente Bolea 2025-02-14 17:14:04 -05:00 committed by GitHub
parent ccd205bfeb
commit 9213bf5919
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 31 additions and 12 deletions

View File

@ -295,6 +295,9 @@ class Seacas(CMakePackage):
)
conflicts("+shared", when="platform=windows")
conflicts("+x11", when="platform=windows")
conflicts("@2024-06-27 platform=windows")
# Remove use of variable in array assignment (triggers c2057 on MSVC)
# See https://github.com/sandialabs/seacas/issues/438
patch(

View File

@ -201,22 +201,17 @@ class Vtk(CMakePackage):
depends_on("proj@8:", when="@9.2:")
depends_on("cgns@4.1.1:+mpi", when="@9.1: +mpi")
depends_on("cgns@4.1.1:~mpi", when="@9.1: ~mpi")
# VTK introduced Seacas IOSS dependency on 9.1
with when("@9.1:"):
depends_on("seacas+mpi", when="+mpi")
depends_on("seacas~mpi", when="~mpi")
depends_on("seacas@2021-05-12:")
with when("@9.4:"):
depends_on("seacas@2024-06-27:")
depends_on("seacas@2021-05-12:2022-10-14", when="@9.1")
# vtk@9.2: need Ioss::Utils::get_debug_stream() which only 2022-10-14 provides,
# and to be safe against other issues, make them build with this version only:
depends_on("seacas@2022-10-14", when="@9.2:9.3")
depends_on("seacas@2024-06-27", when="@9.4:")
# seacas@2023-05-30 does not provide needed SEACASIoss_INCLUDE_DIRS:
# CMake Error at CMake/vtkModule.cmake:5552 (message):
# The variable `SEACASIoss_INCLUDE_DIRS` was expected to have been available,
# but was not defined:
conflicts("seacas@2023-05-30", when="@:9.2")
# vtk@9.2: need Ioss::Utils::get_debug_stream() which only 2022-10-14 provides,
# and to be safe against other issues, make them build with this version only:
depends_on("seacas@2022-10-14", when="@9.2:")
depends_on("nlohmann-json", when="@9.2:")
# For finding Fujitsu-MPI wrapper commands
@ -244,6 +239,27 @@ class Vtk(CMakePackage):
when="@9.1:9.2 %gcc@13:",
)
# SEACAS >= 2024-06-27 needs c++17 which is already required in VTK master.
patch(
"https://gitlab.kitware.com/vtk/vtk/-/commit/00afe3ae0def6c2d0a6f7cb497c8d55874127820.diff",
sha256="1e5fb55b14ba6455a1891d27aa4a0506f47e3155014af06f97633ae1ef6e9cc2",
when="@9.4:",
)
# Needed to build VTK with external SEACAS.
patch(
"https://gitlab.kitware.com/vtk/vtk/-/commit/e98526813691e527fff7d5df6a1641ae36c0cf4f.diff",
sha256="174930dde06828ead84c68b1a192202766f6297a60f0c54eef6cab2605a466ef",
when="@9.4:",
)
# Needed to build VTK with external SEACAS >= 2022-10-14
@when("@9.4:")
def patch(self):
filter_file(
"^.*USE_VARIABLES SEACASIoss_INCLUDE_DIRS.*$", "", "ThirdParty/ioss/CMakeLists.txt"
)
@when("@9.2:")
def patch(self):
# provide definition for Ioss::Init::Initializer::Initializer(),