[Buildroot] [PATCH 2/4] package/qt6/qt6multimedia: fix ffmpeg plugin build for x11
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Fri May 16 21:04:48 UTC 2025
From: Roy Kollen Svendsen <roykollensvendsen at gmail.com>
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 <X11/extensions/Xext.h> being not found,
and then <X11/extensions/Xrandr.h> 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 <roykollensvendsen at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
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
--
2.49.0
More information about the buildroot
mailing list