diff options
author | Chris Green <greenc@fnal.gov> | 2019-07-19 08:36:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-19 08:36:58 -0500 |
commit | 9b763980b6f3ac94b4644829c96abded3f7104ff (patch) | |
tree | 8fb9dd42d874194e3da45ef8cc33215d21cce00d /var | |
parent | ba0cd4d912ef66908a0e560cdbdc6f8cbf633390 (diff) | |
download | spack-9b763980b6f3ac94b4644829c96abded3f7104ff.tar.gz spack-9b763980b6f3ac94b4644829c96abded3f7104ff.tar.bz2 spack-9b763980b6f3ac94b4644829c96abded3f7104ff.tar.xz spack-9b763980b6f3ac94b4644829c96abded3f7104ff.zip |
libxpm: cope with system gettext if configured. (#10881)
* If gettext is installed in the system it won't be in the spec tree.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/libxpm/package.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/libxpm/package.py b/var/spack/repos/builtin/packages/libxpm/package.py index 7cc339f92c..24a49f0436 100644 --- a/var/spack/repos/builtin/packages/libxpm/package.py +++ b/var/spack/repos/builtin/packages/libxpm/package.py @@ -27,5 +27,9 @@ class Libxpm(AutotoolsPackage): depends_on('util-macros', type='build') def setup_environment(self, spack_env, run_env): - spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format( - self.spec['gettext'].prefix.lib)) + # 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: + spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format( + self.spec['gettext'].prefix.lib)) |