Carsten Grzemba
2023-11-29 fc02e0dce53056e5be6c9a8ca7b3f940b0c6b475
libsoup: add patch for do not test for libsoup3

1 files added
1 files modified
80 ■■■■■ changed files
components/library/libsoup/Makefile 1 ●●●● patch | view | raw | blame | history
components/library/libsoup/patches/01-g_module_symbol.patch 79 ●●●●● patch | view | raw | blame | history
components/library/libsoup/Makefile
@@ -20,6 +20,7 @@
COMPONENT_NAME= libsoup
COMPONENT_MJR_VERSION= 2.74
COMPONENT_REVISION= 1
COMPONENT_VERSION= $(COMPONENT_MJR_VERSION).3
COMPONENT_SUMMARY= Libsoup is an HTTP client/server library for GNOME
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
components/library/libsoup/patches/01-g_module_symbol.patch
New file
@@ -0,0 +1,79 @@
The problem we have seen is that mate-panel-applets won't start with the message:
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
This is a false positive because it's a test or the presence of a GTK2 symbol "gtk_progress_get_type"
in the main module, where it isn't. Stack trace shows the ld.so.1 makes in follow with a
libsoup-2.72. a similar test for "soup_date_time_new_from_http_string" which must fail.
It is a libsoup3 symbol. libsoup2 is expected. But function g_module_symbol subsequently
lets the test for the GTK2 symbol pass, which is wrong.
This patch removes the second test for the libsoup3 symbol.
Removing the code changes present in the commit
https://gitlab.gnome.org/GNOME/libsoup/-/commit/e7f842c35e97e9dd2d96445b90fc64c0ba871244
to fix bug 33907395.
diff -ur libsoup-2.74.2.orig/meson.build libsoup-2.74.2/meson.build
--- libsoup-2.74.2.orig/meson.build    2022-03-07 20:07:35.769829366 -0800
+++ libsoup-2.74.2/meson.build    2022-03-07 20:09:50.784202568 -0800
@@ -83,14 +83,12 @@
 glib_required_version = '>= 2.58'
 glib_dep = dependency('glib-2.0', version : glib_required_version,
                        fallback: ['glib', 'libglib_dep'])
-gmodule_dep = dependency('gmodule-2.0', version : glib_required_version,
-                         fallback: ['glib', 'libgmodule_dep'])
 gobject_dep = dependency('gobject-2.0', version : glib_required_version,
                        fallback: ['glib', 'libgobject_dep'])
 gio_dep = dependency('gio-2.0', version : glib_required_version,
                        fallback: ['glib', 'libgio_dep'])
-glib_deps = [glib_dep, gmodule_dep, gobject_dep, gio_dep]
+glib_deps = [glib_dep, gobject_dep, gio_dep]
 sqlite_dep = dependency('sqlite3', required: false)
diff -ur libsoup-2.74.2.orig/libsoup/soup-init.c libsoup-2.74.2/libsoup/soup-init.c
--- libsoup-2.74.2.orig/libsoup/soup-init.c    2022-03-07 20:07:35.758093138 -0800
+++ libsoup-2.74.2/libsoup/soup-init.c    2022-03-07 20:08:53.207565100 -0800
@@ -10,7 +10,6 @@
 #endif
 #include <glib/gi18n-lib.h>
-#include <gmodule.h>
 #include "gconstructor.h"
 #ifdef G_OS_WIN32
@@ -20,21 +19,6 @@
 HMODULE soup_dll;
 #endif
-static gboolean
-soup3_is_loaded (void)
-{
-    GModule *module = g_module_open (NULL, 0);
-    gpointer func;
-    gboolean result = FALSE;
-
-    if (g_module_symbol (module, "soup_date_time_new_from_http_string", &func))
-        result = TRUE;
-
-    g_module_close (module);
-
-    return result;
-}
-
 static void
 soup_init (void)
 {
@@ -50,9 +34,6 @@
 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
     bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 #endif
-
-        if (soup3_is_loaded ())
-                g_error ("libsoup3 symbols detected. Using libsoup2 and libsoup3 in the same process is not supported.");
 }
 #if defined (G_OS_WIN32)