summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/git/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/git/package.py')
-rw-r--r--var/spack/repos/builtin/packages/git/package.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py
index 74dbead529..e033fea8d1 100644
--- a/var/spack/repos/builtin/packages/git/package.py
+++ b/var/spack/repos/builtin/packages/git/package.py
@@ -161,8 +161,12 @@ class Git(AutotoolsPackage):
depends_on('m4', type='build')
def setup_environment(self, spack_env, run_env):
- spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
- self.spec['gettext'].prefix.lib))
+ # This is done to avoid failures when git is an external package.
+ # In that case the node in the DAG gets truncated and git DOES NOT
+ # have a gettext dependency.
+ if 'gettext' in self.spec:
+ spack_env.append_flags('LDFLAGS', '-L{0} -lintl'.format(
+ self.spec['gettext'].prefix.lib))
def configure_args(self):
spec = self.spec