From ecd9ffbdd38c16570ac18fd41d0c286477731d7b Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 15 Dec 2024 11:55:33 +0100 Subject: [PATCH] package/webkitgtk: disable libdrm usage when not available Fixes build error -- Could NOT find LibDRM (missing: LibDRM_INCLUDE_DIR LibDRM_LIBRARY) CMake Error at Source/cmake/OptionsGTK.cmake:320 (message): libdrm is required for USE_LIBDRM Call Stack (most recent call first): Source/cmake/WebKitCommon.cmake:237 (include) CMakeLists.txt:21 (include) with this defconfig: BR2_arm=y BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y BR2_TOOLCHAIN_BUILDROOT_WCHAR=y BR2_PTHREADS=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_PER_PACKAGE_DIRECTORIES=y BR2_PACKAGE_XORG7=y BR2_PACKAGE_RPI_USERLAND=y BR2_PACKAGE_LIBGTK3=y BR2_PACKAGE_WEBKITGTK=y due to libdrm being enabled by default: https://github.com/WebKit/WebKit/blob/f736325e66bfa8e85f85387299448476f3e1fb3c/Source/cmake/OptionsGTK.cmake#L59 This is a port of buildroot commit 65f8174648a3df922892cfac1ad15279d1bffde3 for the wpewebkit package, quoting its commit message: Pass USE_LIBDRM=OFF to the wpewebkit CMake configuration step when the libdrm package has not been selected. WPE WebKit can be built without libdrm support, and it will still work with backends that use other platform-specific methods to handle graphics buffers and/or presenting content onto an output. For example this is the case with wpebackend-rdk configured to use rpi-userland, which uses dispmanx to produce the output instead of DRM/KMS. Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain (cherry picked from commit 865457e76201f663cf81b09486485fbee961423d) Signed-off-by: Peter Korsgaard --- package/webkitgtk/webkitgtk.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk index 468fefab0e..e4ab947da4 100644 --- a/package/webkitgtk/webkitgtk.mk +++ b/package/webkitgtk/webkitgtk.mk @@ -82,6 +82,13 @@ else WEBKITGTK_CONF_OPTS += -DUSE_LIBBACKTRACE=OFF endif +ifeq ($(BR2_PACKAGE_LIBDRM),y) +WEBKITGTK_CONF_OPTS += -DUSE_LIBDRM=ON +WEBKITGTK_DEPENDENCIES += libdrm +else +WEBKITGTK_CONF_OPTS += -DUSE_LIBDRM=OFF +endif + ifeq ($(BR2_PACKAGE_LIBJXL),y) WEBKITGTK_CONF_OPTS += -DUSE_JPEGXL=ON WEBKITGTK_DEPENDENCIES += libjxl