From 41b2e22467e5bda0aa692190c4f600fa99890605 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Thu, 29 Feb 2024 15:13:22 -0800 Subject: [PATCH] astroid: build with guri and webkit2gtk-4.1 --- srcpkgs/astroid/patches/webkit2gtk41.patch | 95 ++++++++++++++++++++++ srcpkgs/astroid/template | 7 +- 2 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/astroid/patches/webkit2gtk41.patch diff --git a/srcpkgs/astroid/patches/webkit2gtk41.patch b/srcpkgs/astroid/patches/webkit2gtk41.patch new file mode 100644 index 00000000000000..d25ca7163a6911 --- /dev/null +++ b/srcpkgs/astroid/patches/webkit2gtk41.patch @@ -0,0 +1,95 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6eb00cf..1a2ea30 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,11 +95,10 @@ endif() + + pkg_check_modules (GTKMM3 REQUIRED gtkmm-3.0>=3.10) + pkg_check_modules (GLIBMM2 REQUIRED glibmm-2.4) +-pkg_check_modules (WEBKIT2GTK REQUIRED webkit2gtk-4.0>=2.22) ++pkg_check_modules (WEBKIT2GTK REQUIRED webkit2gtk-4.1>=2.22) + pkg_check_modules (SASS REQUIRED libsass) + pkg_check_modules (GIOMM2 REQUIRED giomm-2.4) +-pkg_check_modules (GIOUNIX REQUIRED gio-unix-2.0) +-pkg_check_modules (LIBSOUP REQUIRED libsoup-2.4) ++pkg_check_modules (GIOUNIX REQUIRED gio-unix-2.0>=2.66) + + string (REGEX REPLACE "([0-9]+\.[0-9]+)\.[0-9]+" "\\1" GMIME_MAJOR_MINOR ${Notmuch_GMIME_VERSION}) + pkg_check_modules (GMIME REQUIRED gmime-${GMIME_MAJOR_MINOR}>=${Notmuch_GMIME_VERSION}) +@@ -167,7 +166,6 @@ add_compile_options ( + ${GLIBMM2_CFLAGS} + ${GIOMM2_CFLAGS} + ${GIOUNIX_CFLAGS} +- ${LIBSOUP_CFLAGS} + ${GMIME_CFLAGS} + ${WEBKIT2GTK_CFLAGS} + ${VTE2_CFLAGS} +@@ -337,7 +335,6 @@ target_link_libraries ( + ${GLIBMM2_LDFLAGS} + ${GIOMM2_LDFLAGS} + ${GIOUINX_LDFLAGS} +- ${LIBSOUP_LDFLAGS} + ${GMIME_LDFLAGS} + ${VTE2_LDFLAGS} + ${SASS_LDFLAGS} +diff --git a/src/astroid.cc b/src/astroid.cc +index 3d5dc9f..5402c81 100644 +--- a/src/astroid.cc ++++ b/src/astroid.cc +@@ -6,6 +6,8 @@ + # include + # include + ++# include ++ + /* program options */ + # include + # include +@@ -53,8 +55,6 @@ + # include + # include + +-# include +- + using namespace std; + using namespace boost::filesystem; + +@@ -550,15 +550,16 @@ namespace Astroid { + + MainWindow * mw = (MainWindow*) get_windows ()[0]; + +- SoupURI *uri = soup_uri_new(url.c_str()); ++ GUriFlags guriflags = (GUriFlags)(G_URI_FLAGS_HAS_PASSWORD | G_URI_FLAGS_ENCODED_PATH | G_URI_FLAGS_ENCODED_QUERY | G_URI_FLAGS_ENCODED_FRAGMENT | G_URI_FLAGS_SCHEME_NORMALIZE | G_URI_FLAGS_PARSE_RELAXED); ++ GUri *guri = g_uri_parse (url.c_str(), guriflags, NULL); + +- if (SOUP_URI_IS_VALID(uri)) { ++ if (guri) { + /* we got an mailto url */ + ustring from, to, cc, bcc, subject, body; + +- to = soup_uri_decode (soup_uri_get_path (uri)); ++ to = g_uri_unescape_string (g_uri_get_path (guri), NULL); + +- const char * soup_query = soup_uri_get_query (uri); ++ const char * soup_query = g_uri_get_query (guri); + if (soup_query) { + std::istringstream query_string (soup_query); + std::string keyval; +@@ -568,7 +569,7 @@ namespace Astroid { + ustring key = keyval.substr (0, pos); + key = key.lowercase (); + +- ustring val = soup_uri_decode (keyval.substr (pos+1).c_str()); ++ ustring val = g_uri_unescape_string (keyval.substr (pos+1).c_str(), NULL); + + if (key == "from") { + from = ustring (val); +@@ -591,7 +592,7 @@ namespace Astroid { + mw->add_mode (new EditMessage (mw, url)); + } + +- soup_uri_free (uri); ++ g_uri_unref (guri); + } + + int Astroid::hint_level () { diff --git a/srcpkgs/astroid/template b/srcpkgs/astroid/template index 02d7743130fb39..4efbb0b8ffdc6b 100644 --- a/srcpkgs/astroid/template +++ b/srcpkgs/astroid/template @@ -1,13 +1,14 @@ # Template file for 'astroid' pkgname=astroid version=0.16 -revision=13 +revision=14 build_style=cmake build_helper=gir hostmakedepends="pkg-config scdoc protobuf gobject-introspection" -makedepends="libnotmuch-devel gtkmm-devel webkit2gtk-devel libsass-devel +makedepends="libnotmuch-devel gtkmm-devel libwebkit2gtk41-devel libsass-devel gmime3-devel boost-devel protobuf-devel vte3-devel gobject-introspection - libpeas-devel libsoup-devel" + libpeas-devel" +depends="gvim" checkdepends="gnupg notmuch w3m cmark xvfb-run" short_desc="Graphical threads-with-tags style email client for Notmuch" maintainer="Ameise "