From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-i18n/ibus-pinyin/Manifest | 5 + .../ibus-pinyin-1.5.0-content-type-method.patch | 185 +++++++++++++++++++++ app-i18n/ibus-pinyin/files/ibus-pinyin-boost.patch | 15 ++ app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r2.ebuild | 50 ++++++ app-i18n/ibus-pinyin/metadata.xml | 22 +++ 5 files changed, 277 insertions(+) create mode 100644 app-i18n/ibus-pinyin/Manifest create mode 100644 app-i18n/ibus-pinyin/files/ibus-pinyin-1.5.0-content-type-method.patch create mode 100644 app-i18n/ibus-pinyin/files/ibus-pinyin-boost.patch create mode 100644 app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r2.ebuild create mode 100644 app-i18n/ibus-pinyin/metadata.xml (limited to 'app-i18n/ibus-pinyin') diff --git a/app-i18n/ibus-pinyin/Manifest b/app-i18n/ibus-pinyin/Manifest new file mode 100644 index 000000000000..d3714ae5126a --- /dev/null +++ b/app-i18n/ibus-pinyin/Manifest @@ -0,0 +1,5 @@ +AUX ibus-pinyin-1.5.0-content-type-method.patch 5534 BLAKE2B 658a4d099b02b344f38a9ef2fc2df0d2274dcd3b8071fac0aef0accbf7c21f0d4e98b9587d665b13195d7efc04bbf58218de84069a2c63eaa79156363061dd86 SHA512 3399052f0d12eb55554d5cc98637125e6648a56f3dc87eb2fadc63af3fb82bba915e820c51596d9106637f6a063100f217ad001422a61f8925db5c5b2024c976 +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-r2.ebuild 1140 BLAKE2B de842fee994ea765f6f52922f282319b87fb6f4de9901eee34ddb3c8232431a7f389201508c22a298069ccb11f793e00be2af086a37195479164965f53483f77 SHA512 c86e6e49c9c153edf82790c0a3a79b521c9e076db136a97ac2b501e4b5d4321dcd1b787b79540836e620a1a8bb0b28c4610280ebd07d505fe9fa8bd2677cf8ef +MISC metadata.xml 675 BLAKE2B 53ddd9a158adba18b4bbb56af1f1e75013c61ea23c245703489b677ed3a5eefd1fb0bba28b4269c5bff4ca6453ea5bb4027b0904f21ee89ecc2ca0d5c7041b52 SHA512 87c1743bc802f22de1d2441403b00eaee1a834730ee1b9f3c3ae62728fdc7073bbe01faec464042243ac7dea1ce11aca709bd5d836fca3c09ccb77c64ea27aea 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 +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 . + +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 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 @@ + + + + + dlan@gentoo.org + Yixun Lan + + + cjk@gentoo.org + Cjk + + + The Pinyin engine for IBus. It provides Chinese input method from + app-i18n/pyzy. + + + Enable support for dev-libs/boost + + + ibus/ibus-pinyin + + -- cgit v1.2.3