harfbuzz: allows compilation standard being set properly for gcc (#21810)

This commit is contained in:
Olivier Cessenat 2021-02-22 10:50:25 +01:00 committed by GitHub
parent 075bb3bb96
commit 074a6f224f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,12 +40,21 @@ def url_for_version(self, version):
return url.format(version)
# Function borrowed from superlu
def flag_handler(self, name, flags):
flags = list(flags)
if name == 'cxxflags':
flags.append(self.compiler.cxx11_flag)
if name == 'cflags':
if '%pgi' not in self.spec and self.spec.satisfies('%gcc@:5.1'):
flags.append('-std=gnu99')
return (None, None, flags)
def configure_args(self):
args = []
# disable building of gtk-doc files following #9771
args.append('--disable-gtk-doc-html')
true = which('true')
args.append('CXXFLAGS={0}'.format(self.compiler.cxx11_flag))
args.append('GTKDOC_CHECK={0}'.format(true))
args.append('GTKDOC_CHECK_PATH={0}'.format(true))
args.append('GTKDOC_MKPDF={0}'.format(true))