summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2022-12-19 03:15:06 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2022-12-19 17:25:17 +0530
commitcc9072ad21c20d6ce7b0313e8d301fb5d5faab18 (patch)
tree7f0cb52ee4b74c15b7783d426759056dbeba8c9f
parent7954eed96054ad012ab5b331eddd1ecde703a52a (diff)
downloadpango-cc9072ad21c20d6ce7b0313e8d301fb5d5faab18.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 subproject name and dependency variable name inside the subproject. All the dependencies we use can be switched in this way; including gi-docgen which is now automatically executed by the find_program() invocation thanks to `program_names` in the wrap file.
-rw-r--r--meson.build28
-rw-r--r--subprojects/cairo.wrap14
-rw-r--r--subprojects/fontconfig.wrap9
-rw-r--r--subprojects/freetype2.wrap11
-rw-r--r--subprojects/fribidi.wrap13
-rw-r--r--subprojects/gi-docgen.wrap3
-rw-r--r--subprojects/glib.wrap4
-rw-r--r--subprojects/harfbuzz.wrap13
8 files changed, 56 insertions, 39 deletions
diff --git a/meson.build b/meson.build
index 78bdcb29..50ec14b9 100644
--- a/meson.build
+++ b/meson.build
@@ -212,16 +212,12 @@ mathlib_dep = cc.find_library('m', required: false)
pango_deps += mathlib_dep
# gobject
-glib_dep = dependency('glib-2.0', version: glib_req_version,
- fallback: ['glib', 'libglib_dep'])
-gobject_dep = dependency('gobject-2.0', version: glib_req_version,
- fallback: ['glib', 'libgobject_dep'])
-gio_dep = dependency('gio-2.0', version: glib_req_version,
- fallback: ['glib', 'libgio_dep'])
+glib_dep = dependency('glib-2.0', version: glib_req_version)
+gobject_dep = dependency('gobject-2.0', version: glib_req_version)
+gio_dep = dependency('gio-2.0', version: glib_req_version)
pango_deps += [glib_dep, gobject_dep, gio_dep]
fribidi_dep = dependency('fribidi', version: fribidi_req_version,
- fallback: ['fribidi', 'libfribidi_dep'],
default_options: ['docs=false'])
pango_deps += fribidi_dep
@@ -247,8 +243,6 @@ fontconfig_pc=''
harfbuzz_dep = dependency('harfbuzz',
version: harfbuzz_req_version,
- required: true,
- fallback: ['harfbuzz', 'libharfbuzz_dep'],
default_options: ['coretext=enabled'])
pango_deps += harfbuzz_dep
@@ -262,7 +256,9 @@ if not fontconfig_option.disabled() or fontconfig_required
fontconfig_option = false
endif
-fontconfig_dep = dependency('fontconfig', version: fontconfig_req_version, required: fontconfig_option)
+# Try pkgconfig and cmake, no fallback
+fontconfig_dep = dependency('fontconfig', version: fontconfig_req_version,
+ required: fontconfig_option, allow_fallback: false)
if not fontconfig_dep.found()
if cc.get_id() == 'msvc' and cc.has_header('fontconfig/fontconfig.h')
# Look for the Visual Studio-style import library if FontConfig's .pc file cannot be
@@ -276,7 +272,7 @@ endif
fontconfig_option = fontconfig_required ? true : get_option('fontconfig')
if not fontconfig_dep.found()
fontconfig_dep = dependency('fontconfig', version: fontconfig_req_version,
- fallback: ['fontconfig', 'fontconfig_dep'],
+ allow_fallback: true,
required: fontconfig_option)
endif
@@ -315,8 +311,7 @@ endif
# The first version of freetype with a pkg-config file is 2.1.5,
# CMake uses 'freetype' rather than 'freetype2' for the package name
freetype_dep = dependency('freetype2', 'freetype',
- required: freetype_option,
- fallback: ['freetype2', 'freetype_dep'])
+ required: freetype_option)
if freetype_dep.found() and freetype_dep.type_name() in ['pkgconfig', 'internal']
freetype2_pc = 'freetype2'
@@ -381,7 +376,7 @@ endif
# in a declarative way
if not cairo_dep.found()
cairo_dep = dependency('cairo', version: cairo_req_version,
- fallback: ['cairo', 'libcairo_dep'], required: get_option('cairo'))
+ required: get_option('cairo'))
cairo_found_type = cairo_dep.type_name()
endif
@@ -559,15 +554,10 @@ libsysprof_capture_dep = dependency('sysprof-capture-4',
'with_sysprofd=none',
'help=false',
],
- fallback: ['sysprof', 'libsysprof_capture_dep'],
)
pango_conf.set('HAVE_SYSPROF', libsysprof_capture_dep.found())
pango_deps += libsysprof_capture_dep
-gidocgen_dep = dependency('gi-docgen', version: '>= 2021.1',
- fallback: ['gi-docgen', 'dummy_dep'],
- required: get_option('gtk_doc'))
-
gnome = import('gnome')
pkgconfig = import('pkgconfig')
diff --git a/subprojects/cairo.wrap b/subprojects/cairo.wrap
index d09964e4..fb8aa712 100644
--- a/subprojects/cairo.wrap
+++ b/subprojects/cairo.wrap
@@ -1,6 +1,10 @@
[wrap-git]
-directory=cairo
-url=https://gitlab.freedesktop.org/cairo/cairo.git
-push-url=ssh://git@gitlab.freedesktop.org:cairo/cairo.git
-revision=master
-depth=1
+directory = cairo
+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
diff --git a/subprojects/fontconfig.wrap b/subprojects/fontconfig.wrap
new file mode 100644
index 00000000..a8985bca
--- /dev/null
+++ b/subprojects/fontconfig.wrap
@@ -0,0 +1,9 @@
+[wrap-git]
+directory = fontconfig
+url = https://gitlab.freedesktop.org/fontconfig/fontconfig
+push-url = git@gitlab.freedesktop.org:fontconfig/fontconfig.git
+depth = 1
+revision = 2.14.0
+
+[provide]
+fontconfig = fontconfig_dep
diff --git a/subprojects/freetype2.wrap b/subprojects/freetype2.wrap
index 7c88f89c..fe00fc49 100644
--- a/subprojects/freetype2.wrap
+++ b/subprojects/freetype2.wrap
@@ -1,6 +1,7 @@
[wrap-git]
-directory=freetype2
-url=https://github.com/centricular/freetype2.git
-depth=1
-push-url=git@github.com:centricular/freetype2.git
-revision=meson
+directory = freetype
+url = https://gitlab.freedesktop.org/freetype/freetype.git
+revision = VER-2-11-0
+
+[provide]
+dependency_names = freetype2
diff --git a/subprojects/fribidi.wrap b/subprojects/fribidi.wrap
index 0132d4ec..20ba8edf 100644
--- a/subprojects/fribidi.wrap
+++ b/subprojects/fribidi.wrap
@@ -1,6 +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
+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
diff --git a/subprojects/gi-docgen.wrap b/subprojects/gi-docgen.wrap
index 01606cee..85c85da1 100644
--- a/subprojects/gi-docgen.wrap
+++ b/subprojects/gi-docgen.wrap
@@ -4,3 +4,6 @@ url = https://gitlab.gnome.org/GNOME/gi-docgen.git
push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/gi-docgen.git
revision = main
depth = 1
+
+[provide]
+program_names = gi-docgen
diff --git a/subprojects/glib.wrap b/subprojects/glib.wrap
index 08f7d4e5..525a37bb 100644
--- a/subprojects/glib.wrap
+++ b/subprojects/glib.wrap
@@ -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
diff --git a/subprojects/harfbuzz.wrap b/subprojects/harfbuzz.wrap
index a57870b2..9245bfb5 100644
--- a/subprojects/harfbuzz.wrap
+++ b/subprojects/harfbuzz.wrap
@@ -1,6 +1,9 @@
[wrap-git]
-directory=harfbuzz
-url=https://github.com/harfbuzz/harfbuzz.git
-push-url=git@github.com:harfbuzz/harfbuzz.git
-revision=4.0.0
-depth=1
+directory = harfbuzz
+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