@@ -72,6 +72,8 @@ class Vtk(CMakePackage):
7272 # We cannot build with both osmesa and qt in spack
7373 conflicts ("+osmesa" , when = "+qt" )
7474
75+ conflicts ("%gcc@13" , when = "@9.2" )
76+
7577 with when ("+python" ):
7678 # Depend on any Python, add bounds below.
7779 extends ("python@2.7:" , type = ("build" , "run" ))
@@ -165,8 +167,20 @@ class Vtk(CMakePackage):
165167 depends_on ("proj@4:7" , when = "@9:" )
166168 depends_on ("cgns@4.1.1:+mpi" , when = "@9.1: +mpi" )
167169 depends_on ("cgns@4.1.1:~mpi" , when = "@9.1: ~mpi" )
168- depends_on ("seacas@2021-05-12:+mpi" , when = "@9.1: +mpi" )
169- depends_on ("seacas@2021-05-12:~mpi" , when = "@9.1: ~mpi" )
170+ with when ("@9.1:" ):
171+ depends_on ("seacas+mpi" , when = "+mpi" )
172+ depends_on ("seacas~mpi" , when = "~mpi" )
173+ depends_on ("seacas@2021-05-12:" )
174+
175+ # seacas@2023-05-30 does not provide needed SEACASIoss_INCLUDE_DIRS:
176+ # CMake Error at CMake/vtkModule.cmake:5552 (message):
177+ # The variable `SEACASIoss_INCLUDE_DIRS` was expected to have been available,
178+ # but was not defined:
179+ conflicts ("seacas@2023-05-30" , when = "@:9.2" )
180+
181+ # vtk@9.2: need Ioss::Utils::get_debug_stream() which only 2022-10-14 provides,
182+ # and to be safe against other issues, make them build with this version only:
183+ depends_on ("seacas@2022-10-14" , when = "@9.2:" )
170184 depends_on ("nlohmann-json" , when = "@9.2:" )
171185
172186 # For finding Fujitsu-MPI wrapper commands
@@ -186,6 +200,13 @@ class Vtk(CMakePackage):
186200 when = "@9.1" ,
187201 )
188202
203+ @when ("@9.2:" )
204+ def patch (self ):
205+ # provide definition for Ioss::Init::Initializer::Initializer(),
206+ # required on macOS, as "-undefined error" is the default,
207+ # but not on Linux, as undefined symbols are tolerated
208+ filter_file ("TARGETS Ioss" , "TARGETS Ioss Ionit" , "ThirdParty/ioss/CMakeLists.txt" )
209+
189210 def url_for_version (self , version ):
190211 url = "http://www.vtk.org/files/release/{0}/VTK-{1}.tar.gz"
191212 return url .format (version .up_to (2 ), version )
0 commit comments