File: meson.build-Depend-on-webkit2gtk-4.1-if-available.patch

package info (click to toggle)
balsa 2.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 24,788 kB
  • sloc: ansic: 96,206; sh: 4,291; makefile: 701; awk: 60; xml: 25
file content (33 lines) | stat: -rw-r--r-- 1,294 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: Peter Bloomfield <PeterBloomfield@bellsouth.net>
Date: Sun, 2 Oct 2022 15:17:29 -0400
Subject: 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.

(cherry picked from commit aa81a24021f3b48a7f207ef7049c0e8f25207661)
---
 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 801f619..bee3040 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')