summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJoseph Wang <joequant@gmail.com>2023-10-03 02:33:54 +0800
committerGitHub <noreply@github.com>2023-10-02 11:33:54 -0700
commit453625014da8a471a34cc10b0c18ddd0e141f130 (patch)
tree4fd273853c919d811b7ba2ace9db589bf08544f3 /var
parent1b75651af6e84cd8ad41bbd0257ab16e09389eec (diff)
downloadspack-453625014da8a471a34cc10b0c18ddd0e141f130.tar.gz
spack-453625014da8a471a34cc10b0c18ddd0e141f130.tar.bz2
spack-453625014da8a471a34cc10b0c18ddd0e141f130.tar.xz
spack-453625014da8a471a34cc10b0c18ddd0e141f130.zip
fix lhapdf package (#37384)
* fix lhapdf package * [@spackbot] updating style on behalf of joequant --------- Co-authored-by: joequant <joequant@users.noreply.github.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/lhapdf/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/lhapdf/package.py b/var/spack/repos/builtin/packages/lhapdf/package.py
index a58107b8a2..41c3887f89 100644
--- a/var/spack/repos/builtin/packages/lhapdf/package.py
+++ b/var/spack/repos/builtin/packages/lhapdf/package.py
@@ -41,6 +41,15 @@ class Lhapdf(AutotoolsPackage):
depends_on("py-setuptools", 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):
args = ["FCFLAGS=-O3", "CFLAGS=-O3", "CXXFLAGS=-O3"]