Accepting request 758043 from home:qzhao:branches:M17N
Add ibus-delete-weak-pointer-for-vala-0.43.4.patch:Backport this fix from upstream, To make ibus-1.5.19 in openSUSE:Leap:15.2 can success build with vala-0.43.4(bnc#1159079). OBS-URL: https://build.opensuse.org/request/show/758043 OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=213
This commit is contained in:
parent
1bb112b7ea
commit
f2d76af08e
186
ibus-delete-weak-pointer-for-vala-0.43.4.patch
Normal file
186
ibus-delete-weak-pointer-for-vala-0.43.4.patch
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
From 97df388ca4fd39f35ee56c4125eb2c63c94d7b78 Mon Sep 17 00:00:00 2001
|
||||||
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||||
|
Date: Tue, 29 Jan 2019 17:57:16 +0900
|
||||||
|
Subject: [PATCH 1/1] update
|
||||||
|
|
||||||
|
---
|
||||||
|
src/ibusbus.h | 11 ++++++-----
|
||||||
|
src/ibusemoji.h | 6 +++---
|
||||||
|
src/ibusunicode.h | 8 ++++----
|
||||||
|
ui/gtk3/emojier.vala | 24 ++++++++++++++++--------
|
||||||
|
4 files changed, 29 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/ibusbus.h b/src/ibusbus.h
|
||||||
|
index dff3dfb7..fddcf5b2 100644
|
||||||
|
--- a/src/ibusbus.h
|
||||||
|
+++ b/src/ibusbus.h
|
||||||
|
@@ -2,7 +2,8 @@
|
||||||
|
/* vim:set et sts=4: */
|
||||||
|
/* ibus - The Input Bus
|
||||||
|
* Copyright (C) 2008-2013 Peng Huang <shawn.p.huang@gmail.com>
|
||||||
|
- * Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
+ * Copyright (C) 2013-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
||||||
|
+ * Copyright (C) 2008-2019 Red Hat, Inc.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@@ -692,7 +693,7 @@ gboolean ibus_bus_register_component_async_finish
|
||||||
|
*
|
||||||
|
* List engines synchronously.
|
||||||
|
*
|
||||||
|
- * Returns: (transfer container) (element-type IBusEngineDesc):
|
||||||
|
+ * Returns: (transfer full) (element-type IBusEngineDesc):
|
||||||
|
* A List of engines.
|
||||||
|
*/
|
||||||
|
GList *ibus_bus_list_engines (IBusBus *bus);
|
||||||
|
@@ -725,7 +726,7 @@ void ibus_bus_list_engines_async
|
||||||
|
*
|
||||||
|
* Finishes an operation started with ibus_bus_list_engines_async().
|
||||||
|
*
|
||||||
|
- * Returns: (transfer container) (element-type IBusEngineDesc):
|
||||||
|
+ * Returns: (transfer full) (element-type IBusEngineDesc):
|
||||||
|
* A List of engines.
|
||||||
|
*/
|
||||||
|
GList *ibus_bus_list_engines_async_finish
|
||||||
|
@@ -740,7 +741,7 @@ GList *ibus_bus_list_engines_async_finish
|
||||||
|
*
|
||||||
|
* List active engines synchronously.
|
||||||
|
*
|
||||||
|
- * Returns: (transfer container) (element-type IBusEngineDesc):
|
||||||
|
+ * Returns: (transfer full) (element-type IBusEngineDesc):
|
||||||
|
* A List of active engines.
|
||||||
|
*
|
||||||
|
* Deprecated: 1.5.3: Read dconf value
|
||||||
|
@@ -782,7 +783,7 @@ void ibus_bus_list_active_engines_async
|
||||||
|
*
|
||||||
|
* Finishes an operation started with ibus_bus_list_active_engines_async().
|
||||||
|
*
|
||||||
|
- * Returns: (transfer container) (element-type IBusEngineDesc):
|
||||||
|
+ * Returns: (transfer full) (element-type IBusEngineDesc):
|
||||||
|
* A List of active engines.
|
||||||
|
*
|
||||||
|
* Deprecated: 1.5.3: Read dconf value
|
||||||
|
diff --git a/src/ibusemoji.h b/src/ibusemoji.h
|
||||||
|
index 4edee726..5e9fbcf4 100644
|
||||||
|
--- a/src/ibusemoji.h
|
||||||
|
+++ b/src/ibusemoji.h
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
||||||
|
/* vim:set et sts=4: */
|
||||||
|
/* bus - The Input Bus
|
||||||
|
- * Copyright (C) 2017 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
||||||
|
- * Copyright (C) 2017 Red Hat, Inc.
|
||||||
|
+ * Copyright (C) 2017-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
||||||
|
+ * Copyright (C) 2017-2019 Red Hat, Inc.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@@ -209,7 +209,7 @@ void ibus_emoji_data_save (const gchar *path,
|
||||||
|
* ibus_emoji_data_load:
|
||||||
|
* @path: A path of the saved dictionary file.
|
||||||
|
*
|
||||||
|
- * Returns: (element-type IBusEmojiData) (transfer container):
|
||||||
|
+ * Returns: (element-type IBusEmojiData) (transfer full):
|
||||||
|
* An #IBusEmojiData list loaded from the saved cache file.
|
||||||
|
*/
|
||||||
|
GSList * ibus_emoji_data_load (const gchar *path);
|
||||||
|
diff --git a/src/ibusunicode.h b/src/ibusunicode.h
|
||||||
|
index 99de9451..473bdb19 100644
|
||||||
|
--- a/src/ibusunicode.h
|
||||||
|
+++ b/src/ibusunicode.h
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
||||||
|
/* vim:set et sts=4: */
|
||||||
|
/* bus - The Input Bus
|
||||||
|
- * Copyright (C) 2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
||||||
|
- * Copyright (C) 2018 Red Hat, Inc.
|
||||||
|
+ * Copyright (C) 2018-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
||||||
|
+ * Copyright (C) 2018-2019 Red Hat, Inc.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@@ -201,7 +201,7 @@ void ibus_unicode_data_save (const gchar *path,
|
||||||
|
* #IBusUnicodeData, * the total number of #IBusUnicodeData) of uint values
|
||||||
|
* with that signal by 100 times. Otherwise %NULL.
|
||||||
|
*
|
||||||
|
- * Returns: (element-type IBusUnicodeData) (transfer container):
|
||||||
|
+ * Returns: (element-type IBusUnicodeData) (transfer full):
|
||||||
|
* An #IBusUnicodeData list loaded from the saved cache file.
|
||||||
|
*/
|
||||||
|
GSList * ibus_unicode_data_load (const gchar *path,
|
||||||
|
@@ -290,7 +290,7 @@ void ibus_unicode_block_save (const gchar *path,
|
||||||
|
* ibus_unicode_block_load:
|
||||||
|
* @path: A path of the saved dictionary file.
|
||||||
|
*
|
||||||
|
- * Returns: (element-type IBusUnicodeBlock) (transfer container):
|
||||||
|
+ * Returns: (element-type IBusUnicodeBlock) (transfer full):
|
||||||
|
* An #IBusUnicodeBlock list loaded from the saved cache file.
|
||||||
|
*/
|
||||||
|
GSList * ibus_unicode_block_load (const gchar *path);
|
||||||
|
diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala
|
||||||
|
index 85dcdceb..e6c3ef9f 100644
|
||||||
|
--- a/ui/gtk3/emojier.vala
|
||||||
|
+++ b/ui/gtk3/emojier.vala
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
*
|
||||||
|
* ibus - The Input Bus
|
||||||
|
*
|
||||||
|
- * Copyright (c) 2017-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
||||||
|
+ * Copyright (c) 2017-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@@ -912,8 +912,13 @@ public class IBusEmojier : Gtk.ApplicationWindow {
|
||||||
|
update_unicode_blocks();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
- unowned GLib.SList<unowned string> emojis =
|
||||||
|
- m_category_to_emojis_dict.lookup(category);
|
||||||
|
+ // Use copy_deep() since vala 0.43.4 does not allow to assign
|
||||||
|
+ // a weak pointer to the full one in SList:
|
||||||
|
+ // emojier.vala:885.48-886.62: error: Assignment: Cannot convert
|
||||||
|
+ // from `GLib.SList<string>' to `GLib.SList<weak string>?'
|
||||||
|
+ GLib.SList<string> emojis =
|
||||||
|
+ m_category_to_emojis_dict.lookup(category).copy_deep(
|
||||||
|
+ GLib.strdup);
|
||||||
|
m_lookup_table.clear();
|
||||||
|
m_candidate_panel_mode = true;
|
||||||
|
foreach (unowned string emoji in emojis) {
|
||||||
|
@@ -1577,8 +1582,8 @@ public class IBusEmojier : Gtk.ApplicationWindow {
|
||||||
|
m_vbox.add(widget);
|
||||||
|
widget.show_all();
|
||||||
|
}
|
||||||
|
- unowned GLib.SList<unowned string>? annotations =
|
||||||
|
- data.get_annotations();
|
||||||
|
+ GLib.SList<string> annotations =
|
||||||
|
+ data.get_annotations().copy_deep(GLib.strdup);
|
||||||
|
var buff = new GLib.StringBuilder();
|
||||||
|
int i = 0;
|
||||||
|
foreach (unowned string annotation in annotations) {
|
||||||
|
@@ -2094,17 +2099,20 @@ public class IBusEmojier : Gtk.ApplicationWindow {
|
||||||
|
) as IBus.EmojiData;
|
||||||
|
m_emoji_to_data_dict.insert(favorite, new_data);
|
||||||
|
} else {
|
||||||
|
- unowned GLib.SList<string> annotations = data.get_annotations();
|
||||||
|
+ GLib.SList<string> annotations =
|
||||||
|
+ data.get_annotations().copy_deep(GLib.strdup);
|
||||||
|
if (annotations.find_custom(annotation, GLib.strcmp) == null) {
|
||||||
|
annotations.append(annotation);
|
||||||
|
- data.set_annotations(annotations.copy());
|
||||||
|
+ data.set_annotations(annotations.copy_deep(GLib.strdup));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unowned GLib.SList<string> emojis =
|
||||||
|
m_annotation_to_emojis_dict.lookup(annotation);
|
||||||
|
if (emojis.find_custom(favorite, GLib.strcmp) == null) {
|
||||||
|
emojis.append(favorite);
|
||||||
|
- m_annotation_to_emojis_dict.replace(annotation, emojis.copy());
|
||||||
|
+ m_annotation_to_emojis_dict.replace(
|
||||||
|
+ annotation,
|
||||||
|
+ emojis.copy_deep(GLib.strdup));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 18 07:49:54 UTC 2019 - Cliff Zhao <qzhao@suse.com>
|
||||||
|
|
||||||
|
- Add ibus-delete-weak-pointer-for-vala-0.43.4.patch:
|
||||||
|
Backport this fix from upstream, To make ibus-1.5.19 can success
|
||||||
|
build with vala-0.43.4 and later editions(bnc#1159079).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 20 05:31:52 UTC 2019 - Cliff Zhao <qzhao@suse.com>
|
Fri Sep 20 05:31:52 UTC 2019 - Cliff Zhao <qzhao@suse.com>
|
||||||
|
|
||||||
|
10
ibus.spec
10
ibus.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package ibus
|
# spec file for package ibus
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 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
|
||||||
@ -63,6 +63,10 @@ Patch12: ibus-disable-engines-preload-in-GNOME.patch
|
|||||||
|
|
||||||
Patch13: ibus-CVE-2019-14822-GDBusServer-peer-authorization.patch
|
Patch13: ibus-CVE-2019-14822-GDBusServer-peer-authorization.patch
|
||||||
|
|
||||||
|
# PATCH-FIX-UPSTREAM ibus-delete-weak-pointer-for-vala-0.43.4.patch bnc#1159079 qzhao@suse.com
|
||||||
|
# Backport from upstream to support vala-0.43.4 and later edition, this fix is only for avoid the building failure.
|
||||||
|
Patch14: ibus-delete-weak-pointer-for-vala-0.43.4.patch
|
||||||
|
|
||||||
BuildRequires: dbus-1-glib-devel
|
BuildRequires: dbus-1-glib-devel
|
||||||
BuildRequires: dconf-devel >= 0.7.5
|
BuildRequires: dconf-devel >= 0.7.5
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -195,6 +199,10 @@ cp -r %{SOURCE11} .
|
|||||||
|
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
|
|
||||||
|
%if 0%{?sle_version} >= 150200
|
||||||
|
%patch14 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
%configure --disable-static \
|
%configure --disable-static \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-ibus
|
# spec file for package python-ibus
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 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
|
||||||
|
Loading…
Reference in New Issue
Block a user