diff --git a/ibus-pinyin-fixes-english-db-build.patch b/ibus-pinyin-fixes-english-db-build.patch deleted file mode 100644 index b995e2d..0000000 --- a/ibus-pinyin-fixes-english-db-build.patch +++ /dev/null @@ -1,35 +0,0 @@ -From ffe471c94e951ca0a78f8fd69c60db4a65e1cb95 Mon Sep 17 00:00:00 2001 -From: jinqiang zhang -Date: Mon, 27 Feb 2023 03:48:53 +0000 -Subject: [PATCH] Fix sqlite 3.41.0 build failed - -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 - -Ref: https://bugs.gentoo.org/896366 -Signed-off-by: jinqiang zhang ---- - data/db/english/english.awk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/db/english/english.awk b/data/db/english/english.awk -index 1828d2c..16b58a7 100644 ---- 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 { --- -2.40.1 - diff --git a/ibus-pinyin-fixes-lua-compile.patch b/ibus-pinyin-fixes-lua-compile.patch deleted file mode 100644 index f0c9834..0000000 --- a/ibus-pinyin-fixes-lua-compile.patch +++ /dev/null @@ -1,86 +0,0 @@ -From c42d0a870697e95301deabe0bcb770a68649c81d Mon Sep 17 00:00:00 2001 -From: Peng Wu -Date: Wed, 31 Jul 2013 10:53:14 +0800 -Subject: [PATCH] fixes lua 5.2 compile - ---- - lua/lua-plugin-init.c | 8 ++++++++ - lua/lua-plugin.c | 9 +++++++++ - 2 files changed, 17 insertions(+) - -Index: ibus-pinyin-1.5.0/lua/lua-plugin-init.c -=================================================================== ---- ibus-pinyin-1.5.0.orig/lua/lua-plugin-init.c -+++ ibus-pinyin-1.5.0/lua/lua-plugin-init.c -@@ -26,6 +26,14 @@ - - #include "lua-plugin.h" - -+#if LUA_VERSION_NUM >= 502 -+/* ugly hack for lua 5.2 */ -+ -+#define lua_objlen lua_rawlen -+ -+#endif -+ -+ - static const luaL_Reg lualibs[] = { - {"", luaopen_base}, - {LUA_TABLIBNAME, luaopen_table}, -@@ -344,7 +352,11 @@ static const luaL_Reg imelib[] = { - }; - - LUALIB_API int luaopen_ime (lua_State *L) { -+#if LUA_VERSION_NUM >= 502 -+ luaL_newlib(L, imelib); -+#else - luaL_register(L, LUA_IMELIBNAME, imelib); -+#endif - return 1; - } - -Index: ibus-pinyin-1.5.0/lua/lua-plugin.c -=================================================================== ---- ibus-pinyin-1.5.0.orig/lua/lua-plugin.c -+++ ibus-pinyin-1.5.0/lua/lua-plugin.c -@@ -25,6 +25,15 @@ - - #include "lua-plugin.h" - -+#if LUA_VERSION_NUM >= 502 -+/* ugly hack for lua 5.2 */ -+ -+#define lua_open luaL_newstate -+ -+#define lua_objlen lua_rawlen -+ -+#endif -+ - #define IBUS_ENGINE_PLUGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), IBUS_TYPE_ENGINE_PLUGIN, IBusEnginePluginPrivate)) - - struct _IBusEnginePluginPrivate{ -Index: ibus-pinyin-1.5.0/lua/lmyoslib.c -=================================================================== ---- ibus-pinyin-1.5.0.orig/lua/lmyoslib.c -+++ ibus-pinyin-1.5.0/lua/lmyoslib.c -@@ -57,7 +57,7 @@ static int getfield (lua_State *L, const - res = (int)lua_tointeger(L, -1); - else { - if (d < 0) -- return luaL_error(L, "field " LUA_QS " missing in date table", key); -+ return luaL_error(L, "field '%s' missing in date table", key); - res = d; - } - lua_pop(L, 1); -@@ -157,7 +157,11 @@ static const luaL_Reg syslib[] = { - - - LUALIB_API int luaopen_myos (lua_State *L) { -+#if LUA_VERSION_NUM >= 502 -+ luaL_newlib(L, syslib); -+#else - luaL_register(L, LUA_OSLIBNAME, syslib); -+#endif - return 1; - } - diff --git a/ibus-pinyin-fixes-preference-dialog.patch b/ibus-pinyin-fixes-preference-dialog.patch deleted file mode 100644 index 7303110..0000000 --- a/ibus-pinyin-fixes-preference-dialog.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e2e10c40de58195aeae1148c3d44da4b1a35fecf Mon Sep 17 00:00:00 2001 -From: znwu -Date: Sun, 7 May 2023 18:17:11 -0700 -Subject: [PATCH] Fix removed python gettext API - ---- - setup/main.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/setup/main.py b/setup/main.py -index 3c13c4c..3f153a5 100644 ---- 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() --- -2.40.1 - diff --git a/ibus-pinyin-support-set-content-type-method.patch b/ibus-pinyin-support-set-content-type-method.patch deleted file mode 100644 index b7be95d..0000000 --- a/ibus-pinyin-support-set-content-type-method.patch +++ /dev/null @@ -1,227 +0,0 @@ -From f1accaa9a18bd4a1c7234b40e16ad9889c25a461 Mon Sep 17 00:00:00 2001 -From: Peng Wu -Date: Wed, 6 Nov 2013 13:16:14 +0800 -Subject: [PATCH] support setContentType method - ---- - src/PYBopomofoEngine.cc | 22 ++++++++++++++++++++++ - src/PYBopomofoEngine.h | 7 +++++++ - src/PYEngine.cc | 21 +++++++++++++++++++++ - src/PYEngine.h | 3 +++ - src/PYPinyinEngine.cc | 22 ++++++++++++++++++++++ - src/PYPinyinEngine.h | 7 +++++++ - 6 files changed, 82 insertions(+) - -diff --git a/src/PYBopomofoEngine.cc b/src/PYBopomofoEngine.cc -index 581c4cf..4dfbc2c 100644 ---- a/src/PYBopomofoEngine.cc -+++ b/src/PYBopomofoEngine.cc -@@ -42,6 +42,10 @@ BopomofoEngine::BopomofoEngine (IBusEngine *engine) - { - gint i; - -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM; -+#endif -+ - /* create editors */ - m_editors[MODE_INIT].reset (new BopomofoEditor (m_props, BopomofoConfig::instance ())); - m_editors[MODE_PUNCT].reset (new PunctEditor (m_props, BopomofoConfig::instance ())); -@@ -72,6 +76,11 @@ BopomofoEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers) - { - gboolean retval = FALSE; - -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ if (IBUS_INPUT_PURPOSE_PASSWORD == m_input_purpose) -+ return retval; -+#endif -+ - /* check Shift + Release hotkey, - * and then ignore other Release key event */ - if (modifiers & IBUS_RELEASE_MASK) { -@@ -139,9 +148,22 @@ BopomofoEngine::focusIn (void) - void - BopomofoEngine::focusOut (void) - { -+ -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM; -+#endif -+ - reset (); - } - -+#if IBUS_CHECK_VERSION(1, 5, 4) -+void -+BopomofoEngine::setContentType (guint purpose, guint hints) -+{ -+ m_input_purpose = (IBusInputPurpose) purpose; -+} -+#endif -+ - void - BopomofoEngine::reset (void) - { -diff --git a/src/PYBopomofoEngine.h b/src/PYBopomofoEngine.h -index ce41ce8..14b6780 100644 ---- a/src/PYBopomofoEngine.h -+++ b/src/PYBopomofoEngine.h -@@ -36,6 +36,9 @@ public: - gboolean processKeyEvent (guint keyval, guint keycode, guint modifiers); - void focusIn (void); - void focusOut (void); -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ void setContentType (guint purpose, guint hints); -+#endif - void reset (void); - void enable (void); - void disable (void); -@@ -59,6 +62,10 @@ private: - private: - PinyinProperties m_props; - -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ IBusInputPurpose m_input_purpose; -+#endif -+ - guint m_prev_pressed_key; - - enum { -diff --git a/src/PYEngine.cc b/src/PYEngine.cc -index d9fa04a..da047b2 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, -diff --git a/src/PYEngine.h b/src/PYEngine.h -index b74e6e8..22e1b79 100644 ---- a/src/PYEngine.h -+++ b/src/PYEngine.h -@@ -44,6 +44,9 @@ public: - virtual gboolean processKeyEvent (guint keyval, guint keycode, guint modifiers) = 0; - virtual void focusIn (void) = 0; - virtual void focusOut (void) = 0; -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ virtual void setContentType (guint purpose, guint hints) = 0; -+#endif - virtual void reset (void) = 0; - virtual void enable (void) = 0; - virtual void disable (void) = 0; -diff --git a/src/PYPinyinEngine.cc b/src/PYPinyinEngine.cc -index 7aea261..570187b 100644 ---- a/src/PYPinyinEngine.cc -+++ b/src/PYPinyinEngine.cc -@@ -45,6 +45,10 @@ PinyinEngine::PinyinEngine (IBusEngine *engine) - { - gint i; - -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM; -+#endif -+ - if (PinyinConfig::instance ().doublePinyin ()) - m_editors[MODE_INIT].reset (new DoublePinyinEditor (m_props, PinyinConfig::instance ())); - else -@@ -82,6 +86,11 @@ PinyinEngine::processKeyEvent (guint keyval, guint keycode, guint modifiers) - { - gboolean retval = FALSE; - -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ if (IBUS_INPUT_PURPOSE_PASSWORD == m_input_purpose) -+ return retval; -+#endif -+ - /* check Shift + Release hotkey, - * and then ignore other Release key event */ - if (modifiers & IBUS_RELEASE_MASK) { -@@ -195,9 +204,22 @@ PinyinEngine::focusIn (void) - void - PinyinEngine::focusOut (void) - { -+ -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ m_input_purpose = IBUS_INPUT_PURPOSE_FREE_FORM; -+#endif -+ - reset (); - } - -+#if IBUS_CHECK_VERSION(1, 5, 4) -+void -+PinyinEngine::setContentType (guint purpose, guint hints) -+{ -+ m_input_purpose = (IBusInputPurpose) purpose; -+} -+#endif -+ - void - PinyinEngine::reset (void) - { -diff --git a/src/PYPinyinEngine.h b/src/PYPinyinEngine.h -index fcce73e..de50269 100644 ---- a/src/PYPinyinEngine.h -+++ b/src/PYPinyinEngine.h -@@ -35,6 +35,9 @@ public: - gboolean processKeyEvent (guint keyval, guint keycode, guint modifiers); - void focusIn (void); - void focusOut (void); -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ void setContentType (guint purpose, guint hints); -+#endif - void reset (void); - void enable (void); - void disable (void); -@@ -58,6 +61,10 @@ private: - private: - PinyinProperties m_props; - -+#if IBUS_CHECK_VERSION (1, 5, 4) -+ IBusInputPurpose m_input_purpose; -+#endif -+ - guint m_prev_pressed_key; - - enum { --- -1.8.3.1 -