summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-01-14 12:10:30 -0500
committerXavier Claessens <xavier.claessens@collabora.com>2021-01-26 08:58:12 -0500
commit58c6633d6cde71d8f3ac9f8dd05f97c7ad38b613 (patch)
treecb9d1b2c0c4c361d0ecd4342f4d2969217009d15
parent23e46d13c5da49c695d3df35b9ebde6131a90dac (diff)
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.
-rw-r--r--.gitlab-ci.yml3
-rw-r--r--meson.build9
-rw-r--r--subprojects/gperf.wrap3
3 files changed, 8 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 651869c..a1a4062 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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
diff --git a/meson.build b/meson.build
index 016bf60..dac1761 100644
--- a/meson.build
+++ b/meson.build
@@ -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)
diff --git a/subprojects/gperf.wrap b/subprojects/gperf.wrap
index 7489733..d8014e0 100644
--- a/subprojects/gperf.wrap
+++ b/subprojects/gperf.wrap
@@ -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