Meson: Fallback to gperf subproject on all platforms

With Meson 0.56 when find_program() does not find it on the system it
automatically checks if a .wrap provides it and configure the
subproject.
This commit is contained in:
Xavier Claessens 2021-01-14 12:10:30 -05:00
parent 23e46d13c5
commit 58c6633d6c
3 changed files with 8 additions and 7 deletions

View File

@ -8,7 +8,8 @@ before_script:
- dnf -y upgrade --disablerepo=rawhide-modular
- dnf -y install --disablerepo=rawhide-modular --allowerasing --skip-broken @buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap
- dnf -y install --disablerepo=rawhide-modular --allowerasing --skip-broken mingw64-gettext mingw64-freetype mingw64-expat wine
- dnf -y install --disablerepo=rawhide-modular --allowerasing --skip-broken meson ninja-build wget
- dnf -y install --disablerepo=rawhide-modular --allowerasing --skip-broken ninja-build wget python3-pip
- pip install meson
shared-build:
stage: build

View File

@ -1,6 +1,6 @@
project('fontconfig', 'c',
version: '2.13.93',
meson_version : '>= 0.50.0',
meson_version : '>= 0.56.0',
default_options: [ 'buildtype=debugoptimized'],
)
@ -241,11 +241,8 @@ if fc_configdir.startswith(fc_baseconfigdir + '/')
fonts_conf.set('CONFIGDIR', fc_configdir.split(fc_baseconfigdir + '/')[1])
endif
gperf = find_program('gperf', required: build_machine.system() != 'windows')
if not gperf.found()
subproject('gperf', required: true)
gperf = find_program('gperf')
endif
# It will automatically fallback to subproject if not found on system
gperf = find_program('gperf')
sh = find_program('sh', required : false)

View File

@ -3,3 +3,6 @@ directory=gperf
url=https://gitlab.freedesktop.org/tpm/gperf.git
push-url=https://gitlab.freedesktop.org/tpm/gperf.git
revision=meson
[provide]
program_names=gperf