commit:     ce4a807ded59200b997bffd0c6afe93db843da2a
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Sun Mar  8 07:10:16 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 11 13:43:33 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce4a807d

net-p2p/rtorrent: fix cross-compiling w/ lua

skip AX_PROG_LUA to avoid testing the interpreter
define vars from lua-utils.eclass

Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/250
Merges: https://codeberg.org/gentoo/gentoo/pulls/250
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-p2p/rtorrent/rtorrent-0.16.7.ebuild | 8 +++++++-
 net-p2p/rtorrent/rtorrent-9999.ebuild   | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/net-p2p/rtorrent/rtorrent-0.16.7.ebuild 
b/net-p2p/rtorrent/rtorrent-0.16.7.ebuild
index fa8c68ca98ed..68ad7cf646d0 100644
--- a/net-p2p/rtorrent/rtorrent-0.16.7.ebuild
+++ b/net-p2p/rtorrent/rtorrent-0.16.7.ebuild
@@ -66,6 +66,10 @@ src_prepare() {
                sed -i 's/Wl,-syslibroot,/Wl,--sysroot,/' 
"${S}/scripts/common.m4" || die
        fi
 
+       # don't test interpreter (fix cross-compile)
+       # vars for AX_LUA_LIBS/AX_LUA_HEADERS are defined in src_configure
+       sed -e '/AX_PROG_LUA/d' -i scripts/checks.m4 || die
+
        eautoreconf
 }
 
@@ -80,7 +84,9 @@ src_configure() {
        )
 
        use lua && myeconfargs+=(
-               LUA_INCLUDE="-I$(lua_get_include_dir)"
+               LUA_INCLUDE="$(lua_get_CFLAGS)"
+               LUA_LIB="$(lua_get_LIBS)"
+               LUA_VERSION="${ELUA/lua/}"
        )
 
        econf "${myeconfargs[@]}"

diff --git a/net-p2p/rtorrent/rtorrent-9999.ebuild 
b/net-p2p/rtorrent/rtorrent-9999.ebuild
index fa8c68ca98ed..68ad7cf646d0 100644
--- a/net-p2p/rtorrent/rtorrent-9999.ebuild
+++ b/net-p2p/rtorrent/rtorrent-9999.ebuild
@@ -66,6 +66,10 @@ src_prepare() {
                sed -i 's/Wl,-syslibroot,/Wl,--sysroot,/' 
"${S}/scripts/common.m4" || die
        fi
 
+       # don't test interpreter (fix cross-compile)
+       # vars for AX_LUA_LIBS/AX_LUA_HEADERS are defined in src_configure
+       sed -e '/AX_PROG_LUA/d' -i scripts/checks.m4 || die
+
        eautoreconf
 }
 
@@ -80,7 +84,9 @@ src_configure() {
        )
 
        use lua && myeconfargs+=(
-               LUA_INCLUDE="-I$(lua_get_include_dir)"
+               LUA_INCLUDE="$(lua_get_CFLAGS)"
+               LUA_LIB="$(lua_get_LIBS)"
+               LUA_VERSION="${ELUA/lua/}"
        )
 
        econf "${myeconfargs[@]}"

Reply via email to