link gettext properly for git when gettext does not provide libintl (#21472)

This commit is contained in:
Greg Becker 2021-02-03 17:45:53 -08:00 committed by GitHub
parent beb4d968ef
commit 457fc4c095
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -253,6 +253,7 @@ def setup_build_environment(self, env):
# In that case the node in the DAG gets truncated and git DOES NOT # In that case the node in the DAG gets truncated and git DOES NOT
# have a gettext dependency. # have a gettext dependency.
if 'gettext' in self.spec: if 'gettext' in self.spec:
if 'intl' in self.spec['gettext'].libs.names:
env.append_flags('EXTLIBS', '-L{0} -lintl'.format( env.append_flags('EXTLIBS', '-L{0} -lintl'.format(
self.spec['gettext'].prefix.lib)) self.spec['gettext'].prefix.lib))
env.append_flags('CFLAGS', '-I{0}'.format( env.append_flags('CFLAGS', '-I{0}'.format(