File ibus-libpinyin-build_lua_5.2.patch of Package ibus-libpinyin
diff -Nur ibus-libpinyin-1.7.92/lua/lua-plugin.c ibus-libpinyin-1.7.92-new/lua/lua-plugin.c
--- ibus-libpinyin-1.7.92/lua/lua-plugin.c 2016-08-02 13:42:29.000000000 +0800
+++ ibus-libpinyin-1.7.92-new/lua/lua-plugin.c 2016-08-11 11:04:29.506431695 +0800
@@ -25,15 +25,13 @@
#include "lua-plugin.h"
-#ifndef lua_objlen
-#define lua_objlen lua_rawlen
-#endif
-
#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))
diff -Nur ibus-libpinyin-1.7.92/lua/lua-plugin-init.c ibus-libpinyin-1.7.92-new/lua/lua-plugin-init.c
--- ibus-libpinyin-1.7.92/lua/lua-plugin-init.c 2016-08-02 13:42:29.000000000 +0800
+++ ibus-libpinyin-1.7.92-new/lua/lua-plugin-init.c 2016-08-11 11:05:31.866431378 +0800
@@ -26,7 +26,9 @@
#include "lua-plugin.h"
-#ifndef lua_objlen
+#if LUA_VERSION_NUM >= 502
+/* ugly hack for lua 5.2 */
+
#define lua_objlen lua_rawlen
#endif