From aa81a24021f3b48a7f207ef7049c0e8f25207661 Mon Sep 17 00:00:00 2001 From: Peter Bloomfield Date: Sun, 2 Oct 2022 15:17:29 -0400 Subject: [PATCH] meson.build: Depend on webkit2gtk-4.1 if available Build against webkit2gtk-4.1 if available, falling back to webkit2gtk-4.0. webkit2gtk-4.1 has the same API as webkit2gtk-4.0, so no code changes are needed, but it links against libsoup-3.0 instead of libsoup-2.4. See https://discourse.gnome.org/t/removing-libsoup-2-for-gnome-45/10846 for some discussion. --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 801f619c7..bee3040f6 100644 --- a/meson.build +++ b/meson.build @@ -169,7 +169,10 @@ libnetclient_deps = [glib_dep, # HTML widget # if html_widget == 'webkit2' - html_dep = dependency('webkit2gtk-4.0', version : '>= 2.28.0') + html_dep = dependency('webkit2gtk-4.1', required : false) + if not html_dep.found() + html_dep = dependency('webkit2gtk-4.0', version : '>= 2.28.0') + endif htmlpref_dep = dependency('sqlite3', version : '>= 3.24.0') balsa_web_extensions = join_paths(get_option('prefix'), get_option('libdir'), 'balsa') add_project_arguments('-DBALSA_WEB_EXTENSIONS="' + balsa_web_extensions + '"', language : 'c') -- GitLab