summaryrefslogtreecommitdiff
path: root/app-i18n/ibus-pinyin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-i18n/ibus-pinyin
reinit the tree, so we can have metadata
Diffstat (limited to 'app-i18n/ibus-pinyin')
-rw-r--r--app-i18n/ibus-pinyin/Manifest7
-rw-r--r--app-i18n/ibus-pinyin/files/ibus-pinyin-1.5.0-content-type-method.patch185
-rw-r--r--app-i18n/ibus-pinyin/files/ibus-pinyin-boost.patch15
-rw-r--r--app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r2.ebuild50
-rw-r--r--app-i18n/ibus-pinyin/metadata.xml22
5 files changed, 279 insertions, 0 deletions
diff --git a/app-i18n/ibus-pinyin/Manifest b/app-i18n/ibus-pinyin/Manifest
new file mode 100644
index 000000000000..df56d57fd454
--- /dev/null
+++ b/app-i18n/ibus-pinyin/Manifest
@@ -0,0 +1,7 @@
+AUX ibus-pinyin-1.5.0-content-type-method.patch 5534 SHA256 5a6de77936dbf2e6c0fd4ab606a12d89b1a51580e93e819f2d6f9500850048ed SHA512 3399052f0d12eb55554d5cc98637125e6648a56f3dc87eb2fadc63af3fb82bba915e820c51596d9106637f6a063100f217ad001422a61f8925db5c5b2024c976 WHIRLPOOL f21d461b79138b450b76bf974a20e1dd0697be7b7e2153e28111734b7f7236e773acbe4d01aac0df8058097021f2f3963b3152033fb9e49bc94c12f389d2e693
+AUX ibus-pinyin-boost.patch 409 SHA256 df30ec6c912e6dc141e5808976fc1e166087985e362c8866087dc5e5a75b305e SHA512 8e4efe9b5d12d35672dd8891a49599bef6611aeb723e8fbc08197896e417cca1d55cf31a0bb1f3ec572db489b01aa36349eaf9238d1a693483d6e21bc10eab2e WHIRLPOOL 7d182ae7ea2b81b3a3ac105e132530485a6f9fb280ec84c01e99b194566244f6b0bac67a1a6db6d130276dcb5e908832ae55c7a473df10cb8f48a6dceaaa5c30
+DIST ibus-pinyin-1.5.0.tar.gz 692516 SHA256 a85d458dcc51ea9fd65849e63002428b3fcb3b39adcbea9214b5cb4a4cbdbc96 SHA512 b0cd849ee3154543747dde8994eec9aed01d67e0d9be308a2f0230cf22f0281cd8fcabd9763b24238547a37e54400bcd8e541937767b93f005d04302f0c00241 WHIRLPOOL 80fd0ec7306d857870a0ceecce67166dd4d03529d5bdc404347dea6568c9b7271dbeb6feeebd8587bb5ab6856cec7f269fe5be9dbad5eb1b4297054eb9cb5ab2
+EBUILD ibus-pinyin-1.5.0-r2.ebuild 1140 SHA256 e80fd9104d4c2069f6c8d7138172e342012e5d42eef839e425389dc604fef586 SHA512 c86e6e49c9c153edf82790c0a3a79b521c9e076db136a97ac2b501e4b5d4321dcd1b787b79540836e620a1a8bb0b28c4610280ebd07d505fe9fa8bd2677cf8ef WHIRLPOOL b403e0f9c278ddd43d338160753ee89c067148e93b0ec587167a6bb21a92bb06d96f894f5b7b6c38eb4b8d91f6ea4032d6878c4d55d3e58571d353d0f195eb8e
+MISC ChangeLog 4541 SHA256 45ac42daf03d7cb1b4b7085829c56543cdae427e3a84d7c08cbfdc36dde74ffb SHA512 a13aae268b3753b71aa64a5e2719471131e87f807490ea3e32f7d99c6ef6540be1b3c6d35633febe2af705060449c97cdc8a1f0b9522d2f964102aac50d31649 WHIRLPOOL 38dd74000fbc9dd93e15b84168717ba466a54d90e3f10623df9d904ad8408ed3d66cc0469d8cfad3fd9aa1037d7d5e219ba4c582d01bc99e7a773b972e58f20f
+MISC ChangeLog-2015 8907 SHA256 8299755418fbba9fab05171339bd861b6224b7d159d3859ea77a383d4cfad5f1 SHA512 820625c9d09348f631da26ae6cfa27ccb7340550acb44ab3ea6d89c470cc7be9b888cb1fa447a6fef506f04d9d7e2be5ead42ae9f879d97474fa8662a1538cd8 WHIRLPOOL 4f0a09396f68dcd90d423e2359ee0bbd5a852b9ed714b5aa8019eaaf847fea272298524a123fbb44334745e0a6accdf6d53de7b93e92fe4288d7ea28ceef2cad
+MISC metadata.xml 675 SHA256 8a2f82704235bdc19a1bbd907ffb9fdab104d9ee72ef2a2bf73f0d120fadc6b9 SHA512 87c1743bc802f22de1d2441403b00eaee1a834730ee1b9f3c3ae62728fdc7073bbe01faec464042243ac7dea1ce11aca709bd5d836fca3c09ccb77c64ea27aea WHIRLPOOL aa5f6c971cc39d6eb8a88698ab8562201173772e3aef309603a74bd6dbfb0a5333873b40bc6643363a4230d98d91e66467faedf2e574e012590f24c6965c2ede
diff --git a/app-i18n/ibus-pinyin/files/ibus-pinyin-1.5.0-content-type-method.patch b/app-i18n/ibus-pinyin/files/ibus-pinyin-1.5.0-content-type-method.patch
new file mode 100644
index 000000000000..737046cfd7c6
--- /dev/null
+++ b/app-i18n/ibus-pinyin/files/ibus-pinyin-1.5.0-content-type-method.patch
@@ -0,0 +1,185 @@
+commit 97565d04e40634a1ab62790f718a8377754d2954
+Author: Peng Wu <alexepico@gmail.com>
+Date: Wed Feb 19 10:57:40 2014 -0500
+
+ support setContentType method
+
+ ibus now supports setContentType method, if an application input some
+ password, the password will not be shown.
+
+ BUG=rhbz#1027029
+ R=Shawn.P.Huang@gmail.com
+
+ Review URL: https://codereview.appspot.com/22330043
+
+ Patch from Peng Wu <alexepico@gmail.com>.
+
+diff --git a/src/PYBopomofoEngine.cc b/src/PYBopomofoEngine.cc
+index 581c4cf..16d47b3 100644
+--- a/src/PYBopomofoEngine.cc
++++ b/src/PYBopomofoEngine.cc
+@@ -72,6 +72,9 @@ BopomofoEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers)
+ {
+ gboolean retval = FALSE;
+
++ if (contentIsPassword())
++ return retval;
++
+ /* check Shift + Release hotkey,
+ * and then ignore other Release key event */
+ if (modifiers & IBUS_RELEASE_MASK) {
+@@ -139,6 +142,8 @@ BopomofoEngine::focusIn (void)
+ void
+ BopomofoEngine::focusOut (void)
+ {
++ Engine::focusOut();
++
+ reset ();
+ }
+
+diff --git a/src/PYEngine.cc b/src/PYEngine.cc
+index d9fa04a..553d13f 100644
+--- a/src/PYEngine.cc
++++ b/src/PYEngine.cc
+@@ -67,6 +67,12 @@ static gboolean ibus_pinyin_engine_process_key_event
+ guint modifiers);
+ static void ibus_pinyin_engine_focus_in (IBusEngine *engine);
+ static void ibus_pinyin_engine_focus_out (IBusEngine *engine);
++#if IBUS_CHECK_VERSION (1, 5, 4)
++static void ibus_pinyin_engine_set_content_type
++ (IBusEngine *engine,
++ guint purpose,
++ guint hints);
++#endif
+ static void ibus_pinyin_engine_reset (IBusEngine *engine);
+ static void ibus_pinyin_engine_enable (IBusEngine *engine);
+ static void ibus_pinyin_engine_disable (IBusEngine *engine);
+@@ -123,6 +129,10 @@ ibus_pinyin_engine_class_init (IBusPinyinEngineClass *klass)
+ engine_class->focus_in = ibus_pinyin_engine_focus_in;
+ engine_class->focus_out = ibus_pinyin_engine_focus_out;
+
++#if IBUS_CHECK_VERSION (1, 5, 4)
++ engine_class->set_content_type = ibus_pinyin_engine_set_content_type;
++#endif
++
+ engine_class->page_up = ibus_pinyin_engine_page_up;
+ engine_class->page_down = ibus_pinyin_engine_page_down;
+
+@@ -182,6 +192,17 @@ ibus_pinyin_engine_process_key_event (IBusEngine *engine,
+ return pinyin->engine->processKeyEvent (keyval, keycode, modifiers);
+ }
+
++#if IBUS_CHECK_VERSION (1, 5, 4)
++static void
++ibus_pinyin_engine_set_content_type (IBusEngine *engine,
++ guint purpose,
++ guint hints)
++{
++ IBusPinyinEngine *pinyin = (IBusPinyinEngine *) engine;
++ return pinyin->engine->setContentType (purpose, hints);
++}
++#endif
++
+ static void
+ ibus_pinyin_engine_property_activate (IBusEngine *engine,
+ const gchar *prop_name,
+@@ -220,6 +241,39 @@ FUNCTION(cursor_up, cursorUp)
+ FUNCTION(cursor_down, cursorDown)
+ #undef FUNCTION
+
++Engine::Engine (IBusEngine *engine) : m_engine (engine)
++{
++#if IBUS_CHECK_VERSION (1, 5, 4)
++ m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM;
++#endif
++}
++
++gboolean
++Engine::contentIsPassword()
++{
++#if IBUS_CHECK_VERSION (1, 5, 4)
++ return IBUS_INPUT_PURPOSE_PASSWORD == m_input_purpose;
++#else
++ return false;
++#endif
++}
++
++void
++Engine::focusOut (void)
++{
++#if IBUS_CHECK_VERSION (1, 5, 4)
++ m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM;
++#endif
++}
++
++#if IBUS_CHECK_VERSION(1, 5, 4)
++void
++Engine::setContentType (guint purpose, guint hints)
++{
++ m_input_purpose = (IBusInputPurpose) purpose;
++}
++#endif
++
+ Engine::~Engine (void)
+ {
+ }
+diff --git a/src/PYEngine.h b/src/PYEngine.h
+index b74e6e8..21041b1 100644
+--- a/src/PYEngine.h
++++ b/src/PYEngine.h
+@@ -37,13 +37,18 @@ GType ibus_pinyin_engine_get_type (void);
+
+ class Engine {
+ public:
+- Engine (IBusEngine *engine) : m_engine (engine) { }
++ Engine (IBusEngine *engine);
+ virtual ~Engine (void);
+
++ gboolean contentIsPassword();
++
+ // virtual functions
+ virtual gboolean processKeyEvent (guint keyval, guint keycode, guint modifiers) = 0;
+ virtual void focusIn (void) = 0;
+- virtual void focusOut (void) = 0;
++ virtual void focusOut (void);
++#if IBUS_CHECK_VERSION (1, 5, 4)
++ virtual void setContentType (guint purpose, guint hints);
++#endif
+ virtual void reset (void) = 0;
+ virtual void enable (void) = 0;
+ virtual void disable (void) = 0;
+@@ -122,6 +127,11 @@ protected:
+
+ protected:
+ Pointer<IBusEngine> m_engine; // engine pointer
++
++#if IBUS_CHECK_VERSION (1, 5, 4)
++ IBusInputPurpose m_input_purpose;
++#endif
++
+ };
+
+ };
+diff --git a/src/PYPinyinEngine.cc b/src/PYPinyinEngine.cc
+index 7aea261..babaaed 100644
+--- a/src/PYPinyinEngine.cc
++++ b/src/PYPinyinEngine.cc
+@@ -82,6 +82,9 @@ PinyinEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers)
+ {
+ gboolean retval = FALSE;
+
++ if (contentIsPassword())
++ return retval;
++
+ /* check Shift + Release hotkey,
+ * and then ignore other Release key event */
+ if (modifiers & IBUS_RELEASE_MASK) {
+@@ -195,6 +198,8 @@ PinyinEngine::focusIn (void)
+ void
+ PinyinEngine::focusOut (void)
+ {
++ Engine::focusOut ();
++
+ reset ();
+ }
+
diff --git a/app-i18n/ibus-pinyin/files/ibus-pinyin-boost.patch b/app-i18n/ibus-pinyin/files/ibus-pinyin-boost.patch
new file mode 100644
index 000000000000..124339e81bf2
--- /dev/null
+++ b/app-i18n/ibus-pinyin/files/ibus-pinyin-boost.patch
@@ -0,0 +1,15 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -93,9 +93,9 @@
+ )
+ if test x"$enable_boost" = x"yes"; then
+ # check boost
+- BOOST_REQUIRE([1.39])
+- BOOST_FIND_HEADER([boost/bind.hpp])
+- BOOST_FIND_HEADER([boost/signals2.hpp])
++ AX_BOOST_BASE([1.39])
++ AC_CHECK_HEADERS([boost/bind.hpp])
++ AC_CHECK_HEADERS([boost/signals2.hpp])
+ fi
+ AM_CONDITIONAL(HAVE_BOOST, test x"$enable_boost" = x"yes")
+
diff --git a/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r2.ebuild b/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r2.ebuild
new file mode 100644
index 000000000000..2f8dba36e3c9
--- /dev/null
+++ b/app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 )
+
+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/ibus[python(+),${PYTHON_USEDEP}]
+ app-i18n/pyzy
+ dev-db/sqlite:3
+ dev-python/pygobject:3[${PYTHON_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
+)
+
+src_prepare() {
+ sed -i "s/python/${EPYTHON}/" setup/${PN/-/-setup-}.in
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable boost) \
+ $(use_enable lua lua-extension) \
+ $(use_enable nls)
+}
diff --git a/app-i18n/ibus-pinyin/metadata.xml b/app-i18n/ibus-pinyin/metadata.xml
new file mode 100644
index 000000000000..f82714b167fa
--- /dev/null
+++ b/app-i18n/ibus-pinyin/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>cjk@gentoo.org</email>
+ <name>Cjk</name>
+ </maintainer>
+ <longdescription lang="en">
+ The Pinyin engine for IBus. It provides Chinese input method from
+ <pkg>app-i18n/pyzy</pkg>.
+ </longdescription>
+ <use>
+ <flag name="boost">Enable support for <pkg>dev-libs/boost</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">ibus/ibus-pinyin</remote-id>
+ </upstream>
+</pkgmetadata>