diff options
author | John W. Parent <45471568+johnwparent@users.noreply.github.com> | 2024-08-22 12:48:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-22 09:48:13 -0700 |
commit | f19b65723528e4385b52b1e01680ac991622161a (patch) | |
tree | e75851876a264996652afaa6c9c4a30162dc72c9 | |
parent | 8e1bd9a40375196972a03530c01be1302693cb2b (diff) | |
download | spack-f19b65723528e4385b52b1e01680ac991622161a.tar.gz spack-f19b65723528e4385b52b1e01680ac991622161a.tar.bz2 spack-f19b65723528e4385b52b1e01680ac991622161a.tar.xz spack-f19b65723528e4385b52b1e01680ac991622161a.zip |
VTK package: patch to fix NetCDFC - HDF5 interface (#43087)
Patch from Windows is also needed on Linux
-rw-r--r-- | var/spack/repos/builtin/packages/netcdf-c/package.py | 7 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/vtk/package.py | 13 |
2 files changed, 13 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py index c046cc38b9..986fbfe749 100644 --- a/var/spack/repos/builtin/packages/netcdf-c/package.py +++ b/var/spack/repos/builtin/packages/netcdf-c/package.py @@ -66,7 +66,7 @@ class NetcdfC(CMakePackage, AutotoolsPackage): # no upstream PR (or set of PRs) covering all changes in this path. # When #2595 lands, this patch should be updated to include only # the changes not incorporated into that PR - patch("netcdfc_correct_and_export_link_interface.patch", when="platform=windows") + patch("netcdfc_correct_and_export_link_interface.patch") # Some of the patches touch configure.ac and, therefore, require forcing the autoreconf stage: _force_autoreconf_when = [] @@ -359,7 +359,7 @@ class CMakeBuilder(BaseBuilder, cmake.CMakeBuilder): @run_after("install") def patch_hdf5_pkgconfigcmake(self): """ - Incorrect hdf5 library names are put in the package config and config.cmake files + Incorrect hdf5 library names are put in the package config files due to incorrectly using hdf5 target names https://github.com/spack/spack/pull/42878 """ @@ -367,11 +367,10 @@ class CMakeBuilder(BaseBuilder, cmake.CMakeBuilder): return pkgconfig_file = find(self.prefix, "netcdf.pc", recursive=True) - cmakeconfig_file = find(self.prefix, "netCDFTargets.cmake", recursive=True) ncconfig_file = find(self.prefix, "nc-config", recursive=True) settingsconfig_file = find(self.prefix, "libnetcdf.settings", recursive=True) - files = pkgconfig_file + cmakeconfig_file + ncconfig_file + settingsconfig_file + files = pkgconfig_file + ncconfig_file + settingsconfig_file config = "shared" if self.spec.satisfies("+shared") else "static" filter_file(f"hdf5-{config}", "hdf5", *files, ignore_absent=True) filter_file(f"hdf5_hl-{config}", "hdf5_hl", *files, ignore_absent=True) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index ff2eb0ca50..d141c6c83f 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -20,7 +20,7 @@ class Vtk(CMakePackage): url = "https://www.vtk.org/files/release/9.0/VTK-9.0.0.tar.gz" list_url = "https://www.vtk.org/download/" - maintainers("danlipsa", "vicentebolea") + maintainers("chuckatkins", "danlipsa", "johnwparent") license("BSD-3-Clause") @@ -131,10 +131,17 @@ class Vtk(CMakePackage): patch("vtk_movie_link_ogg.patch", when="@8.2") patch("vtk_use_sqlite_name_vtk_expects.patch", when="@8.2") patch("vtk_proj_include_no_strict.patch", when="@9: platform=windows") + # allow proj to be detected via a CMake produced export config file + # failing that, falls back on standard library detection + # required for VTK to build against modern proj/more robustly + patch("vtk_findproj_config.patch", when="@9:") + # adds a fake target alias'ing the hdf5 target to prevent + # checks for that target from falling on VTK's empty stub target + # Required to consume netcdf and hdf5 both built + # with CMake from VTK # a patch with the same name is also applied to paraview # the two patches are the same but for the path to the files they patch - patch("vtk_alias_hdf5.patch", when="@9: platform=windows") - patch("vtk_findproj_config.patch", when="platform=windows") + patch("vtk_alias_hdf5.patch", when="@9:") depends_on("libxt", when="^[virtuals=gl] glx platform=linux") # VTK will need Qt5OpenGL, and qt needs '-opengl' for that |