Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 752555 - app-i18n/ibus-pinyin: migrate to lua eclasses
Summary: app-i18n/ibus-pinyin: migrate to lua eclasses
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: slotted-lua
  Show dependency tree
 
Reported: 2020-11-03 15:35 UTC by Marek Szuba
Modified: 2020-12-07 18:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Szuba archtester gentoo-dev 2020-11-03 15:35:43 UTC
In order for Gentoo Linux to properly support side-by-side installation of
different versions of Lua (including LuaJIT), please migrate this package as
to lua.eclass (for packages which should support multiple Lua implementations
at the same time, i.e. most likely Lua modules) or lua-single.eclass (for
packages which only have to support one Lua implementation at a time). For
details, consult documentation of respective eclasses as well as
already-migrated ebuilds in the tree.

Please note that since slotted dev-lang/lua is currently masked, your
migrated ebuilds should be masked as well. There is a section of package.mask,
created in September 2020, which you can use for this purpose so that it will
be easier in the future to unmask them all in one go.

Thank you in advance for your effort!
Comment 1 Arfrever Frehtes Taifersar Arahesis 2020-12-07 16:57:34 UTC
ibus-pinyin 1.5.0 can be built with Lua 5.1.
test-lua-plugin passes with Lua 5.1.

ibus-pinyin 1.5.0 fails to build with Lua >=5.2:

> lua-plugin.c: In function ‘lua_plugin_init’:
> lua-plugin.c:57:15: warning: implicit declaration of function ‘lua_open’; did you mean ‘lua_len’? [-Wimplicit-function-declaration]
>    57 |   plugin->L = lua_open();
>       |               ^~~~~~~~
>       |               lua_len
> lua-plugin.c:57:13: warning: assignment to ‘lua_State *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
>    57 |   plugin->L = lua_open();
>       |             ^
> lua-plugin.c:213:12: warning: implicit declaration of function ‘lua_objlen’; did you mean ‘lua_len’? [-Wimplicit-function-declaration]
>   213 |     return lua_objlen(L, -1);
>       |            ^~~~~~~~~~
>       |            lua_len
> ...
> lua-plugin-init.c: In function ‘ime_join_string’:
> lua-plugin-init.c:91:13: warning: implicit declaration of function ‘lua_objlen’; did you mean ‘lua_len’? [-Wimplicit-function-declaration]
>    91 |   vec_len = lua_objlen(L, 1);
>       |             ^~~~~~~~~~
>       |             lua_len
> lua-plugin-init.c: In function ‘luaopen_ime’:
> lua-plugin-init.c:347:3: warning: implicit declaration of function ‘luaL_register’; did you mean ‘lua_register’? [-Wimplicit-function-declaration]
>   347 |   luaL_register(L, LUA_IMELIBNAME, imelib);
>       |   ^~~~~~~~~~~~~
>       |   lua_register
> ...
> lmyoslib.c: In function ‘luaopen_myos’:
> lmyoslib.c:160:3: warning: implicit declaration of function ‘luaL_register’; did you mean ‘lua_register’? [-Wimplicit-function-declaration]
>   160 |   luaL_register(L, LUA_OSLIBNAME, syslib);
>       |   ^~~~~~~~~~~~~
>       |   lua_register
> ...
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: ./.libs/libpylua.a(libpylua_la-lua-plugin.o): in function `ibus_engine_plugin_init':
> lua-plugin.c:(.text+0x33a): undefined reference to `lua_open'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: ./.libs/libpylua.a(libpylua_la-lua-plugin.o): in function `ibus_engine_plugin_get_retvals':
> lua-plugin.c:(.text+0xa55): undefined reference to `lua_objlen'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: ./.libs/libpylua.a(libpylua_la-lua-plugin.o): in function `ibus_engine_plugin_call':
> lua-plugin.c:(.text+0x8e4): undefined reference to `lua_objlen'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: ./.libs/libpylua.a(libpylua_la-lua-plugin-init.o): in function `luaopen_ime':
> lua-plugin-init.c:(.text+0x73): undefined reference to `luaL_register'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: ./.libs/libpylua.a(libpylua_la-lua-plugin-init.o): in function `ime_register_trigger':
> lua-plugin-init.c:(.text+0x28e): undefined reference to `lua_objlen'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: lua-plugin-init.c:(.text+0x328): undefined reference to `lua_objlen'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: ./.libs/libpylua.a(libpylua_la-lua-plugin-init.o): in function `ime_join_string':
> lua-plugin-init.c:(.text+0x656): undefined reference to `lua_objlen'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: ./.libs/libpylua.a(libpylua_la-lmyoslib.o): in function `luaopen_myos':
> lmyoslib.c:(.text+0x763): undefined reference to `luaL_register'
> collect2: error: ld returned 1 exit status

ibus-libpinyin is some type of fork of ibus-pinyin, and seems mostly abandoned.
It may be possible to backport fixes from ibus-libpinyin to ibus-pinyin:
https://github.com/libpinyin/ibus-libpinyin/commit/c42d0a870697e95301deabe0bcb770a68649c81d
https://github.com/libpinyin/ibus-libpinyin/commit/8cba9ed83fe4d02b76e224862ca85ce014592b80
https://github.com/libpinyin/ibus-libpinyin/commit/b322cce4d1e3dd97a1648c1a20de570b88bb61a2
https://github.com/libpinyin/ibus-libpinyin/commit/1b5818e46068c9f3b7858b9c6dd7cb390691ef4a
https://github.com/libpinyin/ibus-libpinyin/commit/53b5d4de6c8732da113f56efdd1e0e9b797d8591

https://github.com/ibus/ibus-pinyin/commit/753d221bfeb1e438724a2ff8168bef9953698f06 (the same as https://github.com/libpinyin/ibus-libpinyin/commit/f3faeeff3fbe3bf9e30ed4461c2c8d0466966e56)
Comment 2 Arfrever Frehtes Taifersar Arahesis 2020-12-07 16:59:47 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #1)
> ibus-libpinyin is some type of fork of ibus-pinyin, and seems mostly
> abandoned.

ibus-libpinyin is some type of fork of ibus-pinyin, and ibus-pinyin seems mostly abandoned.
Comment 3 Larry the Git Cow gentoo-dev 2020-12-07 18:14:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d096d33ac39ade3972f4cbc03bc21e93fa6ddc4

commit 3d096d33ac39ade3972f4cbc03bc21e93fa6ddc4
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2020-12-07 06:00:00 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-12-07 18:14:28 +0000

    app-i18n/ibus-pinyin: Use slotted Lua.
    
    Closes: https://bugs.gentoo.org/752555
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 app-i18n/ibus-pinyin/ibus-pinyin-1.5.0-r4.ebuild | 18 ++++++++++++++----
 profiles/base/package.use.mask                   |  1 +
 2 files changed, 15 insertions(+), 4 deletions(-)