summaryrefslogtreecommitdiff
path: root/gui-libs/gtk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-18 00:58:25 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-18 00:58:25 +0100
commit5e0a5ca921524f8859808527a57655eec16efa52 (patch)
tree7c58411b1e81478df4e20082a6adec2553c24c5c /gui-libs/gtk
parent4c16e0a214824f15f09396e359db4f1f5c086fec (diff)
gentoo auto-resync : 18:07:2023 - 00:58:24
Diffstat (limited to 'gui-libs/gtk')
-rw-r--r--gui-libs/gtk/Manifest4
-rw-r--r--gui-libs/gtk/files/4.10.4-gtk-Align-key_size-up-to-key_align.patch50
-rw-r--r--gui-libs/gtk/files/4.10.4-gtk-Pass-G_ALIGNOF-.-to-gtk_sort_keys_new.patch160
-rw-r--r--gui-libs/gtk/gtk-4.10.4.ebuild5
4 files changed, 218 insertions, 1 deletions
diff --git a/gui-libs/gtk/Manifest b/gui-libs/gtk/Manifest
index 1526ed95a0b2..e21712e8ff76 100644
--- a/gui-libs/gtk/Manifest
+++ b/gui-libs/gtk/Manifest
@@ -1,7 +1,9 @@
+AUX 4.10.4-gtk-Align-key_size-up-to-key_align.patch 2282 BLAKE2B e83dad7905a4e189dc253e86fe22dd6802b0f74953b0b424bbe3b39501c5b960681dfe9541b87dc2939ce82e918885a52945ca4e7f7ea6c626321401da10f790 SHA512 bf82ff6f0685db1e6726c5c8c7b2948a4034d001c272f8c1cff49709e753db3a566f92c8d4e7aece4ae5ef67551e823222904b9ec2b28e40448ff759066f3bad
+AUX 4.10.4-gtk-Pass-G_ALIGNOF-.-to-gtk_sort_keys_new.patch 7580 BLAKE2B 2187a08788509d7d4e63d50f3db9fc2f4c762005bc12eab3b495155ef11935eecd72137647e2aa0c7f8b18a1c8573c725aa6e7e5b0e9361109069c15014aac9f SHA512 4f024aab79b1e2793dd65978565590e7faafb1347bae201a6cd2652fc406d735b13db4e42665fecacc0198b65f3ab5a6c9e6338cee06c7b28c6ceec3e52f886b
DIST gtk-4.10.3.tar.xz 20483468 BLAKE2B dcc845e567e3f921f1b479ac2b40b45922725452656d08e95579f3dd8d521261cedf73bf998c781e42318d0c2253967765a4bcb6223db4f29d45648bc524f843 SHA512 aac4703f9c135271febdd373b24995dabcd08fb0cea2d6014c812f2839ae88926c1939ddcc64ab9728ba3248a1f58260ce73fa6ef5679e54dbb798021adfa324
DIST gtk-4.10.4.tar.xz 20526652 BLAKE2B 12874d90f9f48f22d57c53cf035065726e5bbd9a701cacf390acad6889fd86dbc3c4cb2f8f9a0690d9375935a7e3a8685211283814dbbfb28c6c08fd159529c5 SHA512 0c5db3af72227977e11fea3adddec1321b82bcace3c3d10a7c914b8d98b0bdb7994084c0a9e883b24815038bf4a0efe1eb1c4ff79e6838e83cadb6ddf2a1239f
DIST gtk-4.11.4.tar.xz 21035392 BLAKE2B 0fb7770f6f11c94fdcc82a807738a535efd222eb2a723b036ce020be10cca121b46c5bb78bceaee94f93698378378ed30e5775ed7cda123b27111289f02848d9 SHA512 ca5042c4400da93ea66346d276b96f32c635a9777cdb6cbcb72d6686ed86e67717d75cba92521f52a3bad04c774f361e1e5bada60b242c345b79c4c05de8401e
EBUILD gtk-4.10.3.ebuild 5796 BLAKE2B 0a9b1d7f5b594c9c882ca763facfea5b4ac0d3621f12a1c0375b28e0b4a9defd006f9cf589793376b6406168c7de3352c9c04bd34a9879e92ccc27fd357596a7 SHA512 72012e0c3adec57d0da2f3da75e55f76b0762f528b3172cd02c26081e380dd4a191a75a15415ecfad89fd04926e8195c8189333bb62a9c7be8348e78f7930501
-EBUILD gtk-4.10.4.ebuild 5514 BLAKE2B 4c37f21d978af9aaabce71232fe21d672ca5ff0fd034f42ac8c1d5059723bd3fc4a34b4e7ed963421639f05879c40898031ebb1cd30f457664ab46f59de6f8d4 SHA512 af114b8da980866a83f6eae677f14981123b74998096701709b6730eb0a3c3c3336bf13df1058034930ceb2c3800c30c8bf4d13c87f57d937c9c4ef0b5b7bfa4
+EBUILD gtk-4.10.4.ebuild 5658 BLAKE2B 71c830751dba88b0d90fff97d5022d465f2e4eda20332bbb0905e8785117f9aaf44f1218796090e99d3f7cc3c9a6874f0ccf143b95d0b128895be30c35f1e207 SHA512 0a0d2a0297cbf0fc54e0f9792ec0ae46d755ef39c7560d402e77cf3a9896c85830cb46ba1dec253bb034160e51c1d24ed2ea2375f92e7e611429d8364d1f9047
EBUILD gtk-4.11.4.ebuild 5550 BLAKE2B 46cd1b5fd321b5cf226d51b0c0c33e60725800c916f793632b014637629fcc38158d09060c8dc6b1042ae6563b247d0f4486cb4a872b9fa84a8b40e8908fb891 SHA512 45aaf6168005415d608e59e46c63e06d6db27729fbd93dc84e9d97499be76feff24c1b1d8bf446e54628a68bf988924fa4769178ccf9ee24ff34d0f36e5ce036
MISC metadata.xml 775 BLAKE2B a679a63b050be837319131924b4196dc7fdd2a1dcbca4b099eebc8550db3120dc8afe2b743acd68ce386fda7e4bd3af1eb2eb11d333542e1dbcc8b8a68c6c919 SHA512 15d8dc9c2701575b59d596cc10b1ca18691d10c3a418989eece698650e82a34720bea9d53a4ca4aa83745ce5d254cec5438f1ab10093ab2f765e77d0c9c24433
diff --git a/gui-libs/gtk/files/4.10.4-gtk-Align-key_size-up-to-key_align.patch b/gui-libs/gtk/files/4.10.4-gtk-Align-key_size-up-to-key_align.patch
new file mode 100644
index 000000000000..388c8011344f
--- /dev/null
+++ b/gui-libs/gtk/files/4.10.4-gtk-Align-key_size-up-to-key_align.patch
@@ -0,0 +1,50 @@
+From a3582031576783fbc644fdd2ad914820d0ba4863 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Mon, 19 Jun 2023 15:50:04 -0400
+Subject: [PATCH] gtk: Align key_size up to key_align
+
+Avoids unaligned accesses when e.g. the key_size is 12 and key_align is
+8. We need to round the key size up to 16 to ensure that all keys are
+appropriately aligned.
+
+This manifested as a failure in the `gtk:gtk / sorter` unit test on
+sparc.
+
+Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5907
+(cherry picked from commit 3f360aa883dc51ad986c721be01b494020e5ac9d)
+---
+ gtk/gtkmultisorter.c | 3 ++-
+ gtk/gtksortlistmodel.c | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/gtk/gtkmultisorter.c b/gtk/gtkmultisorter.c
+index ddbdb440cb..e8744015af 100644
+--- a/gtk/gtkmultisorter.c
++++ b/gtk/gtkmultisorter.c
+@@ -186,7 +186,8 @@ gtk_multi_sort_keys_new (GtkMultiSorter *self)
+ {
+ result->keys[i].keys = gtk_sorter_get_keys (gtk_sorters_get (&self->sorters, i));
+ result->keys[i].offset = GTK_SORT_KEYS_ALIGN (keys->key_size, gtk_sort_keys_get_key_align (result->keys[i].keys));
+- keys->key_size = result->keys[i].offset + gtk_sort_keys_get_key_size (result->keys[i].keys);
++ keys->key_size = result->keys[i].offset + GTK_SORT_KEYS_ALIGN (gtk_sort_keys_get_key_size (result->keys[i].keys),
++ gtk_sort_keys_get_key_align (result->keys[i].keys));
+ keys->key_align = MAX (keys->key_align, gtk_sort_keys_get_key_align (result->keys[i].keys));
+ }
+
+diff --git a/gtk/gtksortlistmodel.c b/gtk/gtksortlistmodel.c
+index c2feb9e250..44414c1fd4 100644
+--- a/gtk/gtksortlistmodel.c
++++ b/gtk/gtksortlistmodel.c
+@@ -439,7 +439,8 @@ gtk_sort_list_model_create_keys (GtkSortListModel *self)
+ g_assert (self->key_size == 0);
+
+ self->sort_keys = gtk_sorter_get_keys (self->sorter);
+- self->key_size = gtk_sort_keys_get_key_size (self->sort_keys);
++ self->key_size = GTK_SORT_KEYS_ALIGN (gtk_sort_keys_get_key_size (self->sort_keys),
++ gtk_sort_keys_get_key_align (self->sort_keys));
+ self->keys = g_malloc_n (self->n_items, self->key_size);
+ self->missing_keys = gtk_bitset_new_range (0, self->n_items);
+ }
+--
+2.41.0
+
diff --git a/gui-libs/gtk/files/4.10.4-gtk-Pass-G_ALIGNOF-.-to-gtk_sort_keys_new.patch b/gui-libs/gtk/files/4.10.4-gtk-Pass-G_ALIGNOF-.-to-gtk_sort_keys_new.patch
new file mode 100644
index 000000000000..3cfe54078c03
--- /dev/null
+++ b/gui-libs/gtk/files/4.10.4-gtk-Pass-G_ALIGNOF-.-to-gtk_sort_keys_new.patch
@@ -0,0 +1,160 @@
+From 00cdaba5a89eedb6f7334bdfa523e374e5dc4b12 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Mon, 19 Jun 2023 15:47:17 -0400
+Subject: [PATCH] gtk: Pass G_ALIGNOF (...) to gtk_sort_keys_new
+
+The sizeof and G_ALIGNOF are often, but not always, identical.
+
+(cherry picked from commit a4440453868ebe7c87d0a69de9609b33a688a8bb)
+---
+ gtk/gtknumericsorter.c | 22 +++++++++++-----------
+ gtk/gtksorter.c | 2 +-
+ gtk/gtkstringsorter.c | 2 +-
+ gtk/gtktreelistrowsorter.c | 2 +-
+ 4 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/gtk/gtknumericsorter.c b/gtk/gtknumericsorter.c
+index 4f474ad14d..f66d5ff505 100644
+--- a/gtk/gtknumericsorter.c
++++ b/gtk/gtknumericsorter.c
+@@ -227,7 +227,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_BOOLEAN_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_BOOLEAN_SORT_KEYS_CLASS,
+ sizeof (char),
+- sizeof (char));
++ G_ALIGNOF (char));
+ break;
+
+ case G_TYPE_CHAR:
+@@ -236,7 +236,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_CHAR_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_CHAR_SORT_KEYS_CLASS,
+ sizeof (char),
+- sizeof (char));
++ G_ALIGNOF (char));
+ break;
+
+ case G_TYPE_UCHAR:
+@@ -245,7 +245,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_UCHAR_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_UCHAR_SORT_KEYS_CLASS,
+ sizeof (guchar),
+- sizeof (guchar));
++ G_ALIGNOF (guchar));
+ break;
+
+ case G_TYPE_INT:
+@@ -254,7 +254,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_INT_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_INT_SORT_KEYS_CLASS,
+ sizeof (int),
+- sizeof (int));
++ G_ALIGNOF (int));
+ break;
+
+ case G_TYPE_UINT:
+@@ -263,7 +263,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_UINT_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_UINT_SORT_KEYS_CLASS,
+ sizeof (guint),
+- sizeof (guint));
++ G_ALIGNOF (guint));
+ break;
+
+ case G_TYPE_FLOAT:
+@@ -272,7 +272,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_FLOAT_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_FLOAT_SORT_KEYS_CLASS,
+ sizeof (float),
+- sizeof (float));
++ G_ALIGNOF (float));
+ break;
+
+ case G_TYPE_DOUBLE:
+@@ -281,7 +281,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_DOUBLE_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_DOUBLE_SORT_KEYS_CLASS,
+ sizeof (double),
+- sizeof (double));
++ G_ALIGNOF (double));
+ break;
+
+ case G_TYPE_LONG:
+@@ -290,7 +290,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_LONG_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_LONG_SORT_KEYS_CLASS,
+ sizeof (long),
+- sizeof (long));
++ G_ALIGNOF (long));
+ break;
+
+ case G_TYPE_ULONG:
+@@ -299,7 +299,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_ULONG_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_ULONG_SORT_KEYS_CLASS,
+ sizeof (gulong),
+- sizeof (gulong));
++ G_ALIGNOF (gulong));
+ break;
+
+ case G_TYPE_INT64:
+@@ -308,7 +308,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_INT64_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_INT64_SORT_KEYS_CLASS,
+ sizeof (gint64),
+- sizeof (gint64));
++ G_ALIGNOF (gint64));
+ break;
+
+ case G_TYPE_UINT64:
+@@ -317,7 +317,7 @@ gtk_numeric_sort_keys_new (GtkNumericSorter *self)
+ ? &GTK_ASCENDING_UINT64_SORT_KEYS_CLASS
+ : &GTK_DESCENDING_UINT64_SORT_KEYS_CLASS,
+ sizeof (guint64),
+- sizeof (guint64));
++ G_ALIGNOF (guint64));
+ break;
+
+ default:
+diff --git a/gtk/gtksorter.c b/gtk/gtksorter.c
+index 2de29554ec..18bf950cf6 100644
+--- a/gtk/gtksorter.c
++++ b/gtk/gtksorter.c
+@@ -304,7 +304,7 @@ gtk_sorter_get_keys (GtkSorter *self)
+ if (priv->keys)
+ return gtk_sort_keys_ref (priv->keys);
+
+- fallback = gtk_sort_keys_new (GtkDefaultSortKeys, &GTK_DEFAULT_SORT_KEYS_CLASS, sizeof (gpointer), sizeof (gpointer));
++ fallback = gtk_sort_keys_new (GtkDefaultSortKeys, &GTK_DEFAULT_SORT_KEYS_CLASS, sizeof (gpointer), G_ALIGNOF (gpointer));
+ fallback->sorter = g_object_ref (self);
+
+ return (GtkSortKeys *) fallback;
+diff --git a/gtk/gtkstringsorter.c b/gtk/gtkstringsorter.c
+index 70739509e2..17c46b4436 100644
+--- a/gtk/gtkstringsorter.c
++++ b/gtk/gtkstringsorter.c
+@@ -234,7 +234,7 @@ gtk_string_sort_keys_new (GtkStringSorter *self)
+ result = gtk_sort_keys_new (GtkStringSortKeys,
+ &GTK_STRING_SORT_KEYS_CLASS,
+ sizeof (char *),
+- sizeof (char *));
++ G_ALIGNOF (char *));
+
+ result->expression = gtk_expression_ref (self->expression);
+ result->ignore_case = self->ignore_case;
+diff --git a/gtk/gtktreelistrowsorter.c b/gtk/gtktreelistrowsorter.c
+index d7932cb067..6503948a89 100644
+--- a/gtk/gtktreelistrowsorter.c
++++ b/gtk/gtktreelistrowsorter.c
+@@ -350,7 +350,7 @@ gtk_tree_list_row_sort_keys_new (GtkTreeListRowSorter *self)
+ result = gtk_sort_keys_new (GtkTreeListRowSortKeys,
+ &GTK_TREE_LIST_ROW_SORT_KEYS_CLASS,
+ sizeof (gpointer[MAX_KEY_DEPTH]),
+- sizeof (gpointer[MAX_KEY_DEPTH]));
++ G_ALIGNOF (gpointer));
+
+ if (self->sorter)
+ result->sort_keys = gtk_sorter_get_keys (self->sorter);
+--
+2.41.0
+
diff --git a/gui-libs/gtk/gtk-4.10.4.ebuild b/gui-libs/gtk/gtk-4.10.4.ebuild
index 5624e17877cc..79ae3bf49fc8 100644
--- a/gui-libs/gtk/gtk-4.10.4.ebuild
+++ b/gui-libs/gtk/gtk-4.10.4.ebuild
@@ -96,6 +96,11 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}"/${PV}-gtk-Pass-G_ALIGNOF-.-to-gtk_sort_keys_new.patch
+ "${FILESDIR}"/${PV}-gtk-Align-key_size-up-to-key_align.patch
+)
+
python_check_deps() {
python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
}