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:
f736325e66/Source/cmake/OptionsGTK.cmake (L59)

This is a port of buildroot commit 65f8174648
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 <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Bernd Kuhls
2024-12-15 11:55:33 +01:00
committed by Julien Olivain
parent 6744f0e936
commit 865457e762

View File

@@ -92,6 +92,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