mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #5864 from SupervisedThinking/fix-wayland
[le11] fix wayland builds
This commit is contained in:
commit
5e534df291
@ -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} \
|
||||
|
@ -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()
|
@ -7,6 +7,7 @@ PKG_SHA256="017139251c122dbff400a507cddc4cb74120a431a50c6c524f30edcc5b331ade"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://pugixml.org/"
|
||||
PKG_URL="https://github.com/zeux/pugixml/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain:host"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="Light-weight, simple and fast XML parser for C++ with XPath support."
|
||||
PKG_BUILD_FLAGS="+pic"
|
||||
|
@ -2,8 +2,8 @@
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
|
||||
PKG_NAME="libinput"
|
||||
PKG_VERSION="1.16.4"
|
||||
PKG_SHA256="65923a06d5a8970e4a999c4668797b9b689614b62b1d44432ab1c87b65e39e29"
|
||||
PKG_VERSION="1.19.2"
|
||||
PKG_SHA256="0fc39f0af3ee1a77c60c34bc45391a4d0879169f7c0f7bbbeb5eef590b98b883"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.freedesktop.org/wiki/Software/libinput/"
|
||||
PKG_URL="http://www.freedesktop.org/software/libinput/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
|
@ -3,8 +3,8 @@
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="libxkbcommon"
|
||||
PKG_VERSION="1.0.3"
|
||||
PKG_SHA256="a2202f851e072b84e64a395212cbd976ee18a8ee602008b0bad02a13247dbc52"
|
||||
PKG_VERSION="1.3.1"
|
||||
PKG_SHA256="b3c710d27a2630054e1e1399c85b7f330ef03359b460f0c1b3b587fd01fe9234"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="http://xkbcommon.org"
|
||||
PKG_URL="http://xkbcommon.org/download/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
|
@ -2,14 +2,16 @@
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="wayland-protocols"
|
||||
PKG_VERSION="1.20"
|
||||
PKG_SHA256="9782b7a1a863d82d7c92478497d13c758f52e7da4f197aa16443f73de77e4de7"
|
||||
PKG_VERSION="1.23"
|
||||
PKG_SHA256="6c0af1915f96f615927a6270d025bd973ff1c58e521e4ca1fc9abfc914633f76"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="https://wayland.freedesktop.org/"
|
||||
PKG_URL="https://wayland.freedesktop.org/releases/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="Specifications of extended Wayland protocols"
|
||||
|
||||
PKG_MESON_OPTS_TARGET="-Dtests=false"
|
||||
|
||||
post_makeinstall_target() {
|
||||
rm -rf ${INSTALL}
|
||||
safe_remove ${INSTALL}
|
||||
}
|
||||
|
@ -7,33 +7,25 @@ PKG_SHA256="baccd902300d354581cd5ad3cc49daa4921d55fb416a5883e218750fef166d15"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="https://wayland.freedesktop.org/"
|
||||
PKG_URL="https://wayland.freedesktop.org/releases/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain wayland:host libffi expat libxml2"
|
||||
PKG_DEPENDS_HOST="libffi:host expat:host libxml2:host"
|
||||
PKG_DEPENDS_TARGET="toolchain wayland:host libffi expat libxml2"
|
||||
PKG_LONGDESC="a display server protocol"
|
||||
PKG_TOOLCHAIN="configure"
|
||||
|
||||
PKG_CONFIGURE_OPTS_HOST="--enable-shared \
|
||||
--disable-static \
|
||||
--disable-libraries \
|
||||
--disable-documentation \
|
||||
--with-gnu-ld"
|
||||
PKG_MESON_OPTS_HOST="-Dlibraries=false \
|
||||
-Dscanner=true \
|
||||
-Ddocumentation=false \
|
||||
-Ddtd_validation=false"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--with-sysroot=${SYSROOT_PREFIX} \
|
||||
--with-host-scanner \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--enable-libraries \
|
||||
--disable-documentation \
|
||||
--with-gnu-ld"
|
||||
PKG_MESON_OPTS_TARGET="-Dlibraries=true \
|
||||
-Dscanner=false \
|
||||
-Ddocumentation=false \
|
||||
-Ddtd_validation=false"
|
||||
|
||||
pre_configure_target() {
|
||||
# wayland does not build with NDEBUG (requires assert for tests)
|
||||
export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-DNDEBUG||g")
|
||||
export TARGET_CFLAGS=$(echo ${TARGET_CFLAGS} | sed -e "s|-DNDEBUG||g")
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
rm -rf ${INSTALL}/usr/bin
|
||||
rm -rf ${INSTALL}/usr/share
|
||||
|
||||
post_makeinstall_host() {
|
||||
cp ${TOOLCHAIN}/lib/pkgconfig/wayland-scanner.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig/
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
--- /src/meson.build
|
||||
+++ /src/meson.build
|
||||
@@ -58,7 +58,7 @@
|
||||
)
|
||||
endif
|
||||
|
||||
-if meson.is_cross_build() or not get_option('scanner')
|
||||
+if meson.is_cross_build() and get_option('libraries')
|
||||
scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
|
||||
wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
|
||||
else
|
||||
|
@ -7,9 +7,18 @@ PKG_SHA256="e7f486165d3568c3558b5c7099133aea4a285b82820eeafad329fc10271c654d"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/NilsBrause/waylandpp"
|
||||
PKG_URL="https://github.com/NilsBrause/waylandpp/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain:host pugixml:host"
|
||||
PKG_DEPENDS_TARGET="toolchain pugixml:host waylandpp:host"
|
||||
PKG_LONGDESC="Wayland C++ bindings"
|
||||
|
||||
configure_package() {
|
||||
if [ "${OPENGL_SUPPORT}" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET+=" ${OPENGL}"
|
||||
elif [ "${OPENGLES_SUPPORT}" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
|
||||
fi
|
||||
}
|
||||
|
||||
PKG_CMAKE_OPTS_HOST="-DBUILD_SCANNER=ON \
|
||||
-DBUILD_LIBRARIES=OFF"
|
||||
|
||||
|
@ -3,6 +3,9 @@ idle-time=0
|
||||
|
||||
[shell]
|
||||
locking=false
|
||||
background-color=0x00000000
|
||||
background-image=/usr/share/weston/splash-2160.png
|
||||
background-type=scale-crop
|
||||
|
||||
[launcher]
|
||||
path=/usr/lib/kodi/kodi.bin
|
||||
|
@ -19,6 +19,7 @@ PKG_MESON_OPTS_TARGET="-Dbackend-drm-screencast-vaapi=false \
|
||||
-Dweston-launch=false \
|
||||
-Dxwayland=false \
|
||||
-Dremoting=false \
|
||||
-Dpipewire=false \
|
||||
-Dshell-fullscreen=false \
|
||||
-Dshell-ivi=false \
|
||||
-Dcolor-management-lcms=false \
|
||||
@ -32,7 +33,7 @@ PKG_MESON_OPTS_TARGET="-Dbackend-drm-screencast-vaapi=false \
|
||||
|
||||
pre_configure_target() {
|
||||
# weston does not build with NDEBUG (requires assert for tests)
|
||||
export TARGET_CFLAGS=$(echo ${CFLAGS} | sed -e "s|-DNDEBUG||g")
|
||||
export TARGET_CFLAGS=$(echo ${TARGET_CFLAGS} | sed -e "s|-DNDEBUG||g")
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
@ -41,6 +42,7 @@ post_makeinstall_target() {
|
||||
|
||||
mkdir -p ${INSTALL}/usr/share/weston
|
||||
cp ${PKG_DIR}/config/weston.ini ${INSTALL}/usr/share/weston
|
||||
find_file_path "splash/splash-2160.png" && cp ${FOUND_PATH} ${INSTALL}/usr/share/weston
|
||||
|
||||
safe_remove ${INSTALL}/usr/share/wayland-sessions
|
||||
safe_remove ${INSTALL}/usr/bin/weston-calibrator
|
||||
|
Loading…
x
Reference in New Issue
Block a user