mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
app-i18n/ibus-pinyin: drop 1.5.0-r6
Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
parent
157a5ad74a
commit
bf61592c20
@ -1,2 +1 @@
|
||||
DIST ibus-pinyin-1.5.0.tar.gz 692516 BLAKE2B ae53eb79ea4e5336347d689814d8ef033551a9b432268e643927b28911da3d03701acb3f337d7781168461c1c53537f2271fc8f253d1e99a269f61ae5eb83b05 SHA512 b0cd849ee3154543747dde8994eec9aed01d67e0d9be308a2f0230cf22f0281cd8fcabd9763b24238547a37e54400bcd8e541937767b93f005d04302f0c00241
|
||||
DIST ibus-pinyin-1.5.1.gh.tar.gz 241963 BLAKE2B 4f7a08c20a311e0dc76bbea87439976a4a26c01fb80be880f3f8ba7fdd9c309011b0cc9bbb63030e6f4e1f0866d4fad8d3324464160ca73ce663e272a042e0eb SHA512 2ad3e7705d3f537135576ceb165a305728739ba2965d8d50f6db8c5043f17f722ca8b42de053cdcb8ff05ef10a7f7c4a0c7f0924beefdfa197225e360c98abd9
|
||||
|
||||
@ -1,185 +0,0 @@
|
||||
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 ();
|
||||
}
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
--- a/setup/main.py
|
||||
+++ b/setup/main.py
|
||||
@@ -45,7 +45,12 @@ class PreferencesDialog:
|
||||
locale.setlocale(locale.LC_ALL, "")
|
||||
localedir = os.getenv("IBUS_LOCALEDIR")
|
||||
gettext.bindtextdomain("ibus-pinyin", localedir)
|
||||
- gettext.bind_textdomain_codeset("ibus-pinyin", "UTF-8")
|
||||
+ # Python's gettext module doesn't provide all methods in
|
||||
+ # new Python version since Python 3.10
|
||||
+ try:
|
||||
+ gettext.bind_textdomain_codeset("ibus-pinyin", "UTF-8")
|
||||
+ except AttributeError:
|
||||
+ pass
|
||||
|
||||
self.__bus = IBus.Bus()
|
||||
self.__config = self.__bus.get_config()
|
||||
@ -1,91 +0,0 @@
|
||||
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
|
||||
@ -1,23 +0,0 @@
|
||||
UPSTREAM: https://github.com/ibus/ibus-pinyin/pull/12
|
||||
BUG: https://bugs.gentoo.org/896366
|
||||
AUTHOR: jinqiang zhang <peeweep@0x0.ee>
|
||||
|
||||
As sqlite 3.41.0 release note say:
|
||||
|
||||
The double-quoted string misfeature is now disabled by default for CLI
|
||||
builds. Legacy use cases can reenable the misfeature at run-time using
|
||||
the ".dbconfig dqs_dml on" and ".dbconfig dqs_ddl on" commands.
|
||||
|
||||
We should change this double quote to single quote
|
||||
|
||||
--- a/data/db/english/english.awk
|
||||
+++ b/data/db/english/english.awk
|
||||
@@ -16,7 +16,7 @@ BEGIN {
|
||||
}
|
||||
|
||||
# Insert data into english table
|
||||
- { printf "INSERT INTO english (word, freq) VALUES (\"%s\", \"%f\");\n", $1, $2}
|
||||
+ { printf "INSERT INTO english (word, freq) VALUES (\'%s\', %f);\n", $1, $2}
|
||||
|
||||
#quit sqlite3
|
||||
END {
|
||||
@ -1,15 +0,0 @@
|
||||
--- 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")
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
# Copyright 2008-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
LUA_COMPAT=( lua5-1 )
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
|
||||
inherit autotools lua-single python-single-r1
|
||||
|
||||
DESCRIPTION="Chinese Pinyin and Bopomofo engines for IBus"
|
||||
HOMEPAGE="https://github.com/ibus/ibus-pinyin"
|
||||
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}
|
||||
lua? ( ${LUA_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
app-i18n/pyzy
|
||||
dev-db/sqlite:3
|
||||
$(python_gen_cond_dep '
|
||||
app-i18n/ibus[python(+),${PYTHON_USEDEP}]
|
||||
dev-python/pygobject:3[${PYTHON_USEDEP}]
|
||||
')
|
||||
boost? ( dev-libs/boost )
|
||||
lua? ( ${LUA_DEPS} )
|
||||
nls? ( virtual/libintl )"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
dev-util/intltool
|
||||
dev-build/autoconf-archive
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-boost.patch
|
||||
"${FILESDIR}"/${P}-content-type-method.patch
|
||||
"${FILESDIR}"/${P}-python3.patch
|
||||
"${FILESDIR}"/${P}-sqlite-3.41.0.patch
|
||||
"${FILESDIR}"/${P}-gettext.patch #905906
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
|
||||
if use lua; then
|
||||
lua-single_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable boost) \
|
||||
$(use_enable lua lua-extension) \
|
||||
$(use_enable nls)
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user