From 6b052c3af9c9b868f0bb4d75d532ab8540d43a0d Mon Sep 17 00:00:00 2001 From: downloadico Date: Tue, 18 Jun 2024 16:28:11 -0600 Subject: Abinit fix hdf5 (#44763) * abinit: fix locating HDF5 Remove the check in the configure script to locate HDF5. Replaced by using Spack to locate the package. --- var/spack/repos/builtin/packages/abinit/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py index 47c69fc402..609e16b00c 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -316,6 +316,16 @@ class Abinit(AutotoolsPackage): if "~mpi" in self.spec: make("tests_in") + # Abinit assumes the *old* behavior of HDF5 where the library flags to link + # to the library were stored in the lib/libhdf5.settings file. + # Spack already knows how to link to HDF5, disable this check in configure + def patch(self): + filter_file( + r"sd_hdf5_libs_extra=.*", + "sd_hdf5_libs_extra=%s" % self.spec["hdf5"].libs.ld_flags, + "configure", + ) + def install(self, spec, prefix): make("install") if "+install-tests" in spec: -- cgit v1.2.3-70-g09d2