diff --git a/debian/changelog b/debian/changelog index f738678..8d4ff82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +evolution-data-server (3.50.1-1deepin1) unstable; urgency=medium + + * Add libedataserverui-gtk4-18-introspection.patch + - Skip the icon theme initialization when GTK is not initialized, so + generating EDataServerUI4-1.0.gir no longer aborts with GTK 4.18 + ("gdk_display_manager_get() was called before gtk_init()") + - Backport of upstream commit fab47760d3aa (GNOME issue #571) + + -- lichenggang Mon, 14 Sep 2026 18:32:50 +0800 + evolution-data-server (3.50.1-1) unstable; urgency=medium * Team upload diff --git a/debian/patches/libedataserverui-gtk4-18-introspection.patch b/debian/patches/libedataserverui-gtk4-18-introspection.patch new file mode 100644 index 0000000..1dfeac4 --- /dev/null +++ b/debian/patches/libedataserverui-gtk4-18-introspection.patch @@ -0,0 +1,67 @@ +From: Jordan Petridis +Date: Mon, 11 Nov 2024 17:26:11 +0000 +Subject: libedataserverui: Avoid initializing the icon_theme when building + introspection data +Bug: https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/571 +Origin: upstream, https://gitlab.gnome.org/GNOME/evolution-data-server/-/commit/fab47760d3aa2b5d4f7aa878e0405e4327a5c188 +Applied-upstream: master, commit fab47760d3aa2b5d4f7aa878e0405e4327a5c188 + +Backport of upstream commit fab47760d3aa for 3.50.1. The original commit +message follows: + + I#571 - libedataserverui: Avoid initializing the icon_theme when building + introspection data + + When we are trying to generate the gobject-introspection data, + _libedataserverui_init_icon_theme will try to create a display without + gtk having been initialized before hand. + + Add a gtk_init_check and assume that we will only run into this when + building and not at runtime. + + Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/571 + +GTK 4.18 made this fatal: gdk_display_manager_get() now calls +gdk_ensure_initialized() internally and aborts with + + Gdk-ERROR **: gdk_display_manager_get() was called before gtk_init() + +when GTK is not initialized (GTK 4.16 and older created the display +manager unconditionally, so this was harmless there). + +_libedataserverui_init_icon_theme() is called from the class_init() of +ECredentialsPrompterImplPassword, which g-ir-scanner triggers while +dumping type information, so generating EDataServerUI4-1.0.gir aborts +the introspection helper with SIGTRAP and the package build fails with +GTK 4.18: + + [ 76%] Generating EDataServerUI4-1.0.gir + (process:28335): Gdk-ERROR **: gdk_display_manager_get() was called before gtk_init() + make[3]: *** [.../EDataServerUI4-1.0.gir] Error 1 + +gtk_is_initialized() is available since GTK 4.4, which is the minimum +version required by configure, so the guard is safe for all supported +GTK 4 versions. +--- + src/libedataserverui/libedataserverui-private.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/libedataserverui/libedataserverui-private.c b/src/libedataserverui/libedataserverui-private.c +index b4dfb51..201652b 100644 +--- a/src/libedataserverui/libedataserverui-private.c ++++ b/src/libedataserverui/libedataserverui-private.c +@@ -62,6 +62,14 @@ _libedataserverui_init_icon_theme (void) + static gboolean icons_added = FALSE; + + #if GTK_CHECK_VERSION(4, 0, 0) ++ /* We can't call gdk_display_manager_get if gtk is ++ * not initialized. This can happen when we are building ++ * gobject-introspection data or documentation */ ++ if (!gtk_is_initialized ()) { ++ e_source_registry_debug_print ("%s: GTK is not initialized, skipping\n", G_STRFUNC); ++ return; ++ } ++ + if (!icons_added) { + GdkDisplayManager *manager; + diff --git a/debian/patches/series b/debian/patches/series index 0235eac..1c4841d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 01-noinst-libedbus-private.patch ubuntu_gettext_domain.patch +libedataserverui-gtk4-18-introspection.patch