diff options
author | obache <obache@pkgsrc.org> | 2013-10-30 11:30:36 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2013-10-30 11:30:36 +0000 |
commit | bfb198bf425c347417edbfc8845f2bfb8e94886f (patch) | |
tree | 9036b46b429e7e620ea415340fe3a2be761ecdc9 | |
parent | 22599c7f304629549aa0343984d6cf6f3e6f403e (diff) | |
download | pkgsrc-bfb198bf425c347417edbfc8845f2bfb8e94886f.tar.gz |
fixes build with lua option (and Lua-5.2 fix)
-rw-r--r-- | inputmethod/ibus-pinyin/PLIST | 3 | ||||
-rw-r--r-- | inputmethod/ibus-pinyin/distinfo | 4 | ||||
-rw-r--r-- | inputmethod/ibus-pinyin/patches/patch-lua_lmyoslib.c | 20 | ||||
-rw-r--r-- | inputmethod/ibus-pinyin/patches/patch-lua_lua-plugin.h | 27 |
4 files changed, 52 insertions, 2 deletions
diff --git a/inputmethod/ibus-pinyin/PLIST b/inputmethod/ibus-pinyin/PLIST index da7a72ed07a..d567d1eda24 100644 --- a/inputmethod/ibus-pinyin/PLIST +++ b/inputmethod/ibus-pinyin/PLIST @@ -1,8 +1,9 @@ -@comment $NetBSD: PLIST,v 1.3 2013/10/23 12:39:55 obache Exp $ +@comment $NetBSD: PLIST,v 1.4 2013/10/30 11:30:36 obache Exp $ libexec/ibus-engine-pinyin libexec/ibus-setup-pinyin share/applications/ibus-setup-bopomofo.desktop share/applications/ibus-setup-pinyin.desktop +${PLIST.lua}share/ibus-pinyin/base.lua share/ibus-pinyin/db/english.db share/ibus-pinyin/icons/chinese.svg share/ibus-pinyin/icons/english.svg diff --git a/inputmethod/ibus-pinyin/distinfo b/inputmethod/ibus-pinyin/distinfo index 2c46b201fd8..0173438cd01 100644 --- a/inputmethod/ibus-pinyin/distinfo +++ b/inputmethod/ibus-pinyin/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.4 2013/10/23 12:39:55 obache Exp $ +$NetBSD: distinfo,v 1.5 2013/10/30 11:30:36 obache Exp $ SHA1 (ibus-pinyin-1.5.0.tar.gz) = 40abf915bb2599189d8fd76f456ce399edfa4184 RMD160 (ibus-pinyin-1.5.0.tar.gz) = 9137f3e40971bd819fbaaf1715779a538d20a90c Size (ibus-pinyin-1.5.0.tar.gz) = 692516 bytes +SHA1 (patch-lua_lmyoslib.c) = 7934c67df6134085f5a429ad678e1bfa89c65be8 +SHA1 (patch-lua_lua-plugin.h) = 51fbb077a8f0c528101dbdaafcbac9702dde334f SHA1 (patch-src_PYUtil.h) = 93e289e83abaec2fef6cd5a7cf924cd3bb6a20ad diff --git a/inputmethod/ibus-pinyin/patches/patch-lua_lmyoslib.c b/inputmethod/ibus-pinyin/patches/patch-lua_lmyoslib.c new file mode 100644 index 00000000000..cec97b32557 --- /dev/null +++ b/inputmethod/ibus-pinyin/patches/patch-lua_lmyoslib.c @@ -0,0 +1,20 @@ +$NetBSD: patch-lua_lmyoslib.c,v 1.1 2013/10/30 11:30:37 obache Exp $ + +* for Lua 5.2 API change + +--- lua/lmyoslib.c.orig 2012-06-01 15:47:06.000000000 +0000 ++++ lua/lmyoslib.c +@@ -20,6 +20,13 @@ + #include "lualib.h" + + ++#ifdef LUA_VERSION_NUM ++# if (LUA_VERSION_NUM >= 502) ++#undef luaL_register ++#define luaL_register(L,n,f) \ ++ { if ((n) == NULL) luaL_setfuncs(L,f,0); else luaL_newlib(L,f); } ++# endif ++#endif + + /* + ** {====================================================== diff --git a/inputmethod/ibus-pinyin/patches/patch-lua_lua-plugin.h b/inputmethod/ibus-pinyin/patches/patch-lua_lua-plugin.h new file mode 100644 index 00000000000..38671117c9b --- /dev/null +++ b/inputmethod/ibus-pinyin/patches/patch-lua_lua-plugin.h @@ -0,0 +1,27 @@ +$NetBSD: patch-lua_lua-plugin.h,v 1.1 2013/10/30 11:30:37 obache Exp $ + +* for Lua-5.1 and 5.2 API change + +--- lua/lua-plugin.h.orig 2012-07-09 14:32:10.000000000 +0000 ++++ lua/lua-plugin.h +@@ -29,6 +29,20 @@ + + #include <glib-object.h> + ++#ifdef LUA_VERSION_NUM ++# if (LUA_VERSION_NUM >= 501) ++#undef lua_open ++#define lua_open luaL_newstate ++# endif ++# if (LUA_VERSION_NUM >= 502) ++#undef lua_objlen ++#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 ++#endif ++ + #define LUA_IMELIBNAME "ime" + LUALIB_API int (luaopen_ime) (lua_State * L); + LUALIB_API int (luaopen_myos) (lua_State * L); |