Sync from SUSE:SLFO:Main gtk2 revision a089c28a35ae9b74de91e851fd5b15e7

This commit is contained in:
Adrian Schröter 2024-08-06 12:03:55 +02:00
parent 320d60fd8c
commit 79e19ea484
6 changed files with 474 additions and 24 deletions

35
CVE-2024-6655.patch Normal file
View File

@ -0,0 +1,35 @@
From: Matthias Clasen <mclasen@redhat.com>
Date: Sat, 15 Jun 2024 14:18:01 -0400
Subject: Stop looking for modules in cwd
This is just not a good idea. It is surprising, and can be misused.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/6786
(cherry picked from commit 3bbf0b6176d42836d23c36a6ac410e807ec0a7a7)
Origin: gtk 3.24.43
---
gtk/gtkmodules.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index 50729b6..c0f0c30 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -229,13 +229,8 @@ find_module (const gchar *name)
gchar *module_name;
module_name = _gtk_find_module (name, "modules");
- if (!module_name)
- {
- /* As last resort, try loading without an absolute path (using system
- * library path)
- */
- module_name = g_module_build_path (NULL, name);
- }
+ if (module_name == NULL)
+ return NULL;
module = g_module_open (module_name, G_MODULE_BIND_LOCAL | G_MODULE_BIND_LAZY);

30
automake-1.17.patch Normal file
View File

@ -0,0 +1,30 @@
--- a/autogen.sh 2020-12-21 02:09:37.000000000 +0100
+++ b/autogen.sh 2024-07-15 23:16:24.836488891 +0200
@@ -48,7 +48,10 @@
DIE=1
}
-if automake-1.16 --version < /dev/null > /dev/null 2>&1 ; then
+if automake-1.17 --version < /dev/null > /dev/null 2>&1 ; then
+ AUTOMAKE=automake-1.17
+ ACLOCAL=aclocal-1.17
+else if automake-1.16 --version < /dev/null > /dev/null 2>&1 ; then
AUTOMAKE=automake-1.16
ACLOCAL=aclocal-1.16
else if automake-1.15 --version < /dev/null > /dev/null 2>&1 ; then
@@ -75,13 +78,14 @@
else
echo
echo "You must have automake 1.7.x, 1,10.x, 1.11.x, 1.12.x, 1.13.x, 1.14.x,"
- echo "1.15.x or 1.16.x installed to compile $PROJECT."
+ echo "1.15.x, 1.16.x, or 1.17.x installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
DIE=1
fi
fi
fi
+fi
fi
fi
fi

View File

@ -0,0 +1,54 @@
diff -ru orig/gtk/gtkfilechooserdefault.c mod/gtk/gtkfilechooserdefault.c
--- orig/gtk/gtkfilechooserdefault.c 2020-12-21 02:09:37.000000000 +0100
+++ mod/gtk/gtkfilechooserdefault.c 2023-11-29 13:03:45.032522071 +0100
@@ -6378,10 +6378,12 @@
if (!_gtk_file_system_model_iter_is_visible (fsmodel, &iter))
{
GFileInfo *info = _gtk_file_system_model_get_info (fsmodel, &iter);
+ gboolean has_is_hidden = g_file_info_has_attribute (info, "standard::is-hidden");
+ gboolean has_is_backup = g_file_info_has_attribute (info, "standard::is-backup");
if (!enabled_hidden &&
- (g_file_info_get_is_hidden (info) ||
- g_file_info_get_is_backup (info)))
+ ((has_is_hidden && g_file_info_get_is_hidden (info)) ||
+ (has_is_backup && g_file_info_get_is_backup (info))))
{
g_object_set (impl, "show-hidden", TRUE, NULL);
enabled_hidden = TRUE;
diff -ru orig/gtk/gtkfilesystemmodel.c mod/gtk/gtkfilesystemmodel.c
--- orig/gtk/gtkfilesystemmodel.c 2020-12-21 02:09:37.000000000 +0100
+++ mod/gtk/gtkfilesystemmodel.c 2023-11-29 13:03:50.525885624 +0100
@@ -444,13 +444,18 @@
node_should_be_visible (GtkFileSystemModel *model, guint id, gboolean filtered_out)
{
FileModelNode *node = get_node (model, id);
+ gboolean has_is_hidden, has_is_backup;
gboolean result;
if (node->info == NULL)
return FALSE;
+
+ has_is_hidden = g_file_info_has_attribute (node->info, "standard::is-hidden");
+ has_is_backup = g_file_info_has_attribute (node->info, "standard::is-backup");
if (!model->show_hidden &&
- (g_file_info_get_is_hidden (node->info) || g_file_info_get_is_backup (node->info)))
+ ((has_is_hidden && g_file_info_get_is_hidden (node->info)) ||
+ (has_is_backup && g_file_info_get_is_backup (node->info))))
return FALSE;
if (_gtk_file_info_consider_as_directory (node->info))
diff -ru orig/gtk/gtkpathbar.c mod/gtk/gtkpathbar.c
--- orig/gtk/gtkpathbar.c 2020-12-21 02:09:37.000000000 +0100
+++ mod/gtk/gtkpathbar.c 2023-11-29 13:03:55.749247694 +0100
@@ -1659,7 +1659,8 @@
}
display_name = g_file_info_get_display_name (info);
- is_hidden = g_file_info_get_is_hidden (info) || g_file_info_get_is_backup (info);
+ is_hidden = g_file_info_get_attribute_boolean (info, "standard::is-hidden") ||
+ g_file_info_get_attribute_boolean (info, "standard::is-backup");
gtk_widget_push_composite_child ();
button_data = make_directory_button (file_info->path_bar, display_name,

280
gtk2-gcc14.patch Normal file
View File

@ -0,0 +1,280 @@
commit 072f06abf713d7536ce2a84a5ac266f585c88d39
Author: Matthias Clasen <mclasen@redhat.com>
Date: Fri Dec 8 17:48:47 2017 -0500
Fix fallout from g_object_ref change
g_object_ref now returns the type of the object that was
passed. Introduce cast as necessary to avoid warnings due
to this.
diff --git a/gtk/gtkcellrendererspin.c b/gtk/gtkcellrendererspin.c
index 2a3961bf203cbe59..7129d05e3b2c1ae6 100644
--- a/gtk/gtkcellrendererspin.c
+++ b/gtk/gtkcellrendererspin.c
@@ -207,7 +207,8 @@ gtk_cell_renderer_spin_set_property (GObject *object,
}
if (obj)
- priv->adjustment = g_object_ref_sink (obj);
+ priv->adjustment = GTK_ADJUSTMENT (g_object_ref_sink (obj));
+
break;
case PROP_CLIMB_RATE:
priv->climb_rate = g_value_get_double (value);
diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c
index 9ffba687660c1214..5e75323c2c55d491 100644
--- a/gtk/gtkcomboboxtext.c
+++ b/gtk/gtkcomboboxtext.c
@@ -275,7 +275,7 @@ gtk_combo_box_text_buildable_custom_tag_start (GtkBuildable *buildable,
parser_data = g_slice_new0 (ItemParserData);
parser_data->builder = g_object_ref (builder);
- parser_data->object = g_object_ref (buildable);
+ parser_data->object = (GObject *)g_object_ref (buildable);
parser_data->domain = gtk_builder_get_translation_domain (builder);
*parser = item_parser;
*data = parser_data;
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index c47de5924f6f0b49..879586b0d9855374 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -1336,7 +1336,7 @@ gtk_label_buildable_custom_tag_start (GtkBuildable *buildable,
parser_data = g_slice_new0 (PangoParserData);
parser_data->builder = g_object_ref (builder);
- parser_data->object = g_object_ref (buildable);
+ parser_data->object = (GObject *) g_object_ref (buildable);
*parser = pango_parser;
*data = parser_data;
return TRUE;
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index b984193ca3375223..ba4e472dea4ebd77 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -734,7 +734,7 @@ gtk_tool_palette_add (GtkContainer *container,
g_ptr_array_add (palette->priv->groups, info);
info->pos = palette->priv->groups->len - 1;
- info->widget = g_object_ref_sink (child);
+ info->widget = (GtkToolItemGroup *)g_object_ref_sink (child);
gtk_widget_set_parent (child, GTK_WIDGET (palette));
}
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 89301eb91d21c793..0d2d15b4883a7110 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -14147,7 +14147,7 @@ gtk_tree_view_set_search_entry (GtkTreeView *tree_view,
if (entry)
{
- tree_view->priv->search_entry = g_object_ref (entry);
+ tree_view->priv->search_entry = GTK_WIDGET (g_object_ref (entry));
tree_view->priv->search_custom_entry_set = TRUE;
if (tree_view->priv->search_entry_changed_id == 0)
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index d8f6023ba3ae164c..b6d7b815505760da 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10686,7 +10686,7 @@ gtk_widget_buildable_custom_tag_start (GtkBuildable *buildable,
AccelGroupParserData *parser_data;
parser_data = g_slice_new0 (AccelGroupParserData);
- parser_data->object = g_object_ref (buildable);
+ parser_data->object = (GObject *)g_object_ref (buildable);
*parser = accel_group_parser;
*data = parser_data;
return TRUE;
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c
index 2a000dc16ff57582..e081a70c45743fd2 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -3479,7 +3479,7 @@ cups_request_ppd (GtkPrinter *printer)
g_io_channel_set_encoding (data->ppd_io, NULL, NULL);
g_io_channel_set_close_on_unref (data->ppd_io, TRUE);
- data->printer = g_object_ref (printer);
+ data->printer = (GtkPrinterCups *) g_object_ref (printer);
resource = g_strdup_printf ("/printers/%s.ppd",
gtk_printer_cups_get_ppd_name (GTK_PRINTER_CUPS (printer)));
diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c
index 36c41f78a42fb928..c556734b72ef71b0 100644
--- a/tests/testentrycompletion.c
+++ b/tests/testentrycompletion.c
@@ -237,7 +237,7 @@ animation_timer (GtkEntryCompletion *completion)
{
g_print ("removing model!\n");
- old_store = g_object_ref (gtk_entry_completion_get_model (completion));
+ old_store = GTK_LIST_STORE (g_object_ref (gtk_entry_completion_get_model (completion)));
gtk_entry_completion_set_model (completion, NULL);
}
else
commit 018a4255624928fb7d951f1d1c89196fe77e8267
Author: Cosimo Cecchi <cosimoc@gnome.org>
Date: Mon Feb 18 19:37:20 2013 -0500
immodule: fix a GCC warning
diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c
index 1fcb17a7d87f197c..445b2be87f57742f 100644
--- a/gtk/gtkimmodule.c
+++ b/gtk/gtkimmodule.c
@@ -662,7 +662,7 @@ lookup_immodule (gchar **immodules_list)
gboolean found;
gchar *context_id;
found = g_hash_table_lookup_extended (contexts_hash, *immodules_list,
- &context_id, NULL);
+ (gpointer *) &context_id, NULL);
if (found)
return context_id;
}
Partial backport of:
commit 345d865ac6b2f7760503ab144dd68e6062438b80
Author: Matthias Clasen <mclasen@redhat.com>
Date: Wed Jan 18 00:57:20 2012 -0500
GtkScale: Fix late setting of marks
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 4317523fb8f1918a..a573b2f6ba203b92 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -1471,7 +1471,7 @@ gtk_scale_add_mark (GtkScale *scale,
mark->position = position;
priv->marks = g_slist_insert_sorted_with_data (priv->marks, mark,
- (GCompareFunc) compare_marks,
+ compare_marks,
GINT_TO_POINTER (
gtk_range_get_inverted (GTK_RANGE (scale))
));
Return the expected GObject * type. This was not fixed upstream before
this file was removed.
diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c
index d004cf1ed3a2be11..8cbeda9e85b8f460 100644
--- a/gtk/gtkuimanager.c
+++ b/gtk/gtkuimanager.c
@@ -503,7 +503,7 @@ gtk_ui_manager_buildable_construct_child (GtkBuildable *buildable,
g_signal_connect (widget, "hierarchy-changed",
G_CALLBACK (child_hierarchy_changed_cb),
GTK_UI_MANAGER (buildable));
- return g_object_ref (widget);
+ return G_OBJECT (g_object_ref (widget));
}
static void
Part of this commit upstream:
commit ca94ff10ce2ea57bfde7692aaa558b1260c9ff75
Author: Daniel Boles <dboles.src@gmail.com>
Date: Fri Jun 29 20:00:06 2018 +0100
testsuite/gtk/defaultvalue: Actually build...& fix
It looks like this got dropped during the move from autotools and never
restored. I can see why, since making it work wasn't a hugely fun task!
Notes on some less then obvious details:
* PlacesSidebar is private now and didn't seem to be to be particularly
easy to adapt to, so this moves to checking for it by name, not TYPE.
I couldn't find a (fast) better way; if you know how, please clean up
* added 2 casts to avoid warnings from the new type-propagating ref()
* GdkClipboard and GdkContentProvider need some properties dodged
* GtkToolItemGroup is gone
* fixed indentation and used TypeName:property-name syntax in a print()
diff --git a/gtk/tests/defaultvalue.c b/gtk/tests/defaultvalue.c
index 64a113c955822af0..b78dcd6f59353102 100644
--- a/gtk/tests/defaultvalue.c
+++ b/gtk/tests/defaultvalue.c
@@ -91,13 +91,13 @@ test_type (gconstpointer data)
klass = g_type_class_ref (type);
if (g_type_is_a (type, GTK_TYPE_SETTINGS))
- instance = g_object_ref (gtk_settings_get_default ());
+ instance = G_OBJECT (g_object_ref (gtk_settings_get_default ()));
else if (g_type_is_a (type, GDK_TYPE_PANGO_RENDERER))
- instance = g_object_ref (gdk_pango_renderer_get_default (gdk_screen_get_default ()));
+ instance = G_OBJECT (g_object_ref (gdk_pango_renderer_get_default (gdk_screen_get_default ())));
else if (g_type_is_a (type, GDK_TYPE_PIXMAP))
- instance = g_object_ref (gdk_pixmap_new (NULL, 1, 1, 1));
+ instance = G_OBJECT (g_object_ref (gdk_pixmap_new (NULL, 1, 1, 1)));
else if (g_type_is_a (type, GDK_TYPE_COLORMAP))
- instance = g_object_ref (gdk_colormap_new (gdk_visual_get_best (), TRUE));
+ instance = G_OBJECT (g_object_ref (gdk_colormap_new (gdk_visual_get_best (), TRUE)));
else if (g_type_is_a (type, GDK_TYPE_WINDOW))
{
GdkWindowAttr attributes;
@@ -105,7 +105,7 @@ test_type (gconstpointer data)
attributes.event_mask = 0;
attributes.width = 100;
attributes.height = 100;
- instance = g_object_ref (gdk_window_new (NULL, &attributes, 0));
+ instance = G_OBJECT (g_object_ref (gdk_window_new (NULL, &attributes, 0)));
}
else
instance = g_object_new (type, NULL);
Convert to the expected pointer. This was not fixed before the file
was removed upstream.
diff --git a/modules/other/gail/gailtreeview.c b/modules/other/gail/gailtreeview.c
index 23923c59a16a6efb..ac6ff0a1c4a2fe22 100644
--- a/modules/other/gail/gailtreeview.c
+++ b/modules/other/gail/gailtreeview.c
@@ -995,7 +995,7 @@ gail_tree_view_ref_child (AtkObject *obj,
gail_cell_add_state (cell, ATK_STATE_FOCUSABLE, FALSE);
if (focus_index == i)
{
- gailview->focus_cell = g_object_ref (cell);
+ gailview->focus_cell = ATK_OBJECT (g_object_ref (cell));
gail_cell_add_state (cell, ATK_STATE_FOCUSED, FALSE);
g_signal_emit_by_name (gailview,
"active-descendant-changed",
commit bcfc53066ae54d0adbf282d5678d9a4a7083b4d3
Author: Javier Jardón <jjardon@gnome.org>
Date: Mon May 3 02:56:29 2010 +0200
tests: Too many arguments in call to 'create_menu'
diff --git a/tests/testmenubars.c b/tests/testmenubars.c
index 416a93986121d858..853d822a9b6a7925 100644
--- a/tests/testmenubars.c
+++ b/tests/testmenubars.c
@@ -21,7 +21,7 @@
#include <gtk/gtk.h>
static GtkWidget *
-create_menu (depth)
+create_menu (guint depth)
{
GtkWidget *menu;
GtkWidget *menuitem;
@@ -70,19 +70,19 @@ create_menubar (GtkPackDirection pack_dir,
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_HOME, NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_label_set_angle (GTK_LABEL (GTK_BIN (menuitem)->child), angle);
- menu = create_menu (2, TRUE);
+ menu = create_menu (2);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
menuitem = gtk_menu_item_new_with_label ("foo");
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_label_set_angle (GTK_LABEL (GTK_BIN (menuitem)->child), angle);
- menu = create_menu (2, TRUE);
+ menu = create_menu (2);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
menuitem = gtk_menu_item_new_with_label ("bar");
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_label_set_angle (GTK_LABEL (GTK_BIN (menuitem)->child), angle);
- menu = create_menu (2, TRUE);
+ menu = create_menu (2);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
return menubar;

View File

@ -1,3 +1,46 @@
-------------------------------------------------------------------
Tue Jul 16 05:39:23 UTC 2024 - Christoph G <foss@grueninger.de>
- Add automake-1.17.patch to support Automake 1.17 in autogen.sh
-------------------------------------------------------------------
Fri Jul 12 18:40:00 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Add CVE-2024-6655.patch: CVE-2024-6655 Stop looking for modules
in cwd (bsc#1228120).
-------------------------------------------------------------------
Mon Apr 29 07:09:25 UTC 2024 - pgajdos@suse.com
- remove dependency on /usr/bin/python3 using
%python3_fix_shebang macro, [bsc#1212476]
-------------------------------------------------------------------
Sun Apr 21 16:09:14 UTC 2024 - Michael Gorse <mgorse@suse.com>
- Add gtk2-gcc14.patch: fix build with gcc 14.
-------------------------------------------------------------------
Fri Apr 19 14:19:55 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Do not recommend the variuos -immodule-*: they have locale based
provides which makes zypper install them when the locales are
requested.
-------------------------------------------------------------------
Wed Nov 29 12:04:39 UTC 2023 - Paolo Stivanin <info@paolostivanin.com>
- Add gtk2-check-attribute.patch (bsc#1217622): check for attribute
availability before accessing it.
Starting from GLib 2.76, the standard attribute getters in the
GFileInfo object will warn if the attribute is unset, instead of
silently bailing out and returning a default value.
-------------------------------------------------------------------
Tue Nov 28 11:52:33 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %patch -p N instead of deprecated %patchN.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 15 19:13:13 UTC 2022 - Dirk Müller <dmueller@suse.com> Mon Aug 15 19:13:13 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package gtk2 # spec file for package gtk2
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -50,6 +50,15 @@ Patch5: gtk2-bgo625202-30-bit-drawables-remain-black.patch
Patch6: gtk2-bgo743166-remember-printing-authentication.patch Patch6: gtk2-bgo743166-remember-printing-authentication.patch
# PATCH-FEATURE-OPENSUSE gtk2-updateiconcache_sort.patch olh@opensuse.org -- Have gtp-update-icon-cache sort the file list before producing a cache # PATCH-FEATURE-OPENSUSE gtk2-updateiconcache_sort.patch olh@opensuse.org -- Have gtp-update-icon-cache sort the file list before producing a cache
Patch8: gtk2-updateiconcache_sort.patch Patch8: gtk2-updateiconcache_sort.patch
# PATCH-FIX-UPSTREAM https://gitlab.gnome.org/GNOME/gtk/-/commit/c1fa916e88de20fc61dc06d3ff9f26722effa0df#note_1852594 - Check for attribute availability before accessing it
Patch9: gtk2-check-attribute.patch
# PATCH-FIX-UPSTREAM gtk2-gcc14.patch mgorse@suse.com -- fix building with gcc14.
Patch10: gtk2-gcc14.patch
# PATCH-FIX-UPSTREAM CVE-2024-6655.patch -- CVE-2024-6655 Stop looking for modules in cwd
Patch11: CVE-2024-6655.patch
# PATCH-FEATURE-OPENSUSE automake-1.17.patch -- Add automake 1.17 support to autogen.sh
Patch12: automake-1.17.patch
BuildRequires: cairo-devel BuildRequires: cairo-devel
BuildRequires: cups-devel BuildRequires: cups-devel
BuildRequires: fdupes BuildRequires: fdupes
@ -59,6 +68,7 @@ BuildRequires: gnome-patch-translation
BuildRequires: gobject-introspection-devel BuildRequires: gobject-introspection-devel
BuildRequires: gtk-doc BuildRequires: gtk-doc
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(atk) BuildRequires: pkgconfig(atk)
# Needed for patches touching the build system / bootstrapping # Needed for patches touching the build system / bootstrapping
BuildRequires: libtool BuildRequires: libtool
@ -94,12 +104,6 @@ Requires(post): %{name}-tools >= 2.24.20
# gtk+ can work without branding/data/translations. Built in defaults will be used then. # gtk+ can work without branding/data/translations. Built in defaults will be used then.
Recommends: %{name}-branding Recommends: %{name}-branding
Recommends: %{name}-data = %{version} Recommends: %{name}-data = %{version}
# it's nice to have input modules for various locales installed by default
Recommends: %{name}-immodule-amharic = %{version}
Recommends: %{name}-immodule-inuktitut = %{version}
Recommends: %{name}-immodule-thai = %{version}
Recommends: %{name}-immodule-tigrigna = %{version}
Recommends: %{name}-immodule-vietnamese = %{version}
Recommends: gvfs Recommends: gvfs
# Provide %%{name} to make the lang and immodules packages installable # Provide %%{name} to make the lang and immodules packages installable
Provides: %{name} = %{version} Provides: %{name} = %{version}
@ -130,7 +134,7 @@ Summary: Amharic input method for the GTK+ toolkit library v2
Group: System/Libraries Group: System/Libraries
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires(post): %{name}-tools >= 2.24.20 Requires(post): %{name}-tools >= 2.24.20
Requires(postun):%{name}-tools >= 2.24.20 Requires(postun): %{name}-tools >= 2.24.20
Provides: locale(%{name}:am) Provides: locale(%{name}:am)
%description immodule-amharic %description immodule-amharic
@ -145,7 +149,7 @@ Summary: Inuktitut input method for the GTK+ toolkit library v2
Group: System/Libraries Group: System/Libraries
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires(post): %{name}-tools >= 2.24.20 Requires(post): %{name}-tools >= 2.24.20
Requires(postun):%{name}-tools >= 2.24.20 Requires(postun): %{name}-tools >= 2.24.20
Provides: locale(%{name}:iu) Provides: locale(%{name}:iu)
%description immodule-inuktitut %description immodule-inuktitut
@ -160,7 +164,7 @@ Summary: Multipress input method for the GTK+ toolkit library v2
Group: System/Libraries Group: System/Libraries
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires(post): %{name}-tools >= 2.24.20 Requires(post): %{name}-tools >= 2.24.20
Requires(postun):%{name}-tools >= 2.24.20 Requires(postun): %{name}-tools >= 2.24.20
%description immodule-multipress %description immodule-multipress
GTK+ is a multi-platform toolkit for creating graphical user interfaces. GTK+ is a multi-platform toolkit for creating graphical user interfaces.
@ -175,7 +179,7 @@ Summary: Thai-Lao input method for the GTK+ toolkit library v2
Group: System/Libraries Group: System/Libraries
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires(post): %{name}-tools >= 2.24.20 Requires(post): %{name}-tools >= 2.24.20
Requires(postun):%{name}-tools >= 2.24.20 Requires(postun): %{name}-tools >= 2.24.20
Provides: locale(%{name}:lo) Provides: locale(%{name}:lo)
Provides: locale(%{name}:th) Provides: locale(%{name}:th)
@ -191,7 +195,7 @@ Summary: Tigrigna input methods for the GTK+ toolkit library v2
Group: System/Libraries Group: System/Libraries
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires(post): %{name}-tools >= 2.24.20 Requires(post): %{name}-tools >= 2.24.20
Requires(postun):%{name}-tools >= 2.24.20 Requires(postun): %{name}-tools >= 2.24.20
Provides: %{name}-immodules-tigrigna = %{version} Provides: %{name}-immodules-tigrigna = %{version}
Provides: locale(%{name}:ti) Provides: locale(%{name}:ti)
Obsoletes: %{name}-immodules-tigrigna < %{version} Obsoletes: %{name}-immodules-tigrigna < %{version}
@ -208,7 +212,7 @@ Summary: Vietnamese input method for the GTK+ toolkit library v2
Group: System/Libraries Group: System/Libraries
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires(post): %{name}-tools >= 2.24.20 Requires(post): %{name}-tools >= 2.24.20
Requires(postun):%{name}-tools >= 2.24.20 Requires(postun): %{name}-tools >= 2.24.20
Provides: locale(%{name}:vi) Provides: locale(%{name}:vi)
%description immodule-vietnamese %description immodule-vietnamese
@ -223,7 +227,7 @@ Summary: X input method for the GTK+ toolkit library v2
Group: System/Libraries Group: System/Libraries
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires(post): %{name}-tools >= 2.24.20 Requires(post): %{name}-tools >= 2.24.20
Requires(postun):%{name}-tools >= 2.24.20 Requires(postun): %{name}-tools >= 2.24.20
Provides: locale(%{name}:ja) Provides: locale(%{name}:ja)
Provides: locale(%{name}:ko) Provides: locale(%{name}:ko)
Provides: locale(%{name}:th) Provides: locale(%{name}:th)
@ -240,7 +244,7 @@ This package provides an input method based on the X Input Method.
Summary: Auxiliary utilities for the GTK+ toolkit library v2 Summary: Auxiliary utilities for the GTK+ toolkit library v2
Group: System/Libraries Group: System/Libraries
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun): update-alternatives
%description tools %description tools
GTK+ is a multi-platform toolkit for creating graphical user interfaces. GTK+ is a multi-platform toolkit for creating graphical user interfaces.
@ -314,17 +318,20 @@ gnome-patch-translation-prepare
%if "%{_lib}" == "lib64" %if "%{_lib}" == "lib64"
cp -a %{SOURCE2} . cp -a %{SOURCE2} .
# WARNING: This patch does not patch not installed demos and tests. # WARNING: This patch does not patch not installed demos and tests.
%patch0 -p1 %patch -P 0 -p1
%endif %endif
%patch1 -p1 %patch -P 1 -p1
%patch2 -p1 %patch -P 2 -p1
%patch3 %patch -P 3
%patch4 -p1 %patch -P 4 -p1
%patch5 -p1 %patch -P 5 -p1
%patch6 -p1 %patch -P 6 -p1
%patch8 -p1 %patch -P 8 -p1
sed -i "s|/usr/bin/env python|%{_bindir}/python3|" ./gtk/gtk-builder-convert %patch -P 9 -p1
%patch -P 10 -p1
%patch -P 11 -p1
%patch -P 12 -p1
gnome-patch-translation-update gnome-patch-translation-update
%build %build
@ -368,6 +375,7 @@ mkdir -p %{buildroot}%{_rpmmacrodir}
cp %{SOURCE5} %{buildroot}%{_rpmmacrodir} cp %{SOURCE5} %{buildroot}%{_rpmmacrodir}
%fdupes %{buildroot}%{_datadir} %fdupes %{buildroot}%{_datadir}
%fdupes %{buildroot}%{_libdir} %fdupes %{buildroot}%{_libdir}
%python3_fix_shebang
########################################################################### ###########################################################################
# Note: when updating scriptlets, don't forget to also update baselibs.conf # Note: when updating scriptlets, don't forget to also update baselibs.conf