summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>2023-04-21 03:56:49 +0200
committerGitHub <noreply@github.com>2023-04-20 18:56:49 -0700
commite3109a96d4e6ed0d82ec6ed8c540c63da9cd94ed (patch)
tree38f38afd0f9e54375909fa810ccf7dec9df2c319
parent0b606b01dc6efbf005c90d81f0d34671df2a3cae (diff)
downloadspack-e3109a96d4e6ed0d82ec6ed8c540c63da9cd94ed.tar.gz
spack-e3109a96d4e6ed0d82ec6ed8c540c63da9cd94ed.tar.bz2
spack-e3109a96d4e6ed0d82ec6ed8c540c63da9cd94ed.tar.xz
spack-e3109a96d4e6ed0d82ec6ed8c540c63da9cd94ed.zip
bcache: Simplify check if -lintl shall be added to LDFLAGS (#36569)
Replace my initial libintl check with the much nicer check for "intl" in self.spec["gettext"].libs.names. Thanks to Chris Green! Co-authored-by: Bernhard Kaindl <bkaindl@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/bcache/package.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/bcache/package.py b/var/spack/repos/builtin/packages/bcache/package.py
index 3ce4dc1da1..4f24bd9cd7 100644
--- a/var/spack/repos/builtin/packages/bcache/package.py
+++ b/var/spack/repos/builtin/packages/bcache/package.py
@@ -26,7 +26,7 @@ class Bcache(MakefilePackage):
def setup_build_environment(self, env):
# Add -lintl if provided by gettext, otherwise libintl is provided by the system's glibc:
- if any("libintl." in filename.split("/")[-1] for filename in self.spec["gettext"].libs):
+ if "gettext" in self.spec and "intl" in self.spec["gettext"].libs.names:
env.append_flags("LDFLAGS", "-lintl")
patch(