diff options
author | Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de> | 2023-05-15 18:03:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 11:03:03 -0500 |
commit | 192e564e26e919169aa926e92af7bd9a28cbb4f1 (patch) | |
tree | 355055dc190fb277b80e42d4a6ac563fb5a660c2 /var | |
parent | b8c5099cdece67a3e6219b6aa357fbfbc878f5d1 (diff) | |
download | spack-192e564e26e919169aa926e92af7bd9a28cbb4f1.tar.gz spack-192e564e26e919169aa926e92af7bd9a28cbb4f1.tar.bz2 spack-192e564e26e919169aa926e92af7bd9a28cbb4f1.tar.xz spack-192e564e26e919169aa926e92af7bd9a28cbb4f1.zip |
hdf5: fix showconfig (#34920)
Co-authored-by: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/hdf5/package.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 4efba18d87..efb16ab591 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -687,6 +687,24 @@ class Hdf5(CMakePackage): symlink(src_filename, tgt_filename) @run_after("install") + def fix_showconfig(self): + # The 'Extra libraries' entry of the 'h5cc -showconfig' command is a space-separated list + # of linker flags if the package is installed with Autotools, and a semicolon-separated + # list of library names if the package is installed with CMake. There are use cases that + # rely on the old Autotools behavior. Here, we make sure that the output of the command + # looks like it was before we switch to CMake. + filter_file( + r"^(\s*Extra libraries: )(.*)", + lambda match: "{0}{1}".format( + match.group(1), + " ".join("-l{0}".format(name) for name in filter(None, match.group(2).split(";"))), + ), + self.prefix.lib.join("libhdf5.settings"), + backup=False, + ignore_absent=True, + ) + + @run_after("install") @on_package_attributes(run_tests=True) def check_install(self): self._check_install() |