From 04d1ee01054d21d138031dfd12eca49486360e26 Mon Sep 17 00:00:00 2001 From: Roy Kollen Svendsen Date: Fri, 16 May 2025 23:04:48 +0200 Subject: [PATCH] package/qt6/qt6multimedia: fix ffmpeg plugin build for x11 The following defconfig: BR2_arm=y BR2_cortex_a9=y BR2_ARM_ENABLE_VFP=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE=y BR2_PACKAGE_QT6=y BR2_PACKAGE_QT6BASE_XCB=y BR2_PACKAGE_QT6MULTIMEDIA=y BR2_PACKAGE_QT6MULTIMEDIA_FFMPEG=y BR2_PACKAGE_XORG7=y would fail to build, due to being not found, and then being not found. Fix that up by introducing the necessary dependencies. There are no build failures reported for qt6multimedia in the autobuilders, so there is no reference to a build failure. Signed-off-by: Roy Kollen Svendsen Signed-off-by: Thomas Petazzoni Signed-off-by: Arnout Vandecappelle --- package/qt6/qt6multimedia/Config.in | 5 +++++ package/qt6/qt6multimedia/qt6multimedia.mk | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/package/qt6/qt6multimedia/Config.in b/package/qt6/qt6multimedia/Config.in index ae555f98ea..3107caa597 100644 --- a/package/qt6/qt6multimedia/Config.in +++ b/package/qt6/qt6multimedia/Config.in @@ -38,6 +38,11 @@ config BR2_PACKAGE_QT6MULTIMEDIA_FFMPEG select BR2_PACKAGE_FFMPEG_SWSCALE select BR2_PACKAGE_QT6BASE_CONCURRENT select BR2_PACKAGE_QT6MULTIMEDIA_PULSEAUDIO + # libxext/libxrandr are needed for ffmpeg plugin to build with + # X11 support: + # https://code.qt.io/cgit/qt/qtmultimedia.git/tree/src/plugins/multimedia/ffmpeg/CMakeLists.txt?h=6.8.1#n198 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_XORG7 help This option enables ffmpeg media backend. diff --git a/package/qt6/qt6multimedia/qt6multimedia.mk b/package/qt6/qt6multimedia/qt6multimedia.mk index 98ab2ec4be..c2a9d250cf 100644 --- a/package/qt6/qt6multimedia/qt6multimedia.mk +++ b/package/qt6/qt6multimedia/qt6multimedia.mk @@ -66,6 +66,12 @@ endif ifeq ($(BR2_PACKAGE_QT6MULTIMEDIA_FFMPEG),y) QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_ffmpeg=ON QT6MULTIMEDIA_DEPENDENCIES += ffmpeg +# libxext/libxrandr are needed for ffmpeg plugin to build with X11 +# support: +# https://code.qt.io/cgit/qt/qtmultimedia.git/tree/src/plugins/multimedia/ffmpeg/CMakeLists.txt?h=6.8.1#n198 +ifeq ($(BR2_PACKAGE_XORG7),y) +QT6MULTIMEDIA_DEPENDENCIES += xlib_libXext xlib_libXrandr +endif else QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_ffmpeg=OFF endif