dev-lua/luajit uses the same directories module directories as dev-lang/lua:0 and dev-lang/lua:5.1. While apparently mostly harmless at present due to the fact LuaJIT is supposed to be API- and ABI-compatible with PUC Lua 5.1, this does break separation between different Lua implementations (e.g. /usr/$(get_libdir)/lua/5.1/ ends up containing some modules compiled against the headers from lua5.1 and some from luajit) - and will cause problems should LuaJIT ever start targetting a newer version of the PUC Lua ABI. For the sake of consistency and future-proofing, please update dev-lang/luajit so that its lmod and cmod directories are not shared with any other Lua implementations.
Hi Marek, I can't see the problem you are mentioning: rafael@nhonho ~ $ grep -R abiver /usr/lib64/pkgconfig/luajit.pc abiver=5.1 libname=luajit-${abiver} INSTALL_LMOD=${prefix}/share/lua/${abiver} INSTALL_CMOD=${prefix}/${multilib}/lua/${abiver} The modules *are* abi compatible with lua, there's no need to split that from luajit side. If you need it for any other reasons, please provide a patch.
Luajit is working as designed in this regard since luajit is fully compatible with lua 5.1.