1 |
commit: 4967740ab488283e7caf3e4e651bc00e2eaf689e |
2 |
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 25 12:43:07 2019 +0000 |
4 |
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 25 12:45:08 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4967740a |
7 |
|
8 |
app-i18n/ibus: fix build with >=dev-lang/vala-0.43.4 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/677972 |
11 |
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org> |
12 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
13 |
|
14 |
app-i18n/ibus/files/ibus-1.5.19-vala-0.43.4.patch | 191 ++++++++++++++++++++++ |
15 |
app-i18n/ibus/ibus-1.5.19.ebuild | 6 +- |
16 |
2 files changed, 195 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/app-i18n/ibus/files/ibus-1.5.19-vala-0.43.4.patch b/app-i18n/ibus/files/ibus-1.5.19-vala-0.43.4.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..0ebb92c21e5 |
21 |
--- /dev/null |
22 |
+++ b/app-i18n/ibus/files/ibus-1.5.19-vala-0.43.4.patch |
23 |
@@ -0,0 +1,191 @@ |
24 |
+From 4d7c1e00e15921a0448947961183c1c124b6b49f Mon Sep 17 00:00:00 2001 |
25 |
+From: fujiwarat <takao.fujiwara1@×××××.com> |
26 |
+Date: Tue, 29 Jan 2019 17:57:16 +0900 |
27 |
+Subject: [PATCH] Delete weak pointer in GList.SList for vala 0.43.4 |
28 |
+ |
29 |
+Vala 0.43.4 does not allow to convert a weak pointer to the full one in SList. |
30 |
+ |
31 |
+emojier.vala:424.36-425.73: error: Assignment: Cannot convert from |
32 |
+`GLib.SList<weak IBus.EmojiData>' to `GLib.SList<IBus.EmojiData>?' |
33 |
+emojier.vala:636.9-637.69: error: Assignment: Cannot convert from |
34 |
+`GLib.SList<weak IBus.UnicodeBlock>' to `GLib.SList<IBus.UnicodeBlock>' |
35 |
+panel.vala:526.36-526.65: error: Assignment: Cannot convert from |
36 |
+`GLib.List<weak IBus.EngineDesc>' to `GLib.List<IBus.EngineDesc>?' |
37 |
+--- |
38 |
+ src/ibusbus.h | 11 ++++++----- |
39 |
+ src/ibusemoji.h | 6 +++--- |
40 |
+ src/ibusunicode.h | 8 ++++---- |
41 |
+ ui/gtk3/emojier.vala | 24 ++++++++++++++++-------- |
42 |
+ 4 files changed, 29 insertions(+), 20 deletions(-) |
43 |
+ |
44 |
+diff --git a/src/ibusbus.h b/src/ibusbus.h |
45 |
+index dff3dfb7..fddcf5b2 100644 |
46 |
+--- a/src/ibusbus.h |
47 |
++++ b/src/ibusbus.h |
48 |
+@@ -2,7 +2,8 @@ |
49 |
+ /* vim:set et sts=4: */ |
50 |
+ /* ibus - The Input Bus |
51 |
+ * Copyright (C) 2008-2013 Peng Huang <shawn.p.huang@×××××.com> |
52 |
+- * Copyright (C) 2008-2013 Red Hat, Inc. |
53 |
++ * Copyright (C) 2013-2019 Takao Fujiwara <takao.fujiwara1@×××××.com> |
54 |
++ * Copyright (C) 2008-2019 Red Hat, Inc. |
55 |
+ * |
56 |
+ * This library is free software; you can redistribute it and/or |
57 |
+ * modify it under the terms of the GNU Lesser General Public |
58 |
+@@ -692,7 +693,7 @@ gboolean ibus_bus_register_component_async_finish |
59 |
+ * |
60 |
+ * List engines synchronously. |
61 |
+ * |
62 |
+- * Returns: (transfer container) (element-type IBusEngineDesc): |
63 |
++ * Returns: (transfer full) (element-type IBusEngineDesc): |
64 |
+ * A List of engines. |
65 |
+ */ |
66 |
+ GList *ibus_bus_list_engines (IBusBus *bus); |
67 |
+@@ -725,7 +726,7 @@ void ibus_bus_list_engines_async |
68 |
+ * |
69 |
+ * Finishes an operation started with ibus_bus_list_engines_async(). |
70 |
+ * |
71 |
+- * Returns: (transfer container) (element-type IBusEngineDesc): |
72 |
++ * Returns: (transfer full) (element-type IBusEngineDesc): |
73 |
+ * A List of engines. |
74 |
+ */ |
75 |
+ GList *ibus_bus_list_engines_async_finish |
76 |
+@@ -740,7 +741,7 @@ GList *ibus_bus_list_engines_async_finish |
77 |
+ * |
78 |
+ * List active engines synchronously. |
79 |
+ * |
80 |
+- * Returns: (transfer container) (element-type IBusEngineDesc): |
81 |
++ * Returns: (transfer full) (element-type IBusEngineDesc): |
82 |
+ * A List of active engines. |
83 |
+ * |
84 |
+ * Deprecated: 1.5.3: Read dconf value |
85 |
+@@ -782,7 +783,7 @@ void ibus_bus_list_active_engines_async |
86 |
+ * |
87 |
+ * Finishes an operation started with ibus_bus_list_active_engines_async(). |
88 |
+ * |
89 |
+- * Returns: (transfer container) (element-type IBusEngineDesc): |
90 |
++ * Returns: (transfer full) (element-type IBusEngineDesc): |
91 |
+ * A List of active engines. |
92 |
+ * |
93 |
+ * Deprecated: 1.5.3: Read dconf value |
94 |
+diff --git a/src/ibusemoji.h b/src/ibusemoji.h |
95 |
+index 4edee726..5e9fbcf4 100644 |
96 |
+--- a/src/ibusemoji.h |
97 |
++++ b/src/ibusemoji.h |
98 |
+@@ -1,8 +1,8 @@ |
99 |
+ /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ |
100 |
+ /* vim:set et sts=4: */ |
101 |
+ /* bus - The Input Bus |
102 |
+- * Copyright (C) 2017 Takao Fujiwara <takao.fujiwara1@×××××.com> |
103 |
+- * Copyright (C) 2017 Red Hat, Inc. |
104 |
++ * Copyright (C) 2017-2019 Takao Fujiwara <takao.fujiwara1@×××××.com> |
105 |
++ * Copyright (C) 2017-2019 Red Hat, Inc. |
106 |
+ * |
107 |
+ * This library is free software; you can redistribute it and/or |
108 |
+ * modify it under the terms of the GNU Lesser General Public |
109 |
+@@ -209,7 +209,7 @@ void ibus_emoji_data_save (const gchar *path, |
110 |
+ * ibus_emoji_data_load: |
111 |
+ * @path: A path of the saved dictionary file. |
112 |
+ * |
113 |
+- * Returns: (element-type IBusEmojiData) (transfer container): |
114 |
++ * Returns: (element-type IBusEmojiData) (transfer full): |
115 |
+ * An #IBusEmojiData list loaded from the saved cache file. |
116 |
+ */ |
117 |
+ GSList * ibus_emoji_data_load (const gchar *path); |
118 |
+diff --git a/src/ibusunicode.h b/src/ibusunicode.h |
119 |
+index 99de9451..473bdb19 100644 |
120 |
+--- a/src/ibusunicode.h |
121 |
++++ b/src/ibusunicode.h |
122 |
+@@ -1,8 +1,8 @@ |
123 |
+ /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ |
124 |
+ /* vim:set et sts=4: */ |
125 |
+ /* bus - The Input Bus |
126 |
+- * Copyright (C) 2018 Takao Fujiwara <takao.fujiwara1@×××××.com> |
127 |
+- * Copyright (C) 2018 Red Hat, Inc. |
128 |
++ * Copyright (C) 2018-2019 Takao Fujiwara <takao.fujiwara1@×××××.com> |
129 |
++ * Copyright (C) 2018-2019 Red Hat, Inc. |
130 |
+ * |
131 |
+ * This library is free software; you can redistribute it and/or |
132 |
+ * modify it under the terms of the GNU Lesser General Public |
133 |
+@@ -201,7 +201,7 @@ void ibus_unicode_data_save (const gchar *path, |
134 |
+ * #IBusUnicodeData, * the total number of #IBusUnicodeData) of uint values |
135 |
+ * with that signal by 100 times. Otherwise %NULL. |
136 |
+ * |
137 |
+- * Returns: (element-type IBusUnicodeData) (transfer container): |
138 |
++ * Returns: (element-type IBusUnicodeData) (transfer full): |
139 |
+ * An #IBusUnicodeData list loaded from the saved cache file. |
140 |
+ */ |
141 |
+ GSList * ibus_unicode_data_load (const gchar *path, |
142 |
+@@ -290,7 +290,7 @@ void ibus_unicode_block_save (const gchar *path, |
143 |
+ * ibus_unicode_block_load: |
144 |
+ * @path: A path of the saved dictionary file. |
145 |
+ * |
146 |
+- * Returns: (element-type IBusUnicodeBlock) (transfer container): |
147 |
++ * Returns: (element-type IBusUnicodeBlock) (transfer full): |
148 |
+ * An #IBusUnicodeBlock list loaded from the saved cache file. |
149 |
+ */ |
150 |
+ GSList * ibus_unicode_block_load (const gchar *path); |
151 |
+diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala |
152 |
+index 0b9b54a9..aedeb4cb 100644 |
153 |
+--- a/ui/gtk3/emojier.vala |
154 |
++++ b/ui/gtk3/emojier.vala |
155 |
+@@ -2,7 +2,7 @@ |
156 |
+ * |
157 |
+ * ibus - The Input Bus |
158 |
+ * |
159 |
+- * Copyright (c) 2017-2018 Takao Fujiwara <takao.fujiwara1@×××××.com> |
160 |
++ * Copyright (c) 2017-2019 Takao Fujiwara <takao.fujiwara1@×××××.com> |
161 |
+ * |
162 |
+ * This library is free software; you can redistribute it and/or |
163 |
+ * modify it under the terms of the GNU Lesser General Public |
164 |
+@@ -882,8 +882,13 @@ public class IBusEmojier : Gtk.ApplicationWindow { |
165 |
+ update_unicode_blocks(); |
166 |
+ return; |
167 |
+ } else { |
168 |
+- unowned GLib.SList<unowned string> emojis = |
169 |
+- m_category_to_emojis_dict.lookup(category); |
170 |
++ // Use copy_deep() since vala 0.43.4 does not allow to assign |
171 |
++ // a weak pointer to the full one in SList: |
172 |
++ // emojier.vala:885.48-886.62: error: Assignment: Cannot convert |
173 |
++ // from `GLib.SList<string>' to `GLib.SList<weak string>?' |
174 |
++ GLib.SList<string> emojis = |
175 |
++ m_category_to_emojis_dict.lookup(category).copy_deep( |
176 |
++ GLib.strdup); |
177 |
+ m_lookup_table.clear(); |
178 |
+ m_candidate_panel_mode = true; |
179 |
+ foreach (unowned string emoji in emojis) { |
180 |
+@@ -1547,8 +1552,8 @@ public class IBusEmojier : Gtk.ApplicationWindow { |
181 |
+ m_vbox.add(widget); |
182 |
+ widget.show_all(); |
183 |
+ } |
184 |
+- unowned GLib.SList<unowned string>? annotations = |
185 |
+- data.get_annotations(); |
186 |
++ GLib.SList<string> annotations = |
187 |
++ data.get_annotations().copy_deep(GLib.strdup); |
188 |
+ var buff = new GLib.StringBuilder(); |
189 |
+ int i = 0; |
190 |
+ foreach (unowned string annotation in annotations) { |
191 |
+@@ -2001,17 +2006,20 @@ public class IBusEmojier : Gtk.ApplicationWindow { |
192 |
+ ) as IBus.EmojiData; |
193 |
+ m_emoji_to_data_dict.insert(favorite, new_data); |
194 |
+ } else { |
195 |
+- unowned GLib.SList<string> annotations = data.get_annotations(); |
196 |
++ GLib.SList<string> annotations = |
197 |
++ data.get_annotations().copy_deep(GLib.strdup); |
198 |
+ if (annotations.find_custom(annotation, GLib.strcmp) == null) { |
199 |
+ annotations.append(annotation); |
200 |
+- data.set_annotations(annotations.copy()); |
201 |
++ data.set_annotations(annotations.copy_deep(GLib.strdup)); |
202 |
+ } |
203 |
+ } |
204 |
+ unowned GLib.SList<string> emojis = |
205 |
+ m_annotation_to_emojis_dict.lookup(annotation); |
206 |
+ if (emojis.find_custom(favorite, GLib.strcmp) == null) { |
207 |
+ emojis.append(favorite); |
208 |
+- m_annotation_to_emojis_dict.replace(annotation, emojis.copy()); |
209 |
++ m_annotation_to_emojis_dict.replace( |
210 |
++ annotation, |
211 |
++ emojis.copy_deep(GLib.strdup)); |
212 |
+ } |
213 |
+ } |
214 |
+ } |
215 |
|
216 |
diff --git a/app-i18n/ibus/ibus-1.5.19.ebuild b/app-i18n/ibus/ibus-1.5.19.ebuild |
217 |
index d39593776ec..c04593084bc 100644 |
218 |
--- a/app-i18n/ibus/ibus-1.5.19.ebuild |
219 |
+++ b/app-i18n/ibus/ibus-1.5.19.ebuild |
220 |
@@ -4,7 +4,6 @@ |
221 |
EAPI="6" |
222 |
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} ) |
223 |
VALA_MIN_API_VERSION="0.34" |
224 |
-VALA_MAX_API_VERSION="0.36" |
225 |
VALA_USE_DEPEND="vapigen" |
226 |
|
227 |
inherit autotools bash-completion-r1 gnome2-utils python-r1 vala virtualx xdg-utils |
228 |
@@ -74,7 +73,10 @@ DEPEND="${CDEPEND} |
229 |
nls? ( sys-devel/gettext ) |
230 |
unicode? ( app-i18n/unicode-data )" |
231 |
|
232 |
-PATCHES=( "${FILESDIR}"/${P}-gdk-wayland.patch ) |
233 |
+PATCHES=( |
234 |
+ "${FILESDIR}"/${P}-gdk-wayland.patch |
235 |
+ "${FILESDIR}"/${P}-vala-0.43.4.patch |
236 |
+) |
237 |
|
238 |
src_prepare() { |
239 |
vala_src_prepare --ignore-use |