summaryrefslogtreecommitdiff
path: root/app-i18n/ibus-pinyin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /app-i18n/ibus-pinyin
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'app-i18n/ibus-pinyin')
-rw-r--r--app-i18n/ibus-pinyin/Manifest2
-rw-r--r--app-i18n/ibus-pinyin/files/ibus-pinyin-1.5.0-python3.patch91
-rw-r--r--app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r4.ebuild51
3 files changed, 144 insertions, 0 deletions
diff --git a/app-i18n/ibus-pinyin/Manifest b/app-i18n/ibus-pinyin/Manifest
index 86cff88efbaa..1b2a944d2fbc 100644
--- a/app-i18n/ibus-pinyin/Manifest
+++ b/app-i18n/ibus-pinyin/Manifest
@@ -1,5 +1,7 @@
AUX ibus-pinyin-1.5.0-content-type-method.patch 5534 BLAKE2B 658a4d099b02b344f38a9ef2fc2df0d2274dcd3b8071fac0aef0accbf7c21f0d4e98b9587d665b13195d7efc04bbf58218de84069a2c63eaa79156363061dd86 SHA512 3399052f0d12eb55554d5cc98637125e6648a56f3dc87eb2fadc63af3fb82bba915e820c51596d9106637f6a063100f217ad001422a61f8925db5c5b2024c976
+AUX ibus-pinyin-1.5.0-python3.patch 2983 BLAKE2B 35f8b1d0649a3614fcecec78b3246dcecd8b40f68d71165b2c40d802bb42bff1d8f3f4c2c1baf25fc6ca97e190f7eb2004054f4d9857b605129b45c41b273f52 SHA512 c9eda6fb227358c8214ba717f6d800f3c47f9110e99e16601966651bd698cd703daedcec82a2933b76701bc05870ff88715a6d639333b5e5959c1f5e86e2dcff
AUX ibus-pinyin-boost.patch 409 BLAKE2B 5fececc7f4ed6941d374799ccdb1d9d7deeeb7078bedc8d0085e12f8310c42d752c14168a7d07a88e9412fa9cbff5c5bdf4274202d2ed6b6e7f337a96c65c3f0 SHA512 8e4efe9b5d12d35672dd8891a49599bef6611aeb723e8fbc08197896e417cca1d55cf31a0bb1f3ec572db489b01aa36349eaf9238d1a693483d6e21bc10eab2e
DIST ibus-pinyin-1.5.0.tar.gz 692516 BLAKE2B ae53eb79ea4e5336347d689814d8ef033551a9b432268e643927b28911da3d03701acb3f337d7781168461c1c53537f2271fc8f253d1e99a269f61ae5eb83b05 SHA512 b0cd849ee3154543747dde8994eec9aed01d67e0d9be308a2f0230cf22f0281cd8fcabd9763b24238547a37e54400bcd8e541937767b93f005d04302f0c00241
EBUILD ibus-pinyin-1.5.0-r3.ebuild 1180 BLAKE2B 6aa0f69342db4a3227b65ab86338e627af2a29bbb9422f8a0b4460ffda63d6ed5ab99ed6887fb2f7e65ed2cf2dd665e2585232ebc224b0104e474ae25221864c SHA512 c648d2a7968822dfda6d2d3f1ea449029e21bbb0a806a7b986846428b0da2c715d4ebda3c01e4c821b1fa88206dc19bc47a72e6ac7f2d9007371c4e73408aca4
+EBUILD ibus-pinyin-1.5.0-r4.ebuild 1172 BLAKE2B 9987063795b673129cb453114c3bbb71dbf3131a24c7651b245e70c165564618458f13632b7a296aa0c3aa76e4089aa7f47652c2665e4b1105e25782854e2e8e SHA512 5ccafb4471c60ac898ea219478968eef7860f9bfb1e1ec239ad2432ac04b1f7c9a7d418bcc0161e72e9e4991854158b35942c22428917fa9f4006840e0696817
MISC metadata.xml 675 BLAKE2B 53ddd9a158adba18b4bbb56af1f1e75013c61ea23c245703489b677ed3a5eefd1fb0bba28b4269c5bff4ca6453ea5bb4027b0904f21ee89ecc2ca0d5c7041b52 SHA512 87c1743bc802f22de1d2441403b00eaee1a834730ee1b9f3c3ae62728fdc7073bbe01faec464042243ac7dea1ce11aca709bd5d836fca3c09ccb77c64ea27aea
diff --git a/app-i18n/ibus-pinyin/files/ibus-pinyin-1.5.0-python3.patch b/app-i18n/ibus-pinyin/files/ibus-pinyin-1.5.0-python3.patch
new file mode 100644
index 000000000000..03988ee0ab7e
--- /dev/null
+++ b/app-i18n/ibus-pinyin/files/ibus-pinyin-1.5.0-python3.patch
@@ -0,0 +1,91 @@
+commit 616770084991de0f36bea7b5861ef1b1657c9a31
+Author: ZhaoQiang <zhaoqiang@gnome.org>
+Date: Mon Nov 19 19:35:10 2018 +0800
+
+ Update ibus-setup-pinyin.in: to avoid ibus-pinyin-setup crash in pure python3 env.
+
+diff --git a/configure.ac b/configure.ac
+index aa6242a..ca99a6f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,6 +82,11 @@ AC_PATH_PROG(ENV_IBUS_TEST, env)
+ AC_SUBST(ENV_IBUS_TEST)
+
+ # check python
++AC_ARG_WITH(python,
++ AS_HELP_STRING([--with-python[=PATH]],
++ [Select python2 or python3]),
++ [PYTHON=$with_python], []
++)
+ AM_PATH_PYTHON([2.5])
+
+ # --enable-boost
+diff --git a/setup/ibus-setup-pinyin.in b/setup/ibus-setup-pinyin.in
+index 2566737..314072c 100644
+--- a/setup/ibus-setup-pinyin.in
++++ b/setup/ibus-setup-pinyin.in
+@@ -26,5 +26,5 @@ export IBUS_PREFIX=@prefix@
+ export IBUS_DATAROOTDIR=@datarootdir@
+ export IBUS_LOCALEDIR=@localedir@
+ cd @prefix@/share/ibus-pinyin/setup/
+-exec python main.py $@
++exec @PYTHON@ main.py $@
+
+diff --git a/setup/main.py b/setup/main.py
+index fb27103..2e4051a 100644
+--- a/setup/main.py
++++ b/setup/main.py
+@@ -20,15 +20,21 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
++from __future__ import print_function
++
+ import gettext
+ import locale
+ import os
+ import sys
+
++from gi import require_version as gi_require_version
++gi_require_version('GLib', '2.0')
++gi_require_version('Gtk', '3.0')
++gi_require_version('IBus', '1.0')
++
+ from gi.repository import GLib
+ from gi.repository import Gtk
+ from gi.repository import IBus
+-from xdg import BaseDirectory
+
+ import version
+
+@@ -250,8 +256,8 @@ class PreferencesDialog:
+
+ def __correct_pinyin_toggled_cb(widget):
+ val = widget.get_active()
+- map(lambda w: self.__builder.get_object(w[0]).set_sensitive(val),
+- self.__correct_pinyin_widgets)
++ for w in self.__correct_pinyin_widgets:
++ self.__builder.get_object(w[0]).set_sensitive(val)
+ self.__correct_pinyin.connect("toggled", __correct_pinyin_toggled_cb)
+
+ # init value
+@@ -300,8 +306,8 @@ class PreferencesDialog:
+
+ def __fuzzy_pinyin_toggled_cb(widget):
+ val = widget.get_active()
+- map(lambda w: self.__builder.get_object(w[0]).set_sensitive(val),
+- self.__fuzzy_pinyin_widgets)
++ for w in self.__fuzzy_pinyin_widgets:
++ self.__builder.get_object(w[0]).set_sensitive(val)
+ self.__fuzzy_pinyin.connect("toggled", __fuzzy_pinyin_toggled_cb)
+
+ # init value
+@@ -404,7 +410,7 @@ class PreferencesDialog:
+ elif isinstance(val, str):
+ var = GLib.Variant.new_string(val)
+ else:
+- print >> sys.stderr, "val(%s) is not in support type." % repr(val)
++ print("val(%s) is not in support type." % repr(val), file=sys.stderr)
+ return
+
+ self.__values[name] = val
diff --git a/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r4.ebuild b/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r4.ebuild
new file mode 100644
index 000000000000..2ff6a6240e33
--- /dev/null
+++ b/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r4.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 python3_{6,7,8})
+
+inherit autotools python-single-r1
+
+DESCRIPTION="Chinese Pinyin and Bopomofo engines for IBus"
+HOMEPAGE="https://github.com/ibus/ibus/wiki"
+SRC_URI="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ibus/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="boost lua nls"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ app-i18n/pyzy
+ dev-db/sqlite:3
+ $(python_gen_cond_dep '
+ app-i18n/ibus[python(+),${PYTHON_MULTI_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
+ ')
+ boost? ( dev-libs/boost )
+ lua? ( =dev-lang/lua-5.1*:= )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/autoconf-archive
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-boost.patch
+ "${FILESDIR}"/${P}-content-type-method.patch
+ "${FILESDIR}"/${P}-python3.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable boost) \
+ $(use_enable lua lua-extension) \
+ $(use_enable nls)
+}