commit:     b0a889f4e2fbd63db77ecd5a08792e5dcf66ed4a
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 23 23:20:08 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Jul 24 02:19:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0a889f4

dev-qt/qtmultimedia: update >=6.8 live

Originally thought it added native pipewire audio support, but this
is only for screencast and so not doing USE=pipewire.

Split off [X=] hack and add a redundant [X?] in case we are ever
able to remove it (aka gst not broken without xorg-proto, xorg-proto
in RDEPEND, or if a new EAPI adds a way declare DEPEND-only deps for
reverse deps).

gst[egl] could technically be optional, but feel it's not worth
introducing a USE. Arguably feel it should be unconditionally
enabled on gst if USE=opengl.

Updating the ebuild also exposed a bug in cmake's checks with gl_x11
and gl_wayland, been reported and doing a temporary workaround for now.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 ...qtmultimedia-6.8.0-gst-x11-wayland-detect.patch | 19 ++++++++++++
 dev-qt/qtmultimedia/qtmultimedia-6.8.9999.ebuild   | 34 +++++++++++++++++++---
 dev-qt/qtmultimedia/qtmultimedia-6.9999.ebuild     | 34 +++++++++++++++++++---
 3 files changed, 79 insertions(+), 8 deletions(-)

diff --git 
a/dev-qt/qtmultimedia/files/qtmultimedia-6.8.0-gst-x11-wayland-detect.patch 
b/dev-qt/qtmultimedia/files/qtmultimedia-6.8.0-gst-x11-wayland-detect.patch
new file mode 100644
index 000000000000..dab821a3bdb3
--- /dev/null
+++ b/dev-qt/qtmultimedia/files/qtmultimedia-6.8.0-gst-x11-wayland-detect.patch
@@ -0,0 +1,19 @@
+Temporary workaround while waiting for upstream's fix.
+
+https://bugreports.qt.io/browse/QTBUG-127484
+--- a/cmake/FindGStreamer.cmake
++++ b/cmake/FindGStreamer.cmake
+@@ -163,5 +163,5 @@
+         HEADER gst/gl/x11/gstgldisplay_x11.h
+         LIBRARY gstgl-1.0
+-        DEPENDENCIES GStreamer::Video GStreamer::Base GStreamer::Core 
GStreamer::Gl XCB::XCB )
++        DEPENDENCIES GStreamer::Video GStreamer::Base GStreamer::Core 
GStreamer::Gl )
+ endif()
+ 
+@@ -171,5 +171,5 @@
+         HEADER gst/gl/wayland/gstgldisplay_wayland.h
+         LIBRARY gstgl-1.0
+-        DEPENDENCIES GStreamer::Video GStreamer::Base GStreamer::Core 
GStreamer::Gl Wayland::Client )
++        DEPENDENCIES GStreamer::Video GStreamer::Base GStreamer::Core 
GStreamer::Gl )
+ endif()
+ 

diff --git a/dev-qt/qtmultimedia/qtmultimedia-6.8.9999.ebuild 
b/dev-qt/qtmultimedia/qtmultimedia-6.8.9999.ebuild
index 5c1df1f65c0e..59aa5849582b 100644
--- a/dev-qt/qtmultimedia/qtmultimedia-6.8.9999.ebuild
+++ b/dev-qt/qtmultimedia/qtmultimedia-6.8.9999.ebuild
@@ -11,15 +11,22 @@ if [[ ${QT6_BUILD_TYPE} == release ]]; then
        KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86"
 fi
 
-IUSE="+X alsa eglfs +ffmpeg gstreamer opengl pulseaudio qml v4l vaapi vulkan"
+IUSE="
+       +X alsa eglfs +ffmpeg gstreamer opengl pulseaudio
+       qml screencast v4l vaapi vulkan wayland
+"
 # tst_qmediaplayerbackend hard requires qml, review in case becomes optional
 REQUIRED_USE="
        || ( ffmpeg gstreamer )
        eglfs? ( ffmpeg opengl )
-       vaapi? ( ffmpeg opengl )
+       screencast? ( ffmpeg )
        test? ( qml )
+       vaapi? ( ffmpeg opengl )
 "
 
+# gstreamer[X=] is to avoid broken gst detect if -X w/ gst[X] w/o xorg-proto
+# (*could* be removed if gst-plugins-base[X] RDEPENDs on xorg-proto)
+# := skipped on pipewire due to only being used through dbus
 RDEPEND="
        ~dev-qt/qtbase-${PV}:6[gui,network,opengl=,vulkan=,widgets]
        alsa? (
@@ -37,8 +44,12 @@ RDEPEND="
        gstreamer? (
                dev-libs/glib:2
                media-libs/gst-plugins-bad:1.0
-               media-libs/gst-plugins-base:1.0[X=,opengl?]
+               media-libs/gst-plugins-base:1.0[X=]
                media-libs/gstreamer:1.0
+               opengl? (
+                       ~dev-qt/qtbase-${PV}:6[X?,wayland?]
+                       media-libs/gst-plugins-base:1.0[X?,egl,opengl,wayland?]
+               )
        )
        opengl? ( media-libs/libglvnd )
        pulseaudio? ( media-libs/libpulse )
@@ -46,6 +57,10 @@ RDEPEND="
                ~dev-qt/qtdeclarative-${PV}:6
                ~dev-qt/qtquick3d-${PV}:6
        )
+       screencast? (
+               ~dev-qt/qtbase-${PV}:6[dbus]
+               media-video/pipewire
+       )
 "
 DEPEND="
        ${RDEPEND}
@@ -73,6 +88,10 @@ CMAKE_SKIP_TESTS=(
        tst_qwindowcapturebackend
 )
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-6.8.0-gst-x11-wayland-detect.patch
+)
+
 src_configure() {
        # normally passed by the build system, but needed for 32-on-64 chroots
        use x86 && append-cppflags -DPFFFT_SIMD_DISABLE
@@ -81,8 +100,15 @@ src_configure() {
                $(cmake_use_find_package qml Qt6Qml)
                $(qt_feature ffmpeg)
                $(qt_feature gstreamer)
-               $(usev gstreamer $(qt_feature opengl gstreamer_gl))
+               $(usev gstreamer "
+                       $(qt_feature opengl gstreamer_gl)
+                       $(usev opengl "
+                               $(qt_feature X gstreamer_gl_x11)
+                               $(qt_feature wayland gstreamer_gl_wayland)
+                       ")
+               ")
                $(qt_feature pulseaudio)
+               $(qt_feature screencast pipewire)
                $(qt_feature v4l linux_v4l)
                $(qt_feature vaapi)
                -DQT_UNITY_BUILD=OFF # currently fails to build with

diff --git a/dev-qt/qtmultimedia/qtmultimedia-6.9999.ebuild 
b/dev-qt/qtmultimedia/qtmultimedia-6.9999.ebuild
index 5c1df1f65c0e..59aa5849582b 100644
--- a/dev-qt/qtmultimedia/qtmultimedia-6.9999.ebuild
+++ b/dev-qt/qtmultimedia/qtmultimedia-6.9999.ebuild
@@ -11,15 +11,22 @@ if [[ ${QT6_BUILD_TYPE} == release ]]; then
        KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86"
 fi
 
-IUSE="+X alsa eglfs +ffmpeg gstreamer opengl pulseaudio qml v4l vaapi vulkan"
+IUSE="
+       +X alsa eglfs +ffmpeg gstreamer opengl pulseaudio
+       qml screencast v4l vaapi vulkan wayland
+"
 # tst_qmediaplayerbackend hard requires qml, review in case becomes optional
 REQUIRED_USE="
        || ( ffmpeg gstreamer )
        eglfs? ( ffmpeg opengl )
-       vaapi? ( ffmpeg opengl )
+       screencast? ( ffmpeg )
        test? ( qml )
+       vaapi? ( ffmpeg opengl )
 "
 
+# gstreamer[X=] is to avoid broken gst detect if -X w/ gst[X] w/o xorg-proto
+# (*could* be removed if gst-plugins-base[X] RDEPENDs on xorg-proto)
+# := skipped on pipewire due to only being used through dbus
 RDEPEND="
        ~dev-qt/qtbase-${PV}:6[gui,network,opengl=,vulkan=,widgets]
        alsa? (
@@ -37,8 +44,12 @@ RDEPEND="
        gstreamer? (
                dev-libs/glib:2
                media-libs/gst-plugins-bad:1.0
-               media-libs/gst-plugins-base:1.0[X=,opengl?]
+               media-libs/gst-plugins-base:1.0[X=]
                media-libs/gstreamer:1.0
+               opengl? (
+                       ~dev-qt/qtbase-${PV}:6[X?,wayland?]
+                       media-libs/gst-plugins-base:1.0[X?,egl,opengl,wayland?]
+               )
        )
        opengl? ( media-libs/libglvnd )
        pulseaudio? ( media-libs/libpulse )
@@ -46,6 +57,10 @@ RDEPEND="
                ~dev-qt/qtdeclarative-${PV}:6
                ~dev-qt/qtquick3d-${PV}:6
        )
+       screencast? (
+               ~dev-qt/qtbase-${PV}:6[dbus]
+               media-video/pipewire
+       )
 "
 DEPEND="
        ${RDEPEND}
@@ -73,6 +88,10 @@ CMAKE_SKIP_TESTS=(
        tst_qwindowcapturebackend
 )
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-6.8.0-gst-x11-wayland-detect.patch
+)
+
 src_configure() {
        # normally passed by the build system, but needed for 32-on-64 chroots
        use x86 && append-cppflags -DPFFFT_SIMD_DISABLE
@@ -81,8 +100,15 @@ src_configure() {
                $(cmake_use_find_package qml Qt6Qml)
                $(qt_feature ffmpeg)
                $(qt_feature gstreamer)
-               $(usev gstreamer $(qt_feature opengl gstreamer_gl))
+               $(usev gstreamer "
+                       $(qt_feature opengl gstreamer_gl)
+                       $(usev opengl "
+                               $(qt_feature X gstreamer_gl_x11)
+                               $(qt_feature wayland gstreamer_gl_wayland)
+                       ")
+               ")
                $(qt_feature pulseaudio)
+               $(qt_feature screencast pipewire)
                $(qt_feature v4l linux_v4l)
                $(qt_feature vaapi)
                -DQT_UNITY_BUILD=OFF # currently fails to build with

Reply via email to