pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/inputmethod/ibus-pinyin fixes build with lua option (a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/851980cf083c
branches:  trunk
changeset: 626031:851980cf083c
user:      obache <obache%pkgsrc.org@localhost>
date:      Wed Oct 30 11:30:36 2013 +0000

description:
fixes build with lua option (and Lua-5.2 fix)

diffstat:

 inputmethod/ibus-pinyin/PLIST                          |   3 +-
 inputmethod/ibus-pinyin/distinfo                       |   4 ++-
 inputmethod/ibus-pinyin/patches/patch-lua_lmyoslib.c   |  20 +++++++++++++
 inputmethod/ibus-pinyin/patches/patch-lua_lua-plugin.h |  27 ++++++++++++++++++
 4 files changed, 52 insertions(+), 2 deletions(-)

diffs (82 lines):

diff -r 0f11760a694a -r 851980cf083c inputmethod/ibus-pinyin/PLIST
--- a/inputmethod/ibus-pinyin/PLIST     Wed Oct 30 10:52:53 2013 +0000
+++ b/inputmethod/ibus-pinyin/PLIST     Wed Oct 30 11:30:36 2013 +0000
@@ -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 -r 0f11760a694a -r 851980cf083c inputmethod/ibus-pinyin/distinfo
--- a/inputmethod/ibus-pinyin/distinfo  Wed Oct 30 10:52:53 2013 +0000
+++ b/inputmethod/ibus-pinyin/distinfo  Wed Oct 30 11:30:36 2013 +0000
@@ -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 -r 0f11760a694a -r 851980cf083c inputmethod/ibus-pinyin/patches/patch-lua_lmyoslib.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/ibus-pinyin/patches/patch-lua_lmyoslib.c      Wed Oct 30 11:30:36 2013 +0000
@@ -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 -r 0f11760a694a -r 851980cf083c inputmethod/ibus-pinyin/patches/patch-lua_lua-plugin.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/ibus-pinyin/patches/patch-lua_lua-plugin.h    Wed Oct 30 11:30:36 2013 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index