netcdfc: consider static build in pkgconf filtering (#43084)

This commit is contained in:
John W. Parent 2024-03-18 09:40:32 -04:00 committed by GitHub
parent 755131fcdf
commit 193386f6ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -367,9 +367,9 @@ def patch_hdf5_pkgconfigcmake(self):
settingsconfig_file = find(self.prefix, "libnetcdf.settings", recursive=True)
files = pkgconfig_file + cmakeconfig_file + ncconfig_file + settingsconfig_file
filter_file("hdf5-shared", "hdf5", *files, ignore_absent=True)
filter_file("hdf5_hl-shared", "hdf5_hl", *files, ignore_absent=True)
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)
class AutotoolsBuilder(BaseBuilder, autotools.AutotoolsBuilder):