mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
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.
This commit is contained in:
parent
1a1f92178e
commit
53c37cfc17
61
meson.build
61
meson.build
@ -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
|
||||
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'])
|
||||
png_dep = dependency('libpng', 'png')
|
||||
tiff_dep = dependency('libtiff-4', 'tiff')
|
||||
jpeg_dep = dependency('libjpeg', 'jpeg')
|
||||
|
||||
epoxy_dep = dependency('epoxy', version: epoxy_req,
|
||||
fallback: ['libepoxy', 'libepoxy_dep'])
|
||||
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
|
||||
|
@ -4,3 +4,7 @@ url=https://gitlab.freedesktop.org/cairo/cairo.git
|
||||
push-url = ssh://git@gitlab.freedesktop.org:cairo/cairo.git
|
||||
revision = master
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
cairo = libcairo_dep
|
||||
cairo-gobject = libcairogobject_dep
|
||||
|
9
subprojects/fribidi.wrap
Normal file
9
subprojects/fribidi.wrap
Normal file
@ -0,0 +1,9 @@
|
||||
[wrap-git]
|
||||
directory = fribidi
|
||||
url = https://github.com/fribidi/fribidi.git
|
||||
push-url = git@github.com:fribidi/fribidi.git
|
||||
revision = master
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
dependency_names = fribidi
|
@ -4,3 +4,7 @@ url = https://gitlab.gnome.org/GNOME/gdk-pixbuf.git
|
||||
push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/gdk-pixbuf.git
|
||||
revision = master
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
dependency_names = gdk-pixbuf-2.0
|
||||
program_names = gdk-pixbuf-query-loaders, gdk-pixbuf-pixdata, gdk-pixbuf-csource, gdk-pixbuf-thumbnailer
|
||||
|
@ -4,3 +4,7 @@ url = https://gitlab.gnome.org/GNOME/glib.git
|
||||
push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/glib.git
|
||||
revision = main
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
dependency_names = gthread-2.0, gobject-2.0, gmodule-no-export-2.0, gmodule-export-2.0, gmodule-2.0, glib-2.0, gio-2.0, gio-windows-2.0, gio-unix-2.0
|
||||
program_names = glib-genmarshal, glib-mkenums, glib-compile-schemas, glib-compile-resources, gio-querymodules, gdbus-codegen
|
||||
|
@ -3,3 +3,6 @@ directory=graphene
|
||||
url = https://github.com/ebassi/graphene.git
|
||||
revision = master
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
dependency_names = graphene-1.0, graphene-gobject-1.0
|
||||
|
@ -4,3 +4,6 @@ url=https://github.com/harfbuzz/harfbuzz.git
|
||||
push-url = git@github.com:harfbuzz/harfbuzz.git
|
||||
revision = 4.0.0
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
harfbuzz = libharfbuzz_dep
|
||||
|
@ -1,5 +1,9 @@
|
||||
[wrap-git]
|
||||
directory = libcloudproviders
|
||||
url = https://gitlab.gnome.org/World/libcloudproviders.git
|
||||
push-url = ssh://git@ssh.gitlab.gnome.org:World/libcloudproviders.git
|
||||
revision = master
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
libcloudproviders = libcloudproviders_dep
|
||||
|
@ -3,3 +3,6 @@ directory=libepoxy
|
||||
url = https://github.com/anholt/libepoxy.git
|
||||
revision = master
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
dependency_names = epoxy
|
||||
|
@ -4,3 +4,10 @@ url = https://gitlab.gnome.org/GNOME/pango.git
|
||||
push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/pango.git
|
||||
revision = main
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
pango = libpango_dep
|
||||
pangoft2 = libpangoft2_dep
|
||||
pangoxft = libpangoxft_dep
|
||||
pangowin32 = libpangowin32_dep
|
||||
pangocairo = libpangocairo_dep
|
||||
|
@ -3,3 +3,6 @@ directory=sysprof
|
||||
url = https://gitlab.gnome.org/GNOME/sysprof.git
|
||||
revision = master
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
dependency_names = sysprof-4, sysprof-capture-4, sysprof-ui-4
|
||||
|
@ -1,6 +1,7 @@
|
||||
[wrap-git]
|
||||
directory = wayland
|
||||
url = https://gitlab.freedesktop.org/wayland/wayland.git
|
||||
push-url = git@gitlab.freedesktop.org:wayland/wayland
|
||||
revision = main
|
||||
depth = 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user