fixed cp2k libcp2k.pc (#32349)

Co-authored-by: Prasanthi <pdonthir@amd.com>
This commit is contained in:
AMD Toolchain Support 2022-08-26 00:31:02 +05:30 committed by GitHub
parent c2291f7eb3
commit 6fb13c0fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -761,20 +761,21 @@ def fix_package_config(self):
In case such approach causes issues in the future, it might be necessary
to generate and override entire libcp2k.pc.
"""
with open(join_path(self.prefix.lib.pkgconfig, "libcp2k.pc"), "r+") as handle:
content = handle.read().rstrip()
if self.spec.satisfies("@9.1:"):
with open(join_path(self.prefix.lib.pkgconfig, "libcp2k.pc"), "r+") as handle:
content = handle.read().rstrip()
content += " " + self.spec["blas"].libs.ld_flags
content += " " + self.spec["lapack"].libs.ld_flags
content += " " + self.spec["fftw-api"].libs.ld_flags
content += " " + self.spec["blas"].libs.ld_flags
content += " " + self.spec["lapack"].libs.ld_flags
content += " " + self.spec["fftw-api"].libs.ld_flags
if "^fftw+openmp" in self.spec:
content += " -lfftw3_omp"
if "^fftw+openmp" in self.spec:
content += " -lfftw3_omp"
content += "\n"
content += "\n"
handle.seek(0)
handle.write(content)
handle.seek(0)
handle.write(content)
def check(self):
data_dir = join_path(self.stage.source_path, "data")