summaryrefslogtreecommitdiff
path: root/app-i18n/ibus
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /app-i18n/ibus
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'app-i18n/ibus')
-rw-r--r--app-i18n/ibus/Manifest3
-rw-r--r--app-i18n/ibus/files/ibus-1.5.26-src-Fix-refcounting-issues.patch273
-rw-r--r--app-i18n/ibus/ibus-1.5.26-r1.ebuild (renamed from app-i18n/ibus/ibus-1.5.26.ebuild)6
3 files changed, 280 insertions, 2 deletions
diff --git a/app-i18n/ibus/Manifest b/app-i18n/ibus/Manifest
index 9624330e8a26..24f20ab547e7 100644
--- a/app-i18n/ibus/Manifest
+++ b/app-i18n/ibus/Manifest
@@ -1,6 +1,7 @@
AUX ibus-1.5.25-ibusimcontext.patch 1440 BLAKE2B 500b9e26933cd174c476a6ed16af43d1c85631276d182bdd8f80118a54be785655c5638f09de0caaf845bf6fe9f48e07bbfcee8cc64f8c0acd9767c557c093e2 SHA512 fda744135768e4aa2e2bb7dc9d2cad6a92d7653a2e96cf5a69b757637e875b649284523b8c55e142ff3b2db85a8c3b27dc23dc7cef135eada69f485ba88024ea
+AUX ibus-1.5.26-src-Fix-refcounting-issues.patch 9275 BLAKE2B c9035aa6877848cd8f23f10390b4d7976db67b95ec36e7b391fd09fdfc986b65025a47477be15cf0b3c0c8c42455238989dc7e7bd09a3f63193d7a6cdf0caff0 SHA512 4905b18eb0148e0e5f567badf9046b9613fe1079510e34bfaf5313d1fc62409ce0b7ef76d7cd19524a83543ee48d1e0ff57da52e1e4a660ea9bc5b178e965aac
DIST ibus-1.5.25.tar.gz 3669787 BLAKE2B 0a568c77d29dfbe0c2c8cdbe8c8ae86b69c7a1a5fa692cf05e9ce13894fcee200c41de91ec0ad88ae9e745e3061b9c92b7fd18641bd297f5bf4a9bc308ace983 SHA512 4b8955a20a1e5a0daf61213817a9697874439866e235e6a7905f5994b145cd5a143e6cfc41f17204a828756baeb8edab70698596731ecebf7f1eea7cc5f36aa6
DIST ibus-1.5.26.tar.gz 3715263 BLAKE2B 80eb293b028d431b76c015c6d6d9fea92888554f6f34ec126853df189746d9976569ec2380146187d13337a011668b1f15fc57a95284658c8afc7824a67b5898 SHA512 923607c17114af673dcc36532fb44a278b61161ee1b7d4e01b2e0dcffc40c95eb91c6416acc9c0da0333e933863e15263e9a5ff1e467cfc02b71398d601b9714
EBUILD ibus-1.5.25-r1.ebuild 4554 BLAKE2B d556e48be48939664695c425fd5ead30ad0c5f2e93950d257050f1a6ca89fee3c8b74965637eabf84aefcc69191f36e7d395c7d2900af28928e1c1db5a66e44a SHA512 477391216467e331eef285c8abdd65f38db9fe26439606f89bd33402b394607163189f38020c464c7917b12a258a6f543541f93ebc9ddac6eb30acd69c957e39
-EBUILD ibus-1.5.26.ebuild 5449 BLAKE2B c6a403a110cf1a653e811195c25aba459b2638eab778c0069f696c4fb3531f354e9fdd262b9b99117be712b203ea1b79670b245e020e890b50e1a8e204c2b20c SHA512 c426c8c4fd017a741ab407de272c396aa7502079fec5949fcff74ae21a056170f85662f03386159bfaa7ed57701fefd4eb8fe078656c0a3f115ee3fb654dda19
+EBUILD ibus-1.5.26-r1.ebuild 5517 BLAKE2B 8ab94787fb929811f9c847e9e7d3922530296775720e4db2bc4fcb81cbfd493736e611dec631a65ef022db32f6548c808f57ff519a9fe7a0d4120480f7296c33 SHA512 3bd1f6ac74f027d963a27e4db2b874aa16e232cddd61f0f7a768a62e454d26da33f03c7c13c65ad386420677ebd3356a6bc618be2b0b1e6e6732f01b01f98da9
MISC metadata.xml 989 BLAKE2B 9103c61af6f3766fa483864877a674455d0a47a2e7fc1e7ef0f62d835e1f57d6c71816737c64938babd5f29a7228d67f64c1d7aaaae0e9b10cc793ed373a698c SHA512 1552ed06ec527f6c9868b2b006b1d5d7bdc7101d34d4c4438eba6de74f398744a2720e31f73dc203f034631aa900db0a2ad8d429a67e577b69005cda1440f1ef
diff --git a/app-i18n/ibus/files/ibus-1.5.26-src-Fix-refcounting-issues.patch b/app-i18n/ibus/files/ibus-1.5.26-src-Fix-refcounting-issues.patch
new file mode 100644
index 000000000000..5bd610024a1b
--- /dev/null
+++ b/app-i18n/ibus/files/ibus-1.5.26-src-Fix-refcounting-issues.patch
@@ -0,0 +1,273 @@
+https://github.com/ibus/ibus/issues/2387
+https://bugs.gentoo.org/843725
+
+From 17648f0522910480b6c5dd4f5356ca1f6c160bf5 Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg@gnome.org>
+Date: Tue, 29 Mar 2022 22:48:19 +0200
+Subject: [PATCH] src: Fix refcounting issues
+
+Commit 5a455b1ead attempted to fix both GLib warnings around
+floating references and other presumed refcounting issues. However
+it missed 2 kinds of bugs:
+
+- The places that take an IBusText created from a static string
+ were made to avoid freeing it afterwards, but the staticness refers
+ to the string content, not the object itself.
+- The places that are documented to emit signals on floating object
+ references used to do the following after signal emission:
+
+ if (g_object_is_floating (object))
+ g_object_unref (object)
+
+ And did possibly trigger GLib warnings were changed to:
+
+ if (g_object_is_floating (object))
+ g_object_sink_ref (object);
+ g_object_unref (object);
+
+ Which fixes the GLib warning for floating references, but do
+ unintendedly steal one reference away for non floating references.
+
+This commit is essentially a revert of commit 5a455b1ead, but
+addressing both things differently:
+
+- All label/tooltip/symbol IBusText properties in IBusProperty do
+ now always sink the reference of the stored object.
+
+- All places documented as maybe using objects with a floating reference
+ on signals changed to doing:
+
+ if (g_object_is_floating (object)) {
+ g_object_ref_sink (object);
+ g_object_unref (object);
+ }
+
+ So the floating reference is owned and unreferenced without warnings,
+ but already owned references are left unchanged.
+
+This addresses the possible GLib warnings, fixes the possible double
+unrefs happening on IBusText used in signals, and fixes the missing
+unrefs on IBusText objects created from static strings.
+
+BUG=https://github.com/ibus/ibus/issues/2393
+BUG=https://github.com/ibus/ibus/issues/2387
+---
+ src/ibusinputcontext.c | 35 +++++++++++++++++++++--------------
+ src/ibusproperty.c | 32 +++++++++++++++++---------------
+ 2 files changed, 38 insertions(+), 29 deletions(-)
+
+diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c
+index 4b27551b..7981de38 100644
+--- a/src/ibusinputcontext.c
++++ b/src/ibusinputcontext.c
+@@ -549,9 +549,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
+ g_variant_unref (variant);
+ g_signal_emit (context, context_signals[COMMIT_TEXT], 0, text);
+
+- if (g_object_is_floating (text))
++ if (g_object_is_floating (text)) {
+ g_object_ref_sink (text);
+- g_object_unref (text);
++ g_object_unref (text);
++ }
+ return;
+ }
+ if (g_strcmp0 (signal_name, "UpdatePreeditText") == 0) {
+@@ -569,9 +570,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
+ cursor_pos,
+ visible);
+
+- if (g_object_is_floating (text))
++ if (g_object_is_floating (text)) {
+ g_object_ref_sink (text);
+- g_object_unref (text);
++ g_object_unref (text);
++ }
+ return;
+ }
+ if (g_strcmp0 (signal_name, "UpdatePreeditTextWithMode") == 0) {
+@@ -592,9 +594,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
+ visible,
+ mode);
+
+- if (g_object_is_floating (text))
++ if (g_object_is_floating (text)) {
+ g_object_ref_sink (text);
+- g_object_unref (text);
++ g_object_unref (text);
++ }
+ return;
+ }
+
+@@ -621,9 +624,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
+ 0,
+ text,
+ visible);
+- if (g_object_is_floating (text))
++ if (g_object_is_floating (text)) {
+ g_object_ref_sink (text);
+- g_object_unref (text);
++ g_object_unref (text);
++ }
+ return;
+ }
+
+@@ -640,9 +644,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
+ 0,
+ table,
+ visible);
+- if (g_object_is_floating (table))
++ if (g_object_is_floating (table)) {
+ g_object_ref_sink (table);
+- g_object_unref (table);
++ g_object_unref (table);
++ }
+ return;
+
+ }
+@@ -659,9 +664,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
+ 0,
+ prop_list);
+
+- if (g_object_is_floating (prop_list))
++ if (g_object_is_floating (prop_list)) {
+ g_object_ref_sink (prop_list);
+- g_object_unref (prop_list);
++ g_object_unref (prop_list);
++ }
+ return;
+ }
+
+@@ -673,9 +679,10 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
+
+ g_signal_emit (context, context_signals[UPDATE_PROPERTY], 0, prop);
+
+- if (g_object_is_floating (prop))
++ if (g_object_is_floating (prop)) {
+ g_object_ref_sink (prop);
+- g_object_unref (prop);
++ g_object_unref (prop);
++ }
+ return;
+ }
+
+diff --git a/src/ibusproperty.c b/src/ibusproperty.c
+index 6d4ed088..cd8a0e2a 100644
+--- a/src/ibusproperty.c
++++ b/src/ibusproperty.c
+@@ -336,20 +336,17 @@ ibus_property_destroy (IBusProperty *prop)
+ prop->priv->icon = NULL;
+
+ if (prop->priv->label) {
+- if (!ibus_text_get_is_static (prop->priv->label))
+- g_object_unref (prop->priv->label);
++ g_object_unref (prop->priv->label);
+ prop->priv->label = NULL;
+ }
+
+ if (prop->priv->symbol) {
+- if (!ibus_text_get_is_static (prop->priv->symbol))
+- g_object_unref (prop->priv->symbol);
++ g_object_unref (prop->priv->symbol);
+ prop->priv->symbol = NULL;
+ }
+
+ if (prop->priv->tooltip) {
+- if (!ibus_text_get_is_static (prop->priv->tooltip))
+- g_object_unref (prop->priv->tooltip);
++ g_object_unref (prop->priv->tooltip);
+ prop->priv->tooltip = NULL;
+ }
+
+@@ -404,7 +401,7 @@ ibus_property_deserialize (IBusProperty *prop,
+ g_variant_get_child (variant, retval++, "u", &prop->priv->type);
+
+ GVariant *subvar = g_variant_get_child_value (variant, retval++);
+- if (prop->priv->label && !ibus_text_get_is_static (prop->priv->label)) {
++ if (prop->priv->label) {
+ g_object_unref (prop->priv->label);
+ }
+ prop->priv->label = IBUS_TEXT (ibus_serializable_deserialize (subvar));
+@@ -414,7 +411,7 @@ ibus_property_deserialize (IBusProperty *prop,
+ ibus_g_variant_get_child_string (variant, retval++, &prop->priv->icon);
+
+ subvar = g_variant_get_child_value (variant, retval++);
+- if (prop->priv->tooltip && !ibus_text_get_is_static (prop->priv->tooltip)) {
++ if (prop->priv->tooltip) {
+ g_object_unref (prop->priv->tooltip);
+ }
+ prop->priv->tooltip = IBUS_TEXT (ibus_serializable_deserialize (subvar));
+@@ -435,7 +432,7 @@ ibus_property_deserialize (IBusProperty *prop,
+
+ /* Keep the serialized order for the compatibility when add new members. */
+ subvar = g_variant_get_child_value (variant, retval++);
+- if (prop->priv->symbol && !ibus_text_get_is_static (prop->priv->symbol)) {
++ if (prop->priv->symbol) {
+ g_object_unref (prop->priv->symbol);
+ }
+ prop->priv->symbol = IBUS_TEXT (ibus_serializable_deserialize (subvar));
+@@ -567,7 +564,7 @@ ibus_property_set_label (IBusProperty *prop,
+ g_assert (IBUS_IS_PROPERTY (prop));
+ g_return_if_fail (label == NULL || IBUS_IS_TEXT (label));
+
+- if (prop->priv->label && !ibus_text_get_is_static (prop->priv->label)) {
++ if (prop->priv->label) {
+ g_object_unref (prop->priv->label);
+ }
+
+@@ -575,8 +572,10 @@ ibus_property_set_label (IBusProperty *prop,
+ prop->priv->label = ibus_text_new_from_static_string ("");
+ }
+ else {
+- prop->priv->label = g_object_ref_sink (label);
++ prop->priv->label = label;
+ }
++
++ g_object_ref_sink (prop->priv->label);
+ }
+
+ void
+@@ -586,7 +585,7 @@ ibus_property_set_symbol (IBusProperty *prop,
+ g_assert (IBUS_IS_PROPERTY (prop));
+ g_return_if_fail (symbol == NULL || IBUS_IS_TEXT (symbol));
+
+- if (prop->priv->symbol && !ibus_text_get_is_static (prop->priv->symbol)) {
++ if (prop->priv->symbol) {
+ g_object_unref (prop->priv->symbol);
+ }
+
+@@ -594,8 +593,10 @@ ibus_property_set_symbol (IBusProperty *prop,
+ prop->priv->symbol = ibus_text_new_from_static_string ("");
+ }
+ else {
+- prop->priv->symbol = g_object_ref_sink (symbol);
++ prop->priv->symbol = symbol;
+ }
++
++ g_object_ref_sink (prop->priv->symbol);
+ }
+
+ void
+@@ -615,7 +616,7 @@ ibus_property_set_tooltip (IBusProperty *prop,
+ g_assert (IBUS_IS_PROPERTY (prop));
+ g_assert (tooltip == NULL || IBUS_IS_TEXT (tooltip));
+
+- if (prop->priv->tooltip && !ibus_text_get_is_static (prop->priv->tooltip)) {
++ if (prop->priv->tooltip) {
+ g_object_unref (prop->priv->tooltip);
+ }
+
+@@ -624,8 +625,9 @@ ibus_property_set_tooltip (IBusProperty *prop,
+ }
+ else {
+ prop->priv->tooltip = tooltip;
+- g_object_ref_sink (prop->priv->tooltip);
+ }
++
++ g_object_ref_sink (prop->priv->tooltip);
+ }
+
+ void
+--
+2.35.1
+
diff --git a/app-i18n/ibus/ibus-1.5.26.ebuild b/app-i18n/ibus/ibus-1.5.26-r1.ebuild
index 93ead550b71b..47f1c6bd63f4 100644
--- a/app-i18n/ibus/ibus-1.5.26.ebuild
+++ b/app-i18n/ibus/ibus-1.5.26-r1.ebuild
@@ -18,7 +18,7 @@ SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86"
IUSE="X appindicator +emoji gtk2 +gtk3 +gtk4 +gui +introspection nls +python systemd test +unicode vala wayland"
RESTRICT="!test? ( test )"
REQUIRED_USE="
@@ -77,6 +77,10 @@ BDEPEND="
nls? ( sys-devel/gettext )
unicode? ( app-i18n/unicode-data )"
+PATCHES=(
+ "${FILESDIR}"/${P}-src-Fix-refcounting-issues.patch
+)
+
src_prepare() {
vala_src_prepare --ignore-use
sed -i "/UCD_DIR=/s/\$with_emoji_annotation_dir/\$with_ucd_dir/" configure.ac