Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/fcitx/files/, app-i18n/fcitx/
Date: Mon, 11 Sep 2017 18:39:42
Message-Id: 1505155158.2a22703601478e267c562cb671dd9e832fb52f2c.floppym@gentoo
1 commit: 2a22703601478e267c562cb671dd9e832fb52f2c
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Mon Sep 11 18:16:05 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 11 18:39:18 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a227036
7
8 app-i18n/fcitx: Version bump (4.2.9.2).
9
10 app-i18n/fcitx/Manifest | 1 +
11 app-i18n/fcitx/fcitx-4.2.9.2.ebuild | 132 +++++++++++++++++++++++
12 app-i18n/fcitx/files/fcitx-4.2.9.2-scripts.patch | 60 +++++++++++
13 3 files changed, 193 insertions(+)
14
15 diff --git a/app-i18n/fcitx/Manifest b/app-i18n/fcitx/Manifest
16 index 722273209a1..65b175e4293 100644
17 --- a/app-i18n/fcitx/Manifest
18 +++ b/app-i18n/fcitx/Manifest
19 @@ -1 +1,2 @@
20 DIST fcitx-4.2.9.1_dict.tar.xz 8684772 SHA256 5337c8226417a1d4e6f88b3b1048aa73695d281ed483568a7b6a9ee849ad6c77 SHA512 5d3b669ed97423f976116385571d07f832e9e18007e6a3c2aef12957219739a81fbf2343825fea4a1b01a83a6bf9e40e9ffa88466c651876602517c6da1fb25d WHIRLPOOL 02b2ff1b0c33b1f2c0461988bc3323ca27ba565a0d8a1f49b96aaceac857c07365aaaee0048d470dea82e60857bedf59ef8c60d3cdfa14a2ff074216d5cdc16d
21 +DIST fcitx-4.2.9.2_dict.tar.xz 8735848 SHA256 2cdd7c138163f717aacca8eabb18a4a823c808a408e4b0770f5be2e3e892de20 SHA512 9228fc4629479e2c518e0d0a7dbe604f6e56e864b41927d120e1f0b7a277ff53ff1b393870480bc1660662751a31885ddc1ddf43133a11edc2e96cbc7701daee WHIRLPOOL 8f19cd9f34a3957ff42e94ca7a5e28db5feecf658e9ca2535430fe6dd7a269ba9833e9273e8fd87d00a426027aebd97741c3fe909d9a0b0577ae6f64a8f4ba75
22
23 diff --git a/app-i18n/fcitx/fcitx-4.2.9.2.ebuild b/app-i18n/fcitx/fcitx-4.2.9.2.ebuild
24 new file mode 100644
25 index 00000000000..45eecfb5735
26 --- /dev/null
27 +++ b/app-i18n/fcitx/fcitx-4.2.9.2.ebuild
28 @@ -0,0 +1,132 @@
29 +# Copyright 1999-2017 Gentoo Foundation
30 +# Distributed under the terms of the GNU General Public License v2
31 +
32 +EAPI="6"
33 +
34 +inherit cmake-utils gnome2-utils xdg-utils
35 +
36 +if [[ "${PV}" == "9999" ]]; then
37 + inherit git-r3
38 +
39 + EGIT_REPO_URI="https://github.com/fcitx/fcitx"
40 +fi
41 +
42 +DESCRIPTION="Fcitx (Flexible Context-aware Input Tool with eXtension) input method framework"
43 +HOMEPAGE="https://fcitx-im.org/ https://github.com/fcitx/fcitx"
44 +if [[ "${PV}" == "9999" ]]; then
45 + SRC_URI=""
46 +else
47 + SRC_URI="https://download.fcitx-im.org/${PN}/${P}_dict.tar.xz"
48 +fi
49 +
50 +LICENSE="GPL-2+ LGPL-2+ MIT"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
53 +IUSE="+X +autostart +cairo debug +enchant gtk2 gtk3 +introspection lua nls opencc +pango qt4 static-libs +table test +xml"
54 +REQUIRED_USE="cairo? ( X ) pango? ( cairo ) qt4? ( X )"
55 +
56 +RDEPEND="dev-libs/glib:2
57 + sys-apps/dbus
58 + virtual/libiconv
59 + virtual/libintl
60 + x11-libs/libxkbcommon
61 + X? (
62 + x11-libs/libX11
63 + x11-libs/libXfixes
64 + x11-libs/libXinerama
65 + x11-libs/libXrender
66 + xml? ( x11-libs/libxkbfile )
67 + )
68 + cairo? (
69 + x11-libs/cairo[X]
70 + x11-libs/libXext
71 + pango? ( x11-libs/pango )
72 + !pango? ( media-libs/fontconfig )
73 + )
74 + enchant? ( app-text/enchant:0= )
75 + gtk2? ( x11-libs/gtk+:2 )
76 + gtk3? ( x11-libs/gtk+:3 )
77 + introspection? ( dev-libs/gobject-introspection )
78 + lua? ( dev-lang/lua:= )
79 + nls? ( sys-devel/gettext )
80 + opencc? ( app-i18n/opencc:= )
81 + qt4? (
82 + dev-qt/qtcore:4
83 + dev-qt/qtdbus:4
84 + dev-qt/qtgui:4
85 + )
86 + xml? (
87 + app-text/iso-codes
88 + dev-libs/libxml2
89 + )"
90 +DEPEND="${RDEPEND}
91 + kde-frameworks/extra-cmake-modules:5
92 + virtual/pkgconfig"
93 +
94 +PATCHES=(
95 + "${FILESDIR}/${P}-scripts.patch"
96 +)
97 +
98 +DOCS=(AUTHORS ChangeLog THANKS)
99 +
100 +src_prepare() {
101 + # https://github.com/fcitx/fcitx/issues/250
102 + sed \
103 + -e "/find_package(XkbFile REQUIRED)/i\\ if(ENABLE_X11)" \
104 + -e "/find_package(XkbFile REQUIRED)/s/^/ /" \
105 + -e "/find_package(XkbFile REQUIRED)/a\\ endif(ENABLE_X11)" \
106 + -i CMakeLists.txt
107 +
108 + cmake-utils_src_prepare
109 + xdg_environment_reset
110 +}
111 +
112 +src_configure() {
113 + local mycmakeargs=(
114 + -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
115 + -DSYSCONFDIR="${EPREFIX}/etc"
116 + -DENABLE_CAIRO=$(usex cairo)
117 + -DENABLE_DEBUG=$(usex debug)
118 + -DENABLE_ENCHANT=$(usex enchant)
119 + -DENABLE_GETTEXT=$(usex nls)
120 + -DENABLE_GIR=$(usex introspection)
121 + -DENABLE_GTK2_IM_MODULE=$(usex gtk2)
122 + -DENABLE_GTK3_IM_MODULE=$(usex gtk3)
123 + -DENABLE_LIBXML2=$(usex xml)
124 + -DENABLE_LUA=$(usex lua)
125 + -DENABLE_OPENCC=$(usex opencc)
126 + -DENABLE_PANGO=$(usex pango)
127 + -DENABLE_QT=$(usex qt4)
128 + -DENABLE_QT_GUI=$(usex qt4)
129 + -DENABLE_QT_IM_MODULE=$(usex qt4)
130 + -DENABLE_SNOOPER=$(if use gtk2 || use gtk3; then echo yes; else echo no; fi)
131 + -DENABLE_STATIC=$(usex static-libs)
132 + -DENABLE_TABLE=$(usex table)
133 + -DENABLE_TEST=$(usex test)
134 + -DENABLE_X11=$(usex X)
135 + -DENABLE_XDGAUTOSTART=$(usex autostart)
136 + )
137 +
138 + cmake-utils_src_configure
139 +}
140 +
141 +src_install() {
142 + cmake-utils_src_install
143 + rm -r "${ED}usr/share/doc/${PN}"
144 +}
145 +
146 +pkg_postinst() {
147 + gnome2_icon_cache_update
148 + xdg_desktop_database_update
149 + xdg_mimeinfo_database_update
150 + use gtk2 && gnome2_query_immodules_gtk2
151 + use gtk3 && gnome2_query_immodules_gtk3
152 +}
153 +
154 +pkg_postrm() {
155 + gnome2_icon_cache_update
156 + xdg_desktop_database_update
157 + xdg_mimeinfo_database_update
158 + use gtk2 && gnome2_query_immodules_gtk2
159 + use gtk3 && gnome2_query_immodules_gtk3
160 +}
161
162 diff --git a/app-i18n/fcitx/files/fcitx-4.2.9.2-scripts.patch b/app-i18n/fcitx/files/fcitx-4.2.9.2-scripts.patch
163 new file mode 100644
164 index 00000000000..a3399767e7b
165 --- /dev/null
166 +++ b/app-i18n/fcitx/files/fcitx-4.2.9.2-scripts.patch
167 @@ -0,0 +1,60 @@
168 +https://github.com/fcitx/fcitx/issues/342
169 +https://github.com/fcitx/fcitx/commit/de4bd3d535736afe061d9ac63fcc897e3ab3237e
170 +
171 +--- /cmake/fcitx-cmake-helper.sh
172 ++++ /cmake/fcitx-cmake-helper.sh
173 +@@ -1,4 +1,4 @@
174 +-#!/bin/bash
175 ++#!/usr/bin/env bash
176 + # Copyright (C) 2012~2013 by Yichao Yu
177 + # yyc1992@×××××.com
178 + #
179 +--- /cmake/fcitx-merge-config.sh
180 ++++ /cmake/fcitx-merge-config.sh
181 +@@ -1,4 +1,4 @@
182 +-#!/bin/sh
183 ++#!/usr/bin/env bash
184 + # Copyright (C) 2012~2012 by Yichao Yu
185 + # yyc1992@×××××.com
186 + #
187 +--- /data/icon/data/gen.sh
188 ++++ /data/icon/data/gen.sh
189 +@@ -1,4 +1,4 @@
190 +-#!/bin/sh
191 ++#!/usr/bin/env bash
192 +
193 + a="$(find scabable/status/ -type f -name \*.svg)"
194 + echo $a
195 +--- /data/script/fcitx-configtool.sh
196 ++++ /data/script/fcitx-configtool.sh
197 +@@ -28,7 +28,7 @@
198 + }
199 + fi
200 +
201 +-if type gettext > /dev/null 2>&1; then
202 ++if which gettext > /dev/null 2>&1; then
203 + _() {
204 + gettext "$@"
205 + }
206 +--- /src/lib/fcitx-utils/gen-hotkey.sh
207 ++++ /src/lib/fcitx-utils/gen-hotkey.sh
208 +@@ -1,7 +1,6 @@
209 + #!/bin/sh
210 +
211 +-function download_file()
212 +-{
213 ++download_file() {
214 + if [ "x$3" != "xf" ]; then
215 + if [ -f $1 ]; then
216 + return
217 +--- /src/ui/classic/fcitx-skin-installer.sh
218 ++++ /src/ui/classic/fcitx-skin-installer.sh
219 +@@ -25,7 +25,7 @@
220 + }
221 + fi
222 +
223 +-if type gettext > /dev/null 2>&1; then
224 ++if which gettext > /dev/null 2>&1; then
225 + _() {
226 + gettext "$@"
227 + }