From 38dc3a6896f64b894adead3446e8f822f878860b Mon Sep 17 00:00:00 2001 From: Martin Aumüller Date: Tue, 26 Sep 2023 21:48:44 +0200 Subject: vtk: @9.2 need seacas@2022-10-14, fix macos (#39896) Co-authored-by: Bernhard Kaindl --- var/spack/repos/builtin/packages/vtk/package.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 27b757c2c3..122e29408e 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -72,6 +72,8 @@ class Vtk(CMakePackage): # We cannot build with both osmesa and qt in spack conflicts("+osmesa", when="+qt") + conflicts("%gcc@13", when="@9.2") + with when("+python"): # Depend on any Python, add bounds below. extends("python@2.7:", type=("build", "run")) @@ -165,8 +167,20 @@ class Vtk(CMakePackage): depends_on("proj@4:7", when="@9:") depends_on("cgns@4.1.1:+mpi", when="@9.1: +mpi") depends_on("cgns@4.1.1:~mpi", when="@9.1: ~mpi") - depends_on("seacas@2021-05-12:+mpi", when="@9.1: +mpi") - depends_on("seacas@2021-05-12:~mpi", when="@9.1: ~mpi") + with when("@9.1:"): + depends_on("seacas+mpi", when="+mpi") + depends_on("seacas~mpi", when="~mpi") + depends_on("seacas@2021-05-12:") + + # 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 @@ -186,6 +200,13 @@ class Vtk(CMakePackage): when="@9.1", ) + @when("@9.2:") + def patch(self): + # provide definition for Ioss::Init::Initializer::Initializer(), + # required on macOS, as "-undefined error" is the default, + # but not on Linux, as undefined symbols are tolerated + filter_file("TARGETS Ioss", "TARGETS Ioss Ionit", "ThirdParty/ioss/CMakeLists.txt") + def url_for_version(self, version): url = "http://www.vtk.org/files/release/{0}/VTK-{1}.tar.gz" return url.format(version.up_to(2), version) -- cgit v1.2.3-70-g09d2