commit: 659530b54968511a266fe0ecaae1cca560dca2d6
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 24 14:46:33 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 21 04:41:09 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=659530b5
media-tv/kodi: Fix cross-compiling by building native tools separately
The native tools needed for building were seemingly handled automatically when
cross-compiling before, but now they need to be explicitly built beforehand.
Conversely, a pure native build now builds these tools with CMake rather than
Autotools, so there is no longer any need to run eautoreconf and friends in this
case.
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-tv/kodi/kodi-9999.ebuild | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/media-tv/kodi/kodi-9999.ebuild b/media-tv/kodi/kodi-9999.ebuild
index 5d6b97caa74d..503c3d27ca41 100644
--- a/media-tv/kodi/kodi-9999.ebuild
+++ b/media-tv/kodi/kodi-9999.ebuild
@@ -30,7 +30,8 @@ PYTHON_COMPAT=( python3_{10..12} )
CPU_FLAGS="cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3
cpu_flags_x86_sse4_1 cpu_flags_x86_sse4_2 cpu_flags_x86_avx cpu_flags_x86_avx2
cpu_flags_arm_neon"
-inherit cmake desktop flag-o-matic java-pkg-2 linux-info optfeature pax-utils
python-single-r1 xdg
+inherit autotools cmake desktop flag-o-matic java-pkg-2 libtool linux-info
optfeature pax-utils python-single-r1 \
+ toolchain-funcs xdg
DESCRIPTION="A free and open source media-player and entertainment hub"
HOMEPAGE="https://kodi.tv/"
@@ -415,10 +416,26 @@ src_configure() {
#
https://github.com/xbmc/xbmc/commit/cb72a22d54a91845b1092c295f84eeb48328921e
filter-lto
+ if tc-is-cross-compiler; then
+ for t in "${NATIVE_TOOLS[@]}" ; do
+ pushd "${S}/tools/depends/native/$t/src" >/dev/null ||
die
+ econf_build
+ install -m0755 /dev/null "$t" || die # Actually build
later.
+ mycmakeargs+=( -DWITH_${t^^}="${PWD}/$t" )
+ popd >/dev/null || die
+ done
+ fi
+
cmake_src_configure
}
src_compile() {
+ if tc-is-cross-compiler; then
+ for t in "${NATIVE_TOOLS[@]}" ; do
+ emake -C "${S}/tools/depends/native/$t/src"
+ done
+ fi
+
cmake_src_compile all
use doc && cmake_build doc
use test && cmake_build kodi-test