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:
65
meson.build
65
meson.build
@@ -12,7 +12,7 @@ project('gtk', 'c',
|
|||||||
|
|
||||||
glib_req = '>= 2.72.0'
|
glib_req = '>= 2.72.0'
|
||||||
pango_req = '>= 1.50.0' # keep this in sync with .gitlab-ci/test-msys.sh
|
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'
|
fribidi_req = '>= 0.19.7'
|
||||||
cairo_req = '>= 1.14.0'
|
cairo_req = '>= 1.14.0'
|
||||||
gdk_pixbuf_req = '>= 2.30.0'
|
gdk_pixbuf_req = '>= 2.30.0'
|
||||||
@@ -368,65 +368,42 @@ gtkinc = include_directories('gtk')
|
|||||||
testinc = include_directories('tests')
|
testinc = include_directories('tests')
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
glib_dep = dependency('glib-2.0', version: glib_req,
|
glib_dep = dependency('glib-2.0', version: glib_req)
|
||||||
fallback : ['glib', 'libglib_dep'])
|
gobject_dep = dependency('gobject-2.0', version: glib_req)
|
||||||
gobject_dep = dependency('gobject-2.0', version: glib_req,
|
|
||||||
fallback : ['glib', 'libgobject_dep'])
|
|
||||||
if os_win32
|
if os_win32
|
||||||
giowin32_dep = dependency('gio-windows-2.0', version: glib_req, required: win32_enabled,
|
giowin32_dep = dependency('gio-windows-2.0', version: glib_req, required: win32_enabled)
|
||||||
fallback : ['glib', 'libgio_dep'])
|
|
||||||
endif
|
endif
|
||||||
if os_unix
|
if os_unix
|
||||||
giounix_dep = dependency('gio-unix-2.0', version: glib_req, required: false,
|
giounix_dep = dependency('gio-unix-2.0', version: glib_req, required: false)
|
||||||
fallback : ['glib', 'libgio_dep'])
|
|
||||||
endif
|
endif
|
||||||
gmodule_dep = dependency('gmodule-2.0', version: glib_req,
|
gmodule_dep = dependency('gmodule-2.0', version: glib_req)
|
||||||
fallback : ['glib', 'libgmodule_dep'])
|
|
||||||
cairo_dep = dependency('cairo', version: cairo_req,
|
cairo_dep = dependency('cairo', version: cairo_req,
|
||||||
fallback : ['cairo', 'libcairo_dep'],
|
|
||||||
default_options: ['zlib=enabled', 'tests=disabled'])
|
default_options: ['zlib=enabled', 'tests=disabled'])
|
||||||
cairogobj_dep = dependency('cairo-gobject', version: cairo_req,
|
cairogobj_dep = dependency('cairo-gobject', version: cairo_req)
|
||||||
fallback : ['cairo', 'libcairogobject_dep'])
|
pango_dep = dependency('pango', version: pango_req)
|
||||||
pango_dep = dependency('pango', version: pango_req,
|
fribidi_dep = dependency('fribidi', version: fribidi_req)
|
||||||
fallback : ['pango', 'libpango_dep'])
|
|
||||||
fribidi_dep = dependency('fribidi', version: fribidi_req,
|
|
||||||
fallback : ['fribidi', 'libfribidi_dep'])
|
|
||||||
harfbuzz_dep = dependency('harfbuzz', version: harfbuzz_req,
|
harfbuzz_dep = dependency('harfbuzz', version: harfbuzz_req,
|
||||||
fallback: ['harfbuzz', 'libharfbuzz_dep'],
|
|
||||||
default_options: ['coretext=enabled'])
|
default_options: ['coretext=enabled'])
|
||||||
|
|
||||||
# Require PangoFT2 if on X11 or wayland
|
# Require PangoFT2 if on X11 or wayland
|
||||||
require_pangoft2 = wayland_enabled or x11_enabled
|
pangoft_dep = dependency('pangoft2', version: pango_req,
|
||||||
|
required: 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
|
|
||||||
|
|
||||||
if win32_enabled
|
if win32_enabled
|
||||||
# for GTK_IM_CONTEXT_IME
|
# for GTK_IM_CONTEXT_IME
|
||||||
pangowin32_dep = dependency('pangowin32')
|
pangowin32_dep = dependency('pangowin32')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
pangocairo_dep = dependency('pangocairo', version: pango_req,
|
pangocairo_dep = dependency('pangocairo', version: pango_req)
|
||||||
fallback : ['pango', 'libpangocairo_dep'])
|
|
||||||
pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_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'])
|
default_options: ['png=enabled', 'jpeg=enabled', 'builtin_loaders=png,jpeg', 'man=false'])
|
||||||
png_dep = dependency('libpng', 'png',
|
png_dep = dependency('libpng', 'png')
|
||||||
fallback: ['libpng', 'libpng_dep'])
|
tiff_dep = dependency('libtiff-4', 'tiff')
|
||||||
tiff_dep = dependency('libtiff-4', 'tiff',
|
jpeg_dep = dependency('libjpeg', 'jpeg')
|
||||||
fallback: ['libtiff', 'libtiff4_dep'])
|
|
||||||
jpeg_dep = dependency('libjpeg', 'jpeg',
|
|
||||||
fallback: ['libjpeg-turbo', 'jpeg_dep'])
|
|
||||||
|
|
||||||
epoxy_dep = dependency('epoxy', version: epoxy_req,
|
epoxy_dep = dependency('epoxy', version: epoxy_req)
|
||||||
fallback: ['libepoxy', 'libepoxy_dep'])
|
|
||||||
xkbdep = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled)
|
xkbdep = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled)
|
||||||
graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req,
|
graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req,
|
||||||
fallback: ['graphene', 'graphene_dep'],
|
|
||||||
default_options: ['tests=false'])
|
default_options: ['tests=false'])
|
||||||
iso_codes_dep = dependency('iso-codes', required: false)
|
iso_codes_dep = dependency('iso-codes', required: false)
|
||||||
|
|
||||||
@@ -506,11 +483,9 @@ cdata.set('HAVE_PANGOFT', pangoft_dep.found())
|
|||||||
wayland_pkgs = []
|
wayland_pkgs = []
|
||||||
if wayland_enabled
|
if wayland_enabled
|
||||||
wlclientdep = dependency('wayland-client', version: wayland_req,
|
wlclientdep = dependency('wayland-client', version: wayland_req,
|
||||||
fallback: 'wayland',
|
|
||||||
default_options: ['documentation=false'])
|
default_options: ['documentation=false'])
|
||||||
wlprotocolsdep = dependency('wayland-protocols', version: wayland_proto_req)
|
wlprotocolsdep = dependency('wayland-protocols', version: wayland_proto_req)
|
||||||
wlegldep = dependency('wayland-egl',
|
wlegldep = dependency('wayland-egl')
|
||||||
fallback: 'wayland')
|
|
||||||
|
|
||||||
wlproto_dir = wlprotocolsdep.get_variable('pkgdatadir')
|
wlproto_dir = wlprotocolsdep.get_variable('pkgdatadir')
|
||||||
|
|
||||||
@@ -646,10 +621,6 @@ endif
|
|||||||
cloudproviders_dep = dependency('cloudproviders',
|
cloudproviders_dep = dependency('cloudproviders',
|
||||||
required: get_option('cloudproviders'),
|
required: get_option('cloudproviders'),
|
||||||
version: cloudproviders_req,
|
version: cloudproviders_req,
|
||||||
fallback: [
|
|
||||||
'libcloudproviders',
|
|
||||||
'libcloudproviders_dep',
|
|
||||||
],
|
|
||||||
default_options: [
|
default_options: [
|
||||||
'vapigen=false',
|
'vapigen=false',
|
||||||
])
|
])
|
||||||
@@ -669,7 +640,6 @@ if not get_option('sysprof').disabled()
|
|||||||
'sysprofd=none',
|
'sysprofd=none',
|
||||||
'help=false',
|
'help=false',
|
||||||
],
|
],
|
||||||
fallback: ['sysprof', 'libsysprof_capture_dep'],
|
|
||||||
)
|
)
|
||||||
cdata.set('HAVE_SYSPROF', libsysprof_capture_dep.found())
|
cdata.set('HAVE_SYSPROF', libsysprof_capture_dep.found())
|
||||||
libsysprof_dep = dependency('sysprof-4',
|
libsysprof_dep = dependency('sysprof-4',
|
||||||
@@ -684,7 +654,6 @@ if not get_option('sysprof').disabled()
|
|||||||
'sysprofd=none',
|
'sysprofd=none',
|
||||||
'help=false',
|
'help=false',
|
||||||
],
|
],
|
||||||
fallback: ['sysprof', 'libsysprof_dep'],
|
|
||||||
)
|
)
|
||||||
profiler_enabled = true
|
profiler_enabled = true
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
directory=cairo
|
directory = cairo
|
||||||
url=https://gitlab.freedesktop.org/cairo/cairo.git
|
url = https://gitlab.freedesktop.org/cairo/cairo.git
|
||||||
push-url=ssh://git@gitlab.freedesktop.org:cairo/cairo.git
|
push-url = ssh://git@gitlab.freedesktop.org:cairo/cairo.git
|
||||||
revision=master
|
revision = master
|
||||||
depth=1
|
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
|
push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/gdk-pixbuf.git
|
||||||
revision = master
|
revision = master
|
||||||
depth = 1
|
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
|
push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/glib.git
|
||||||
revision = main
|
revision = main
|
||||||
depth = 1
|
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
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
directory=graphene
|
directory = graphene
|
||||||
url=https://github.com/ebassi/graphene.git
|
url = https://github.com/ebassi/graphene.git
|
||||||
revision=master
|
revision = master
|
||||||
depth=1
|
depth = 1
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
dependency_names = graphene-1.0, graphene-gobject-1.0
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
directory=harfbuzz
|
directory = harfbuzz
|
||||||
url=https://github.com/harfbuzz/harfbuzz.git
|
url = https://github.com/harfbuzz/harfbuzz.git
|
||||||
push-url=git@github.com:harfbuzz/harfbuzz.git
|
push-url = git@github.com:harfbuzz/harfbuzz.git
|
||||||
revision=4.0.0
|
revision = 4.0.0
|
||||||
depth=1
|
depth = 1
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
harfbuzz = libharfbuzz_dep
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
directory=libcloudproviders
|
directory = libcloudproviders
|
||||||
url=https://gitlab.gnome.org/World/libcloudproviders.git
|
url = https://gitlab.gnome.org/World/libcloudproviders.git
|
||||||
revision=master
|
push-url = ssh://git@ssh.gitlab.gnome.org:World/libcloudproviders.git
|
||||||
depth=1
|
revision = master
|
||||||
|
depth = 1
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
libcloudproviders = libcloudproviders_dep
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
directory=libepoxy
|
directory = libepoxy
|
||||||
url=https://github.com/anholt/libepoxy.git
|
url = https://github.com/anholt/libepoxy.git
|
||||||
revision=master
|
revision = master
|
||||||
depth=1
|
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
|
push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/pango.git
|
||||||
revision = main
|
revision = main
|
||||||
depth = 1
|
depth = 1
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
pango = libpango_dep
|
||||||
|
pangoft2 = libpangoft2_dep
|
||||||
|
pangoxft = libpangoxft_dep
|
||||||
|
pangowin32 = libpangowin32_dep
|
||||||
|
pangocairo = libpangocairo_dep
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
directory=sysprof
|
directory = sysprof
|
||||||
url=https://gitlab.gnome.org/GNOME/sysprof.git
|
url = https://gitlab.gnome.org/GNOME/sysprof.git
|
||||||
revision=master
|
revision = master
|
||||||
depth=1
|
depth = 1
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
dependency_names = sysprof-4, sysprof-capture-4, sysprof-ui-4
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
[wrap-git]
|
[wrap-git]
|
||||||
directory=wayland
|
directory = wayland
|
||||||
url=https://gitlab.freedesktop.org/wayland/wayland.git
|
url = https://gitlab.freedesktop.org/wayland/wayland.git
|
||||||
revision=main
|
push-url = git@gitlab.freedesktop.org:wayland/wayland
|
||||||
depth=1
|
revision = main
|
||||||
|
depth = 1
|
||||||
|
|
||||||
[provide]
|
[provide]
|
||||||
dependency_names = wayland-client, wayland-egl
|
dependency_names = wayland-client, wayland-egl
|
||||||
|
|||||||
Reference in New Issue
Block a user