diff --git a/srcpkgs/bookworm/patches/libwebkit2gtk41.patch b/srcpkgs/bookworm/patches/libwebkit2gtk41.patch new file mode 100644 index 00000000000..c0c6b2f1a6b --- /dev/null +++ b/srcpkgs/bookworm/patches/libwebkit2gtk41.patch @@ -0,0 +1,76 @@ +See: https://github.com/babluboy/bookworm/pull/391 + +From 9128a392396b354fd8e265287b785996ee9a6a26 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jeremy=20B=C3=ADcha?= +Date: Wed, 3 Jan 2024 17:02:54 -0500 +Subject: [PATCH 1/3] Stop using libsoup2.4 directly + +webkit2gtk 4.1 switches from libsoup2.4 to libsoup3 +and distros don't want to build webkit2gtk 4.0 any more +--- + src/utils.vala | 4 ++-- + src/window.vala | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/utils.vala b/src/utils.vala +index 3416da1d..20154bce 100644 +--- a/src/utils.vala ++++ b/src/utils.vala +@@ -639,7 +639,7 @@ namespace BookwormApp.Utils { + } + + public static string decodeHTMLChars(string inputString){ +- string outputString = Soup.URI.decode(inputString); ++ string outputString = GLib.Uri.unescape_string(inputString); + return outputString; + } + +@@ -649,7 +649,7 @@ namespace BookwormApp.Utils { + } + + public static string removeMarkUp(string inputString){ +- string outputString = Soup.URI.decode(inputString); ++ string outputString = GLib.Uri.unescape_string(inputString); + //replace the escape char for space present in HTML converted from PDF + outputString = outputString.replace(" ", " ").replace("#160;", " ").replace(" ", " "); + return outputString; +diff --git a/src/window.vala b/src/window.vala +index 18b43a1c..3d08d915 100644 +--- a/src/window.vala ++++ b/src/window.vala +@@ -448,7 +448,7 @@ public class BookwormApp.AppWindow { + WebKit.NavigationAction aNavAction = aNavDecision.get_navigation_action(); + WebKit.URIRequest aURIReq = aNavAction.get_request (); + string url_clicked_on_webview = BookwormApp.Utils.decodeHTMLChars(aURIReq.get_uri().strip()); +- url_clicked_on_webview = Soup.URI.decode(url_clicked_on_webview); ++ url_clicked_on_webview = GLib.Uri.unescape_string(url_clicked_on_webview); + debug("URL Captured:"+url_clicked_on_webview); + + //Handle external links (not file://) by opening the default browser i.e. http://, ftp:// + +From 03f49ce4c47ca77237d614ced0a0d11898e517b3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jeremy=20B=C3=ADcha?= +Date: Fri, 5 Jan 2024 18:11:34 -0500 +Subject: [PATCH 2/3] Switch from webkit2gtk 4.0 to 4.1 + +Closes: https://github.com/babluboy/bookworm/issues/387 +--- + README.md | 5 ++--- + meson.build | 2 +- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/README.md b/README.md +index 0079de31..b592ed04 100644 +diff --git a/meson.build b/meson.build +index 3708ed5a..43ee66e6 100644 +--- a/meson.build ++++ b/meson.build +@@ -62,7 +62,7 @@ executable( + dependencies: [ + dependency('gtk+-3.0'), + dependency('gee-0.8'), +- dependency('webkit2gtk-4.0'), ++ dependency('webkit2gtk-4.1'), + dependency('poppler-glib'), + dependency('libxml-2.0'), + dependency('granite', version: '>=0.5'), diff --git a/srcpkgs/bookworm/template b/srcpkgs/bookworm/template index 22eb3ab8c9e..52e1007be6f 100644 --- a/srcpkgs/bookworm/template +++ b/srcpkgs/bookworm/template @@ -1,12 +1,12 @@ # Template file for 'bookworm' pkgname=bookworm version=1.1.2 -revision=6 +revision=7 build_style=meson hostmakedepends="pkg-config glib-devel gettext vala" makedepends="gtk+3-devel libgee08-devel granite-devel - webkit2gtk-devel sqlite-devel poppler-glib-devel - libxml2-devel glib-devel libsoup-devel" + libwebkit2gtk41-devel sqlite-devel poppler-glib-devel + libxml2-devel glib-devel" depends="poppler unzip" short_desc="Simple, focused eBook reader" maintainer="Giuseppe Fierro "