Created attachment 696543 [details, diff] patch to fix LUA_INCDIR i am using luajit and default LUA_INCDIR in build-aux/luke is "$LUA_DIR/include/lua$LUAVERSION" which is expanded to /usr/include/lua5.1 but there should be /usr/include/luajit-2.0 to fix it in src_compile should be LUA_INCDIR="${ED}/$(lua_get_include_dir)"
(No need to manually CC)
While I agree, that the include is wrong for luajit, your patch won't work, as {ED} is the directory, where the emerge happens. It won't find there lua ;-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d810adcd6834e06725f271ef7af2df72c902fcb2 commit d810adcd6834e06725f271ef7af2df72c902fcb2 Author: Conrad Kostecki <conikost@gentoo.org> AuthorDate: 2021-03-31 19:43:20 +0000 Commit: Conrad Kostecki <conikost@gentoo.org> CommitDate: 2021-03-31 19:43:57 +0000 dev-lua/luaposix: drop old version Closes: https://bugs.gentoo.org/779574 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Conrad Kostecki <conikost@gentoo.org> dev-lua/luaposix/luaposix-35.0-r101.ebuild | 76 ------------------------------ 1 file changed, 76 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10d0523dbd630c97a99d91541d5910deab9b85cf commit 10d0523dbd630c97a99d91541d5910deab9b85cf Author: Conrad Kostecki <conikost@gentoo.org> AuthorDate: 2021-03-31 19:42:28 +0000 Commit: Conrad Kostecki <conikost@gentoo.org> CommitDate: 2021-03-31 19:43:56 +0000 dev-lua/luaposix: use correct lua includedir Closes: https://bugs.gentoo.org/779574 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Conrad Kostecki <conikost@gentoo.org> dev-lua/luaposix/luaposix-35.0-r102.ebuild | 77 ++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+)