diff options
author | Bernhard Kaindl <bkaindl@gmail.com> | 2023-04-01 15:11:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-01 15:11:14 +0200 |
commit | 8b98564840f15bfabf957a641bf532eb6ad318b3 (patch) | |
tree | 269e341d9268067ef9c9d8cc0922154949bdbb8e /var | |
parent | d79c8179fc1fc6d0803d8118ef99fb7d868e6235 (diff) | |
download | spack-8b98564840f15bfabf957a641bf532eb6ad318b3.tar.gz spack-8b98564840f15bfabf957a641bf532eb6ad318b3.tar.bz2 spack-8b98564840f15bfabf957a641bf532eb6ad318b3.tar.xz spack-8b98564840f15bfabf957a641bf532eb6ad318b3.zip |
libxpm: Fix linking with libintl (#36568)
Original Author of this change: Chris Green <greenc@fnal.gov>
Two changes:
- Remove adding the library path using -L: It is obsolete now
that we have the library paths in before the system paths.
- Link with -linto only if the gettext recipe provides it:
When we are on a glibc system, we can use external gettext,
which means we use the libintl inside libc.so: no -lintl then.
This change was already submitted in #35450 and reviewed but is
stuck in this big PR which is trying to do too in a single PR.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/libxpm/package.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/libxpm/package.py b/var/spack/repos/builtin/packages/libxpm/package.py index b034967dd8..26e169e74f 100644 --- a/var/spack/repos/builtin/packages/libxpm/package.py +++ b/var/spack/repos/builtin/packages/libxpm/package.py @@ -30,5 +30,5 @@ class Libxpm(AutotoolsPackage, XorgPackage): # If libxpm is installed as an external package, gettext won't # be available in the spec. See # https://github.com/spack/spack/issues/9149 for details. - if "gettext" in self.spec: - env.append_flags("LDFLAGS", "-L{0} -lintl".format(self.spec["gettext"].prefix.lib)) + if "gettext" in self.spec and "intl" in self.spec["gettext"].libs.names: + env.append_flags("LDFLAGS", "-lintl") |