kodi: fix wayland build

- since 767ff84dd2 Kodi will fail to build since wayland-scanner++ is only build for host so patch the send error out
- added opts to scanner path
- updated GBM build to prevent overwriting of Wayland opts, if a displayserver like weston is present GBM opts will be skipped
This commit is contained in:
SupervisedThinking 2021-11-17 15:15:59 +01:00
parent 0d2805540d
commit 82aa90887c
2 changed files with 32 additions and 8 deletions

View File

@ -28,14 +28,16 @@ configure_package() {
if [ "${DISPLAYSERVER}" = "x11" ]; then
PKG_DEPENDS_TARGET+=" libX11 libXext libdrm libXrandr"
KODI_XORG="-DCORE_PLATFORM_NAME=x11 -DAPP_RENDER_SYSTEM=gl"
KODI_PLATFORM="-DCORE_PLATFORM_NAME=x11 \
-DAPP_RENDER_SYSTEM=gl"
elif [ "${DISPLAYSERVER}" = "weston" ]; then
PKG_DEPENDS_TARGET+=" wayland waylandpp"
CFLAGS+=" -DMESA_EGL_NO_X11_HEADERS"
CXXFLAGS+=" -DMESA_EGL_NO_X11_HEADERS"
KODI_XORG="-DCORE_PLATFORM_NAME=wayland \
-DAPP_RENDER_SYSTEM=gles \
-DWAYLANDPP_PROTOCOLS_DIR=${SYSROOT_PREFIX}/usr/share/waylandpp/protocols"
CFLAGS+=" -DEGL_NO_X11"
CXXFLAGS+=" -DEGL_NO_X11"
KODI_PLATFORM="-DCORE_PLATFORM_NAME=wayland \
-DAPP_RENDER_SYSTEM=gles \
-DWAYLANDPP_SCANNER=${TOOLCHAIN}/bin/wayland-scanner++ \
-DWAYLANDPP_PROTOCOLS_DIR=${SYSROOT_PREFIX}/usr/share/waylandpp/protocols"
fi
if [ ! "${OPENGL}" = "no" ]; then
@ -172,7 +174,7 @@ configure_package() {
KODI_ARCH="-DWITH_ARCH=${TARGET_ARCH}"
fi
if [ ! "${KODIPLAYER_DRIVER}" = default ]; then
if [ ! "${KODIPLAYER_DRIVER}" = "default" -a "${DISPLAYSERVER}" = "no" ]; then
PKG_DEPENDS_TARGET+=" ${KODIPLAYER_DRIVER} libinput libxkbcommon"
if [ "${OPENGLES_SUPPORT}" = yes -a "${KODIPLAYER_DRIVER}" = "${OPENGLES}" ]; then
KODI_PLAYER="-DCORE_PLATFORM_NAME=gbm -DAPP_RENDER_SYSTEM=gles"
@ -221,7 +223,7 @@ configure_package() {
${KODI_VDPAU} \
${KODI_VAAPI} \
${KODI_CEC} \
${KODI_XORG} \
${KODI_PLATFORM} \
${KODI_SAMBA} \
${KODI_NFS} \
${KODI_LIBDVD} \

View File

@ -0,0 +1,22 @@
From b91a76aea33b60be19d3b66f9a49438887576ce6 Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Sat, 13 Nov 2021 08:23:54 -0800
Subject: [PATCH] cmake: allow providing WAYLANDPP_SCANNER in a cross compile
---
cmake/modules/FindWaylandpp.cmake | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cmake/modules/FindWaylandpp.cmake b/cmake/modules/FindWaylandpp.cmake
index ba229d7ffcb3f..b874cd0ba3218 100644
--- a/cmake/modules/FindWaylandpp.cmake
+++ b/cmake/modules/FindWaylandpp.cmake
@@ -22,6 +22,8 @@ pkg_check_modules(PC_WAYLANDPP_SCANNER wayland-scanner++ QUIET)
if(PC_WAYLANDPP_SCANNER_FOUND)
pkg_get_variable(PC_WAYLANDPP_SCANNER wayland-scanner++ wayland_scannerpp)
+elseif(WAYLANDPP_SCANNER)
+ message(STATUS "wayland-scanner++ already set to: ${WAYLANDPP_SCANNER}")
else()
message(SEND_ERROR "wayland-scanner++ not found via pkg-config")
endif()