fix lhapdf package (#37384)

* fix lhapdf package
* [@spackbot] updating style on behalf of joequant

---------

Co-authored-by: joequant <joequant@users.noreply.github.com>
This commit is contained in:
Joseph Wang 2023-10-03 02:33:54 +08:00 committed by GitHub
parent 1b75651af6
commit 453625014d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,6 +41,15 @@ class Lhapdf(AutotoolsPackage):
depends_on("py-setuptools", type="build", when="+python") depends_on("py-setuptools", type="build", when="+python")
depends_on("gettext", type="build", when="+python") depends_on("gettext", type="build", when="+python")
def setup_build_environment(self, env):
# Add -lintl if provided by gettext, otherwise libintl is provided by the system's glibc:
if (
self.spec.satisfies("+python")
and "gettext" in self.spec
and "intl" in self.spec["gettext"].libs.names
):
env.append_flags("LDFLAGS", "-L" + self.spec["gettext"].prefix.lib)
def configure_args(self): def configure_args(self):
args = ["FCFLAGS=-O3", "CFLAGS=-O3", "CXXFLAGS=-O3"] args = ["FCFLAGS=-O3", "CFLAGS=-O3", "CXXFLAGS=-O3"]