debian/0000755000000000000000000000000012303530241007157 5ustar debian/control0000644000000000000000000000252012303525317010571 0ustar Source: ibus-pinyin Section: utils Priority: optional Maintainer: IME Packaging Team Uploaders: LI Daobing , Asias He , Aron Xu , Osamu Aoki Build-Depends: debhelper (>= 9), dh-autoreconf, intltool (>= 0.35.0), libibus-1.0-dev (>= 1.5), liblua5.2-dev, libopencc-dev (>= 0.1.0), libpyzy-dev, libsqlite3-dev (>= 3.6), pkg-config, python-dev (>= 2.6.6-3~), sqlite3, uuid-dev Standards-Version: 3.9.5 Homepage: http://code.google.com/p/ibus Vcs-Git: git://anonscm.debian.org/pkg-ime/ibus-pinyin.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ime/ibus-pinyin.git Package: ibus-pinyin Architecture: any Multi-Arch: foreign Depends: ibus (>= 1.5), libpyzy-1.0-0, python-ibus, python-xdg, ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} Description: Pinyin engine for IBus ibus-pinyin is a IBus based IM engine for Chinese. . For more information on pinyin input method, please check http://en.wikipedia.org/wiki/Pinyin_method . This package contains pinyin input method. debian/rules0000755000000000000000000000113212271177032010245 0ustar #!/usr/bin/make -f #DH_VERBOSE = 1 # see FEATURE AREAS in dpkg-buildflags(1) #export DEB_BUILD_MAINT_OPTIONS = hardening=+all # see ENVIRONMENT in dpkg-buildflags(1) # package maintainers to append CFLAGS export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic # package maintainers to append LDFLAGS export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed %: dh $@ --with autoreconf,python2 override_dh_auto_configure: dh_auto_configure -- \ --disable-static \ --disable-boost \ --libexecdir=/usr/lib/ibus override_dh_auto_clean: rm -f data/db/android/*.pyc dh_auto_clean debian/docs0000644000000000000000000000001712271146025010037 0ustar README AUTHORS debian/compat0000644000000000000000000000000212271167327010374 0ustar 9 debian/changelog0000644000000000000000000001664712303530236011053 0ustar ibus-pinyin (1.5.0-1ubuntu1) trusty; urgency=low * Merge with Debian, changes (LP: #1220985): - debian/patches/ibus-pinyin-fixes-lua-compile.patch: Update patch to really fix build with lua 5.2. - debian/patches/lua52.diff: Use lua5.2 by default. - debian/control: Build-Depends on liblua5.2-dev. -- Aron Xu Thu, 27 Feb 2014 10:54:38 +0800 ibus-pinyin (1.5.0-1) unstable; urgency=low * New upstream release * Update policy to 3.9.5 and compat to 9. * Add --with autoreconf. Closes: #727267 * Add dependency to python-ibus, python-xdg. Closes: #735495, #734350, #734351 * harden debian/rules. * Multi-Arch enabled. * Use libpyzy-1.0-0 and make this single binary package. * Sync with ibus-pinyin-1.5.0-5.fc19.src.rpm - Fixes lua 5.2 compile by Peng Wu (This is build with lua 5.1 since autoconf lose lua 5.2) - Fixes ibus: visible password entry flaw. (rhbz#1027029) (CVE-2013-4509) by Peng Wu -- Osamu Aoki Sun, 26 Jan 2014 17:57:15 +0900 ibus-pinyin (1.4.0-2) unstable; urgency=low * Fix libexecdir to match ibus-setup expectation. Closes: #712580 -- Osamu Aoki Tue, 18 Jun 2013 23:01:55 +0900 ibus-pinyin (1.4.0-1) unstable; urgency=low * New upstream release -- Osamu Aoki Thu, 22 Dec 2011 22:54:44 +0900 ibus-pinyin (1.3.99.20110706-2) unstable; urgency=low * Install missing files. Closes: #646341 * Remove useless lintian override file. * Use dh_link to make symlink properly. * Clean data/db/android/*.pyc for clean rebuild. -- Osamu Aoki Wed, 21 Dec 2011 22:49:29 +0900 ibus-pinyin (1.3.99.20110706-1) unstable; urgency=low * New upstream release * Use dh in debian/rules * Bump standards version to 3.9.2 * Set VCS to git.debian.org * Set DM-Upload-Allowed to yes * Set X-Python-Version to >= 2.5 * Add debian/*.install files * Fix "Switch to dh_python2" (Closes: #635029) * Fix "Please enable GBK support or mention in document" (Closes: #535578) -- Asias He Sun, 24 Jul 2011 16:01:18 +0800 ibus-pinyin (1.3.11-1) unstable; urgency=low [ Asias He ] * New upstream release. -- LI Daobing Wed, 08 Sep 2010 21:38:54 +0800 ibus-pinyin (1.3.10-1) unstable; urgency=low [ Asias He ] * New upstream release (closes: #590356). * debian/control: - bump standards version to 3.9.1 [ LI Daobing ] * debian/control: - build depends on libopencc-dev (>= 0.1.0). -- LI Daobing Mon, 09 Aug 2010 21:44:47 +0800 ibus-pinyin (1.3.9-1) unstable; urgency=low * New upstream release. * debian/control: - bump standards version to 3.9.0 - add build depends on liblua5.1-0-dev, libopencc-dev * debian/rules: enable opencc. -- LI Daobing Fri, 16 Jul 2010 23:25:41 +0800 ibus-pinyin (1.3.8-1) unstable; urgency=low [ Asias He ] * New upstream release. * debian/control: - add Asias He to Uploaders. -- LI Daobing Sun, 30 May 2010 11:05:32 +0800 ibus-pinyin (1.3.6-1) unstable; urgency=low * New upstream release. * debian/watch: updated. -- LI Daobing Fri, 21 May 2010 21:31:57 +0800 ibus-pinyin (1.3.5-1) unstable; urgency=low * New upstream release. -- LI Daobing Tue, 04 May 2010 20:57:41 +0800 ibus-pinyin (1.3.4-1) unstable; urgency=low * New upstream release. - debian/patches/debian-changes-1.3.3-2: removed. * debian/control: - add build depends on libboost-dev. - remove build depends on libsigc++. -- LI Daobing Mon, 03 May 2010 15:31:14 +0800 ibus-pinyin (1.3.3-2) unstable; urgency=low * Fix "FTBFS: DynamicSpecialPhrase.cc:60: error: 'snprintf' is not a member of 'std'" (Closes: #578335) - debian/patches/debian-changes-1.3.3-2: patch from upstream bug report: http://code.google.com/p/ibus/issues/detail?id=863 -- LI Daobing Mon, 19 Apr 2010 20:50:57 +0800 ibus-pinyin (1.3.3-1) unstable; urgency=low * New upstream release. * debian/control: - group maintained, add me to uploaders. - update Vcs-* information. -- LI Daobing Fri, 16 Apr 2010 20:39:34 +0800 ibus-pinyin (1.3.1-1) unstable; urgency=low * New upstream release. -- LI Daobing Sat, 10 Apr 2010 15:32:18 +0800 ibus-pinyin (1.3.0-1) unstable; urgency=low * New upstream release. * debian/source/format: 3.0. -- LI Daobing Sat, 03 Apr 2010 21:22:28 +0800 ibus-pinyin (1.2.99.20100318-1) experimental; urgency=low * New upstream release. * debian/control: bump standards version to 3.8.4. * debian/control: switch to ibus 1.3. * debian/control: build depends on libsigc++-2.0-dev. * debian/control: fix debhelper-but-no-misc-depends. * debian/rules: remove config.log -- LI Daobing Sun, 21 Mar 2010 19:22:14 +0800 ibus-pinyin (1.2.99.20091211-1) unstable; urgency=low * New upstream release. * debian/control: add build depends on intltool -- LI Daobing Sat, 12 Dec 2009 22:43:01 +0800 ibus-pinyin (1.2.99.20091009-1) unstable; urgency=low * new upstream release. * debian/control: rename package ibus-pinyin-db-google to ibus-pinyin-db-android. * debian/rules: updated. -- LI Daobing Sun, 11 Oct 2009 12:58:12 +0800 ibus-pinyin (1.2.99.20091007-1) unstable; urgency=low * new upstream release. * debian/control: remove package ibus-pinyin-data, add packages ibus-pinyin-db-open-phrase and ibus-pinyin-db-google. * debian/rules: updated. -- LI Daobing Thu, 08 Oct 2009 12:39:25 +0800 ibus-pinyin (1.2.99.20090930-1) unstable; urgency=low * new upstream release. * debian/control: update build depends. -- LI Daobing Wed, 30 Sep 2009 22:44:05 +0800 ibus-pinyin (1.2.99.20090929-1) unstable; urgency=low * new upstream release. * debian/watch: updated. * debian/control: - build depends on pinyin-database and lsb-release. - add ibus-pinyin-data package. * debian/rules: updated. * debian/README.Debian: no longer needed. -- LI Daobing Tue, 29 Sep 2009 22:33:06 +0800 ibus-pinyin (1.2.99.20090923+1-1) unstable; urgency=low * new upstream release. * debian/rules: update build script. * debian/control: - change arch from all to any. - remove Build-Depends-Indep, update Build-Depends - update Depends -- LI Daobing Wed, 23 Sep 2009 20:12:19 +0800 ibus-pinyin (1.2.0.20090915+1-1) unstable; urgency=low * new upstream release. * debian/control: - bump standards version to 3.8.3. - update Vcs-* fields. -- LI Daobing Tue, 15 Sep 2009 20:09:45 +0800 ibus-pinyin (1.2.0.20090617+1-1) unstable; urgency=low * new upstream release. * debian/control: - depends: ibus >= 1.2 - bump standards version to 3.8.2 -- LI Daobing Sat, 20 Jun 2009 23:40:41 +0800 ibus-pinyin (1.1.0.20090612+1-1) unstable; urgency=low * new upstream release. -- LI Daobing Sat, 13 Jun 2009 15:37:23 +0800 ibus-pinyin (1.1.0.20090303+1-0ubuntu1) karmic; urgency=low * initial release (LP: #318806) -- LI Daobing Fri, 01 May 2009 16:44:56 +0800 debian/copyright0000644000000000000000000000242012271177242011124 0ustar This package was debianized by: LI Daobing on Sun, 28 Dec 2008 20:30:06 +0800 It was downloaded from: http://code.google.com/p/ibus/downloads/list Upstream Author: Huang Peng Copyright: Copyright © 2007-2008 Huang Peng License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. The Debian packaging is: Copyright © 2008, LI Daobing and is licensed under the GPL, see above. debian/source/0000755000000000000000000000000012271175403010470 5ustar debian/source/format0000644000000000000000000000001412271146025011674 0ustar 3.0 (quilt) debian/source/options0000644000000000000000000000010012271146025012073 0ustar extend-diff-ignore = "^(setup/version\.py|src/pinin\.xml\.in)$" debian/patches/0000755000000000000000000000000012303525114010611 5ustar debian/patches/ibus-pinyin-fixes-lua-compile.patch0000644000000000000000000000276312303524347017440 0ustar 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(+) --- a/lua/lua-plugin-init.c +++ b/lua/lua-plugin-init.c @@ -26,6 +26,17 @@ #include "lua-plugin.h" +#if LUA_VERSION_NUM >= 502 +/* ugly hack for lua 5.2 */ + +#define lua_objlen lua_rawlen +#undef luaL_register +#define luaL_register(L,n,f) \ + { if ((n) == NULL) luaL_setfuncs(L,f,0); else luaL_newlib(L,f); } + +#endif + + static const luaL_Reg lualibs[] = { {"", luaopen_base}, {LUA_TABLIBNAME, luaopen_table}, --- a/lua/lua-plugin.c +++ b/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{ --- a/lua/lmyoslib.c +++ b/lua/lmyoslib.c @@ -19,7 +19,15 @@ #include "lauxlib.h" #include "lualib.h" +#if LUA_VERSION_NUM >= 502 +/* ugly hack for lua 5.2 */ +#define lua_objlen lua_rawlen +#undef luaL_register +#define luaL_register(L,n,f) \ + { if ((n) == NULL) luaL_setfuncs(L,f,0); else luaL_newlib(L,f); } + +#endif /* ** {====================================================== debian/patches/ibus-pinyin-support-set-content-type-method.patch0000644000000000000000000001575212271175403022330 0ustar 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 debian/patches/lua52.diff0000644000000000000000000000053112303525114012372 0ustar --- a/configure.ac +++ b/configure.ac @@ -116,7 +116,7 @@ # check lua PKG_CHECK_MODULES(LUA, [ - lua >= 5.1 + lua >= 5.2 ], [], [has_lua_extension=no] ) @@ -124,7 +124,7 @@ if test x"$has_lua_extension" = x"no"; then PKG_CHECK_MODULES(LUA, [ - lua5.1 + lua5.2 ], [], [enable_lua_extension=no] ); debian/patches/series0000644000000000000000000000041512303525047012033 0ustar # Patch0: # Fixes lua 5.2 compile ibus-pinyin-fixes-lua-compile.patch # Patch1: # Fri Nov 8 2013 Peng Wu - 1.5.0-5 # Fixes ibus: visible password entry flaw. (rhbz#1027029) (CVE-2013-4509) ibus-pinyin-support-set-content-type-method.patch lua52.diff debian/watch0000644000000000000000000000041012271146025010212 0ustar version=3 opts=downloadurlmangle=s#.*(ibus-pinyin-([\d.]+)\.tar\.gz).*#http://ibus.googlecode.com/files/$1#,filenamemangle=s#.*(ibus-pinyin-([\d.]+)\.tar\.gz).*#$1# \ http://code.google.com/p/ibus/downloads/list ^.*detail\?name=ibus-pinyin-([\d.]+)\.tar\.gz.*