lhapdf: Pass additional python lib dirs only if possible (#36771)

This commit is contained in:
Thomas Madlener 2023-04-12 06:25:54 +02:00 committed by GitHub
parent 781769545f
commit 31c583581f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,11 +42,15 @@ class Lhapdf(AutotoolsPackage):
depends_on("gettext", type="build", when="+python")
def configure_args(self):
args = [
"FCFLAGS=-O3",
"CFLAGS=-O3",
"CXXFLAGS=-O3",
"LIBS=-L" + self.spec["python"].prefix.lib + " -L" + self.spec["gettext"].prefix.lib,
]
args = ["FCFLAGS=-O3", "CFLAGS=-O3", "CXXFLAGS=-O3"]
if self.spec.satisfies("+python"):
args.extend(
"LIBS=-L"
+ self.spec["python"].prefix.lib
+ " -L"
+ self.spec["gettext"].prefix.lib
)
args.extend(self.enable_or_disable("python"))
return args