Skip to content

Commit

Permalink
dev-qt/qtmultimedia: update >=6.8 live
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ionenwks committed Jul 24, 2024
1 parent e6991b9 commit b0a889f
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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()

34 changes: 30 additions & 4 deletions dev-qt/qtmultimedia/qtmultimedia-6.8.9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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? (
Expand All @@ -37,15 +44,23 @@ 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 )
qml? (
~dev-qt/qtdeclarative-${PV}:6
~dev-qt/qtquick3d-${PV}:6
)
screencast? (
~dev-qt/qtbase-${PV}:6[dbus]
media-video/pipewire
)
"
DEPEND="
${RDEPEND}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
34 changes: 30 additions & 4 deletions dev-qt/qtmultimedia/qtmultimedia-6.9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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? (
Expand All @@ -37,15 +44,23 @@ 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 )
qml? (
~dev-qt/qtdeclarative-${PV}:6
~dev-qt/qtquick3d-${PV}:6
)
screencast? (
~dev-qt/qtbase-${PV}:6[dbus]
media-video/pipewire
)
"
DEPEND="
${RDEPEND}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b0a889f

Please sign in to comment.