From 457fc4c095c6d06cfdaa6634f81dfd4044cb4eab Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 3 Feb 2021 17:45:53 -0800 Subject: [PATCH] link gettext properly for git when gettext does not provide libintl (#21472) --- var/spack/repos/builtin/packages/git/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 032b48320c..5bbfb8c18e 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -253,8 +253,9 @@ def setup_build_environment(self, env): # In that case the node in the DAG gets truncated and git DOES NOT # have a gettext dependency. if 'gettext' in self.spec: - env.append_flags('EXTLIBS', '-L{0} -lintl'.format( - self.spec['gettext'].prefix.lib)) + if 'intl' in self.spec['gettext'].libs.names: + env.append_flags('EXTLIBS', '-L{0} -lintl'.format( + self.spec['gettext'].prefix.lib)) env.append_flags('CFLAGS', '-I{0}'.format( self.spec['gettext'].prefix.include))