Gentoo Archives: gentoo-commits

From: Akinori Hattori <hattya@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/ibus/, app-i18n/ibus/files/
Date: Tue, 28 Aug 2018 12:57:57
Message-Id: 1535461049.02d5c896c9451a96c4b949ccb0286b8e5ca0073e.hattya@gentoo
1 commit: 02d5c896c9451a96c4b949ccb0286b8e5ca0073e
2 Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 28 12:55:22 2018 +0000
4 Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 28 12:57:29 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02d5c896
7
8 app-i18n/ibus: new upstream release
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 app-i18n/ibus/Manifest | 1 +
13 app-i18n/ibus/files/ibus-1.5.19-gdk-wayland.patch | 88 ++++++++++
14 app-i18n/ibus/ibus-1.5.19.ebuild | 187 ++++++++++++++++++++++
15 3 files changed, 276 insertions(+)
16
17 diff --git a/app-i18n/ibus/Manifest b/app-i18n/ibus/Manifest
18 index 1290bc19446..8d1ff04e919 100644
19 --- a/app-i18n/ibus/Manifest
20 +++ b/app-i18n/ibus/Manifest
21 @@ -1,3 +1,4 @@
22 DIST ibus-1.5.12.tar.gz 2190284 BLAKE2B 57ac7f9e8e8f0419bad1bf3aa629282ef3c0188d29e98bc872e594955f69e0863020d600c674cabed56db156a85210b5b3c1fe137b135395a27d2535e4938164 SHA512 a443bf0d1b71a52c18e7d13a0c69f38c48f6924cfb1669912880b87be1bf41bcb7d8d6252aafd6799e43d41c081fd94cf334fd836a0505c93a4e5c5b68241c81
23 DIST ibus-1.5.16.tar.gz 2375719 BLAKE2B cf4cbd4556e43403c73da3cd2cb9f6da8e0baf5f90b3bc74f6d12c1bad057198ed828053dcbb3ddfd28c37d9011b6166e834385720aa827a68f594dbd4cf9298 SHA512 494ead69cf9c0111fd25fd1de27e796d89db4f08443afa1ec469f638469b25d8b19a59ea7ab0db0f3a130b9a89b3f2819667099ba38fc973d6efc61b367ce237
24 DIST ibus-1.5.18.tar.gz 2760121 BLAKE2B dfcf549362ac9ac0cb9adb9cedc3fd7146877a42e0e086ad7be18ccb6239868ed940d2c371d83c2e2706c7120702af0bcb0106da60889f0b3d5857b8929b9165 SHA512 34519c3464eaf2cac3320e1568fc76f4edb281afa70f335c015b828ff4e86b3224d77b95cdc0b2e76e42459c54b1044264ff226963fe739dd553ac7326d2f2d3
25 +DIST ibus-1.5.19.tar.gz 2842274 BLAKE2B a5aea4770c1c0a58a9e0b1aa26f47a8ab9eb5060a0c06179663984c5b531464ff4575a8ece2f2ee2122f777ca615296c1e46ad4833c68ba2da038f2b85dea374 SHA512 ddcd464c9afb6d081df1cfac65069506877eb4818c3ba5594bcf76f3c6795ef6c17177a778dc89b2ef69d10d87297aa12c8e04f156b750e500b51b32787bd9fc
26
27 diff --git a/app-i18n/ibus/files/ibus-1.5.19-gdk-wayland.patch b/app-i18n/ibus/files/ibus-1.5.19-gdk-wayland.patch
28 new file mode 100644
29 index 00000000000..8eed29daf39
30 --- /dev/null
31 +++ b/app-i18n/ibus/files/ibus-1.5.19-gdk-wayland.patch
32 @@ -0,0 +1,88 @@
33 +From aa0f4252ff965729b871c91b4ed089bf98963c0b Mon Sep 17 00:00:00 2001
34 +From: fujiwarat <takao.fujiwara1@×××××.com>
35 +Date: Fri, 10 Aug 2018 15:43:58 +0900
36 +Subject: [PATCH] ui/gtk3: Check if gdk-wayland is installed
37 +
38 +BUG=https://github.com/ibus/ibus/issues/2035
39 +---
40 + configure.ac | 10 ++++++++++
41 + ui/gtk3/Makefile.am | 5 ++++-
42 + ui/gtk3/panelbinding.vala | 5 +++++
43 + 3 files changed, 19 insertions(+), 1 deletion(-)
44 +
45 +diff --git a/configure.ac b/configure.ac
46 +index 091e20f2..4b6a7a21 100644
47 +--- a/configure.ac
48 ++++ b/configure.ac
49 +@@ -237,12 +237,21 @@ if test x"$enable_gtk3" = x"yes"; then
50 + PKG_CHECK_MODULES(GTK3, [
51 + gtk+-3.0
52 + ])
53 ++ PKG_CHECK_EXISTS([gdk-wayland-3.0],
54 ++ [enable_gdk3_wayland=yes],
55 ++ [enable_gdk3_wayland=no]
56 ++ )
57 +
58 + gtk3_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
59 + GTK3_IM_MODULEDIR="$libdir"/gtk-3.0/$gtk3_binary_version/immodules
60 + else
61 + enable_gtk3="no (disabled, use --enable-gtk3 to enable)"
62 ++ enable_gdk3_wayland=no
63 ++fi
64 ++if test x"$enable_gdk3_wayland" != x"yes"; then
65 ++ enable_gdk3_wayland="no (disabled, need to install gdk-wayland-3.0.pc)"
66 + fi
67 ++AM_CONDITIONAL([ENABLE_GDK3_WAYLAND], [test x"$enable_gdk3_wayland" = x"yes"])
68 +
69 + if test x"$enable_xim" = x"yes"; then
70 + # Check for x11
71 +@@ -785,6 +794,7 @@ Build options:
72 + Build gtk3 immodule $enable_gtk3
73 + Build XIM agent server $enable_xim
74 + Build wayland support $enable_wayland
75 ++ Build gdk3 wayland support $enable_gdk3_wayland
76 + Build appindicator support $enable_appindicator
77 + Build appindicator engine icon $enable_appindicator_engine_icon
78 + Build python library $enable_python_library
79 +diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am
80 +index aaba7a4d..6ebc96ce 100644
81 +--- a/ui/gtk3/Makefile.am
82 ++++ b/ui/gtk3/Makefile.am
83 +@@ -78,7 +78,6 @@ AM_VALAFLAGS = \
84 + --pkg=ibus-1.0 \
85 + --pkg=config \
86 + --pkg=xi \
87 +- --pkg=gdk-wayland \
88 + --target-glib="$(VALA_TARGET_GLIB_VERSION)" \
89 + $(NULL)
90 +
91 +@@ -105,6 +104,10 @@ if ENABLE_APPINDICATOR_ENGINE_ICON
92 + AM_VALAFLAGS += --define=INDICATOR_ENGINE_ICON
93 + endif
94 +
95 ++if ENABLE_GDK3_WAYLAND
96 ++AM_VALAFLAGS += --pkg=gdk-wayland --define=USE_GDK_WAYLAND
97 ++endif
98 ++
99 + libexec_PROGRAMS = ibus-ui-gtk3
100 +
101 + ibus_ui_gtk3_SOURCES = \
102 +diff --git a/ui/gtk3/panelbinding.vala b/ui/gtk3/panelbinding.vala
103 +index 95115b13..981b5509 100644
104 +--- a/ui/gtk3/panelbinding.vala
105 ++++ b/ui/gtk3/panelbinding.vala
106 +@@ -237,9 +237,14 @@ class PanelBinding : IBus.PanelService {
107 + GLib.Object(connection : bus.get_connection(),
108 + object_path : IBus.PATH_PANEL_EXTENSION_EMOJI);
109 +
110 ++#if USE_GDK_WAYLAND
111 + Type instance_type = Gdk.Display.get_default().get_type();
112 + Type wayland_type = typeof(GdkWayland.Display);
113 + m_is_wayland = instance_type.is_a(wayland_type);
114 ++#else
115 ++ m_is_wayland = false;
116 ++ warning("Checking Wayland is disabled");
117 ++#endif
118 +
119 + m_bus = bus;
120 + m_application = application;
121
122 diff --git a/app-i18n/ibus/ibus-1.5.19.ebuild b/app-i18n/ibus/ibus-1.5.19.ebuild
123 new file mode 100644
124 index 00000000000..f318087a003
125 --- /dev/null
126 +++ b/app-i18n/ibus/ibus-1.5.19.ebuild
127 @@ -0,0 +1,187 @@
128 +# Copyright 1999-2018 Gentoo Foundation
129 +# Distributed under the terms of the GNU General Public License v2
130 +
131 +EAPI="6"
132 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
133 +VALA_MIN_API_VERSION="0.34"
134 +VALA_USE_DEPEND="vapigen"
135 +
136 +inherit autotools bash-completion-r1 gnome2-utils python-r1 vala virtualx xdg-utils
137 +
138 +DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
139 +HOMEPAGE="https://github.com/ibus/ibus/wiki"
140 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
141 +
142 +LICENSE="LGPL-2.1"
143 +SLOT="0"
144 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
145 +IUSE="+X +emoji gconf +gtk +gtk2 +introspection kde +libnotify nls +python test +unicode vala wayland"
146 +REQUIRED_USE="emoji? ( gtk )
147 + gtk2? ( gtk )
148 + kde? ( gtk )
149 + libnotify? ( gtk )
150 + python? (
151 + ${PYTHON_REQUIRED_USE}
152 + introspection
153 + )
154 + test? ( gtk )
155 + vala? ( introspection )"
156 +
157 +CDEPEND="app-text/iso-codes
158 + dev-libs/glib:2
159 + gnome-base/dconf
160 + gnome-base/librsvg:2
161 + sys-apps/dbus[X?]
162 + X? (
163 + x11-libs/libX11
164 + !gtk? ( x11-libs/gtk+:2 )
165 + )
166 + gconf? ( gnome-base/gconf:2 )
167 + gtk? (
168 + x11-libs/gtk+:3
169 + x11-libs/libX11
170 + x11-libs/libXi
171 + gtk2? ( x11-libs/gtk+:2 )
172 + )
173 + introspection? ( dev-libs/gobject-introspection )
174 + kde? ( dev-qt/qtgui:5 )
175 + libnotify? ( x11-libs/libnotify )
176 + nls? ( virtual/libintl )
177 + python? (
178 + ${PYTHON_DEPS}
179 + dev-python/pygobject:3[${PYTHON_USEDEP}]
180 + )
181 + wayland? (
182 + dev-libs/wayland
183 + x11-libs/libxkbcommon
184 + )"
185 +RDEPEND="${CDEPEND}
186 + python? (
187 + gtk? (
188 + x11-libs/gtk+:3[introspection]
189 + )
190 + )"
191 +DEPEND="${CDEPEND}
192 + $(vala_depend)
193 + dev-util/intltool
194 + virtual/pkgconfig
195 + emoji? (
196 + app-i18n/unicode-cldr
197 + app-i18n/unicode-emoji
198 + )
199 + nls? ( sys-devel/gettext )
200 + unicode? ( app-i18n/unicode-data )"
201 +
202 +PATCHES=( "${FILESDIR}"/${P}-gdk-wayland.patch )
203 +
204 +src_prepare() {
205 + vala_src_prepare --ignore-use
206 + sed -i "/UCD_DIR=/s/\$with_emoji_annotation_dir/\$with_ucd_dir/" configure.ac
207 + if ! has_version 'x11-libs/gtk+:3[wayland]'; then
208 + touch ui/gtk3/panelbinding.vala
209 + fi
210 + if ! use emoji; then
211 + touch \
212 + tools/main.vala \
213 + ui/gtk3/panel.vala
214 + fi
215 + if ! use kde; then
216 + touch ui/gtk3/panel.vala
217 + fi
218 + if ! use libnotify; then
219 + touch ui/gtk3/panel.vala
220 + fi
221 + # for multiple Python implementations
222 + sed -i "s/^\(PYGOBJECT_DIR =\).*/\1/" bindings/Makefile.am
223 + # fix for parallel install
224 + sed -i "/^if ENABLE_PYTHON2/,/^endif/d" bindings/pygobject/Makefile.am
225 + # require user interaction
226 + sed -i "/^TESTS += ibus-\(compose\|keypress\)/d" src/tests/Makefile.am
227 +
228 + sed -i "/^bash_completion/d" tools/Makefile.am
229 +
230 + default
231 + eautoreconf
232 + xdg_environment_reset
233 +}
234 +
235 +src_configure() {
236 + local unicodedir="${EPREFIX}"/usr/share/unicode
237 + local python_conf=()
238 + if use python; then
239 + python_setup
240 + python_conf+=(
241 + $(use_enable gtk setup)
242 + --with-python=${EPYTHON}
243 + )
244 + else
245 + python_conf+=( --disable-setup )
246 + fi
247 +
248 + econf \
249 + $(use_enable X xim) \
250 + $(use_enable emoji emoji-dict) \
251 + $(use_with emoji unicode-emoji-dir "${unicodedir}"/emoji) \
252 + $(use_with emoji emoji-annotation-dir "${unicodedir}"/cldr/common/annotations) \
253 + $(use_enable gconf) \
254 + $(use_enable gtk gtk3) \
255 + $(use_enable gtk ui) \
256 + $(use_enable gtk2) \
257 + $(use_enable introspection) \
258 + $(use_enable kde appindicator) \
259 + $(use_enable libnotify) \
260 + $(use_enable nls) \
261 + $(use_enable test tests) \
262 + $(use_enable unicode unicode-dict) \
263 + $(use_with unicode ucd-dir "${EPREFIX}/usr/share/unicode-data") \
264 + $(use_enable vala) \
265 + $(use_enable wayland) \
266 + "${python_conf[@]}"
267 +}
268 +
269 +src_test() {
270 + unset DBUS_SESSION_BUS_ADDRESS
271 + virtx emake -j1 check
272 +}
273 +
274 +src_install() {
275 + default
276 + find "${ED}" -name '*.la' -delete || die
277 +
278 + if use python; then
279 + python_install() {
280 + emake -C bindings/pygobject \
281 + pyoverridesdir="$(${EPYTHON} -c 'import gi; print(gi._overridesdir)')" \
282 + DESTDIR="${D}" \
283 + install
284 + }
285 + python_foreach_impl python_install
286 + fi
287 +
288 + keepdir /usr/share/ibus/engine
289 +
290 + newbashcomp tools/${PN}.bash ${PN}
291 +
292 + insinto /etc/X11/xinit/xinput.d
293 + newins xinput-${PN} ${PN}.conf
294 +}
295 +
296 +pkg_preinst() {
297 + use gconf && gnome2_gconf_savelist
298 +}
299 +
300 +pkg_postinst() {
301 + use gconf && gnome2_gconf_install
302 + use gtk && gnome2_query_immodules_gtk3
303 + use gtk2 && gnome2_query_immodules_gtk2
304 + gnome2_icon_cache_update
305 + gnome2_schemas_update
306 + dconf update
307 +}
308 +
309 +pkg_postrm() {
310 + use gtk && gnome2_query_immodules_gtk3
311 + use gtk2 && gnome2_query_immodules_gtk2
312 + gnome2_icon_cache_update
313 + gnome2_schemas_update
314 +}