diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-12-18 07:00:44 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-12-19 03:09:11 +0530 |
commit | 53c37cfc177d227af5612fff248942b0c0017e0a (patch) | |
tree | 6fbd9c6e91960e098328d09cdc77e9c50e67296f /meson.build | |
parent | 1a1f92178e5e97af6e0ae2fb20f26496158b4326 (diff) | |
download | gtk+-53c37cfc177d227af5612fff248942b0c0017e0a.tar.gz |
meson: Stop using fallback: kwarg for deps that don't need it
Subprojects that use meson.override_dependency() do not require the
caller to provide the dependency variable name inside the subproject.
We also don't want to provide the *subproject* name, because the
subproject name can be `pango-1.50.12` instead of `pango` when using
wrap-file to download the tarball instead of using wrap-git. This
causes the pango subproject to be executed twice when using gtk as
a subproject inside gstreamer (which uses pango-1.50.12 as
a wrap-file).
All the dependencies we use can be switched in this way, but the
remaining ones need to be changed to use meson.override_dependency()
first.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 67 |
1 files changed, 18 insertions, 49 deletions
diff --git a/meson.build b/meson.build index 86999b9d33..5a461c0336 100644 --- a/meson.build +++ b/meson.build @@ -12,7 +12,7 @@ project('gtk', 'c', glib_req = '>= 2.72.0' pango_req = '>= 1.50.0' # keep this in sync with .gitlab-ci/test-msys.sh -harfbuzz_req = '>= 2.6.0' +harfbuzz_req = '>= 2.6.0' fribidi_req = '>= 0.19.7' cairo_req = '>= 1.14.0' gdk_pixbuf_req = '>= 2.30.0' @@ -368,65 +368,42 @@ gtkinc = include_directories('gtk') testinc = include_directories('tests') # Dependencies -glib_dep = dependency('glib-2.0', version: glib_req, - fallback : ['glib', 'libglib_dep']) -gobject_dep = dependency('gobject-2.0', version: glib_req, - fallback : ['glib', 'libgobject_dep']) +glib_dep = dependency('glib-2.0', version: glib_req) +gobject_dep = dependency('gobject-2.0', version: glib_req) if os_win32 - giowin32_dep = dependency('gio-windows-2.0', version: glib_req, required: win32_enabled, - fallback : ['glib', 'libgio_dep']) + giowin32_dep = dependency('gio-windows-2.0', version: glib_req, required: win32_enabled) endif if os_unix - giounix_dep = dependency('gio-unix-2.0', version: glib_req, required: false, - fallback : ['glib', 'libgio_dep']) + giounix_dep = dependency('gio-unix-2.0', version: glib_req, required: false) endif -gmodule_dep = dependency('gmodule-2.0', version: glib_req, - fallback : ['glib', 'libgmodule_dep']) +gmodule_dep = dependency('gmodule-2.0', version: glib_req) cairo_dep = dependency('cairo', version: cairo_req, - fallback : ['cairo', 'libcairo_dep'], default_options: ['zlib=enabled', 'tests=disabled']) -cairogobj_dep = dependency('cairo-gobject', version: cairo_req, - fallback : ['cairo', 'libcairogobject_dep']) -pango_dep = dependency('pango', version: pango_req, - fallback : ['pango', 'libpango_dep']) -fribidi_dep = dependency('fribidi', version: fribidi_req, - fallback : ['fribidi', 'libfribidi_dep']) +cairogobj_dep = dependency('cairo-gobject', version: cairo_req) +pango_dep = dependency('pango', version: pango_req) +fribidi_dep = dependency('fribidi', version: fribidi_req) harfbuzz_dep = dependency('harfbuzz', version: harfbuzz_req, - fallback: ['harfbuzz', 'libharfbuzz_dep'], default_options: ['coretext=enabled']) # Require PangoFT2 if on X11 or wayland -require_pangoft2 = wayland_enabled or x11_enabled - -if require_pangoft2 - pangoft_dep = dependency('pangoft2', version: pango_req, - fallback : ['pango', 'libpangoft2_dep']) -else - pangoft_dep = dependency('pangoft2', required: false) -endif +pangoft_dep = dependency('pangoft2', version: pango_req, + required: wayland_enabled or x11_enabled) if win32_enabled # for GTK_IM_CONTEXT_IME pangowin32_dep = dependency('pangowin32') endif -pangocairo_dep = dependency('pangocairo', version: pango_req, - fallback : ['pango', 'libpangocairo_dep']) +pangocairo_dep = dependency('pangocairo', version: pango_req) pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req, - fallback : ['gdk-pixbuf', 'gdkpixbuf_dep'], default_options: ['png=enabled', 'jpeg=enabled', 'builtin_loaders=png,jpeg', 'man=false']) -png_dep = dependency('libpng', 'png', - fallback: ['libpng', 'libpng_dep']) -tiff_dep = dependency('libtiff-4', 'tiff', - fallback: ['libtiff', 'libtiff4_dep']) -jpeg_dep = dependency('libjpeg', 'jpeg', - fallback: ['libjpeg-turbo', 'jpeg_dep']) - -epoxy_dep = dependency('epoxy', version: epoxy_req, - fallback: ['libepoxy', 'libepoxy_dep']) +png_dep = dependency('libpng', 'png') +tiff_dep = dependency('libtiff-4', 'tiff') +jpeg_dep = dependency('libjpeg', 'jpeg') + +epoxy_dep = dependency('epoxy', version: epoxy_req) xkbdep = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled) graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req, - fallback: ['graphene', 'graphene_dep'], default_options: ['tests=false']) iso_codes_dep = dependency('iso-codes', required: false) @@ -506,11 +483,9 @@ cdata.set('HAVE_PANGOFT', pangoft_dep.found()) wayland_pkgs = [] if wayland_enabled wlclientdep = dependency('wayland-client', version: wayland_req, - fallback: 'wayland', default_options: ['documentation=false']) wlprotocolsdep = dependency('wayland-protocols', version: wayland_proto_req) - wlegldep = dependency('wayland-egl', - fallback: 'wayland') + wlegldep = dependency('wayland-egl') wlproto_dir = wlprotocolsdep.get_variable('pkgdatadir') @@ -646,10 +621,6 @@ endif cloudproviders_dep = dependency('cloudproviders', required: get_option('cloudproviders'), version: cloudproviders_req, - fallback: [ - 'libcloudproviders', - 'libcloudproviders_dep', - ], default_options: [ 'vapigen=false', ]) @@ -669,7 +640,6 @@ if not get_option('sysprof').disabled() 'sysprofd=none', 'help=false', ], - fallback: ['sysprof', 'libsysprof_capture_dep'], ) cdata.set('HAVE_SYSPROF', libsysprof_capture_dep.found()) libsysprof_dep = dependency('sysprof-4', @@ -684,7 +654,6 @@ if not get_option('sysprof').disabled() 'sysprofd=none', 'help=false', ], - fallback: ['sysprof', 'libsysprof_dep'], ) profiler_enabled = true else |