diff --git a/ibus-libpinyin-1.7.x-head.patch b/ibus-libpinyin-1.7.x-head.patch index 5f14656..4a7e7c4 100644 --- a/ibus-libpinyin-1.7.x-head.patch +++ b/ibus-libpinyin-1.7.x-head.patch @@ -1,7 +1,7 @@ From 9ef836117508d9c0c938f57a5ffa5ffca7eb2e7b Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Fri, 26 Jul 2013 13:03:44 +0800 -Subject: [PATCH] Update the symbol of the ibus indicator +Subject: [PATCH 1/2] Update the symbol of the ibus indicator --- src/PYPinyinProperties.cc | 14 +++++++++++++- @@ -78,3 +78,56 @@ index 70c0808..13b9340 100644 -- 1.8.3.1 + +From c42d0a870697e95301deabe0bcb770a68649c81d Mon Sep 17 00:00:00 2001 +From: Peng Wu +Date: Wed, 31 Jul 2013 10:53:14 +0800 +Subject: [PATCH 2/2] fixes lua 5.2 compile + +--- + lua/lua-plugin-init.c | 8 ++++++++ + lua/lua-plugin.c | 9 +++++++++ + 2 files changed, 17 insertions(+) + +diff --git a/lua/lua-plugin-init.c b/lua/lua-plugin-init.c +index b607b2a..8e95286 100644 +--- a/lua/lua-plugin-init.c ++++ b/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}, +diff --git a/lua/lua-plugin.c b/lua/lua-plugin.c +index 9fd36fb..5ccb837 100644 +--- 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{ +-- +1.8.3.1 + diff --git a/ibus-libpinyin.spec b/ibus-libpinyin.spec index 7a38794..adccef0 100644 --- a/ibus-libpinyin.spec +++ b/ibus-libpinyin.spec @@ -2,7 +2,7 @@ Name: ibus-libpinyin Version: 1.6.91 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Intelligent Pinyin engine based on libpinyin for IBus License: GPLv2+ Group: System Environment/Libraries @@ -78,6 +78,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" %{_datadir}/ibus/component/* %changelog +* Wed Jul 31 2013 Peng Wu - 1.6.91-3 +- Fixes lua 5.2 compile + * Tue Jul 30 2013 Peng Wu - 1.6.91-2 - Update the symbol of the ibus indicator