Add dev-qt from an older version of the gentoo repo

Qt5 has been removed, we restore it since we still use it.
This commit is contained in:
2026-07-03 09:45:00 +02:00
parent 2247967dd3
commit 692df50613
319 changed files with 15302 additions and 0 deletions

View File

@ -0,0 +1,4 @@
DIST qtmultimedia-5.15.18-gentoo-kde-1.tar.xz 1492 BLAKE2B 34ca71385153f3acf3d59797a7071838e6e8f9b0d119cf095e8d12724c485c55c4fc905cdaec4774a1279745af55dee1236ace0e702ed3e61395a21ff40cf6a7 SHA512 86acbce6620ec8242db9b76ba41692afca5a081f994038335a1419788a986e39a93116459ceeeb6835a4076d67b8fe777da54d62efd376623a937e4504431c86
DIST qtmultimedia-everywhere-opensource-src-5.15.18.tar.xz 3810252 BLAKE2B 4c69ae7d07b9d0edfadbaf5e51585c267466aba3e64a4841f768534bf87360144d987eddfa036baaab40066420aaf82bd081054bc4204244ec0b2ab6d2cb0724 SHA512 edebe73911c82ef5671602f895dd1cddcc39b8afb29267be54921848713344d531e49f4cbcfb9a57b095c4e736a9100c245290391102ddccdb08997057a12bd8
DIST qtmultimedia-everywhere-src-6.10.3.tar.xz 9914688 BLAKE2B 4f22de40c2547ee5541ccb23ebb9a0c84e8d58bc67c917569805a5a3452ffefbb0a107c4a1f65883d2725b406aba2cab6e68c5e633cdc976e1eb22e3b1791b6d SHA512 91f494e1784d1cbdfc683d18c0c1b086845ba5ff093777114996b88c14a59210358fa52527bcf79dc7166e83ce95c15b6d2a1793fdc1d3e7016ae8b066eaa9a8
DIST qtmultimedia-everywhere-src-6.11.1.tar.xz 10243896 BLAKE2B 66e7a638a644a990e1c932bad40711f193ab8bae808a07ac1e8d58c18caaf89493519aedbec6fd42d3c9a2db701f06ad408edc601ccdbdf6e6cd26246c077ee5 SHA512 accd9534b96df8ff464c219bf579c3da43e30b33efb35fc7e311c9e133cb57252f433422ca917f83b738e67cf925b19e0847ffcfaa92fe0e3d21b603dd580cd5

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>qt@gentoo.org</email>
<name>Gentoo Qt Project</name>
</maintainer>
<use>
<flag name="eglfs">Enable screen capture support with Qt's EGL Full Screen/Single Surface platform plugin</flag>
<flag name="gstreamer">Enable <pkg>media-libs/gstreamer</pkg> support</flag>
<flag name="pipewire">Enable <pkg>media-video/pipewire</pkg> support</flag>
<flag name="qml">Build QML/QtQuick bindings and imports</flag>
<flag name="widgets">Build the QtMultimediaWidgets module</flag>
</use>
<upstream>
<bugs-to>https://qt-project.atlassian.net/</bugs-to>
<doc>https://doc.qt.io/</doc>
<remote-id type="github">qt/qtmultimedia</remote-id>
</upstream>
<slots>
<subslots>
Must only be used by packages that are known to use private parts of the Qt API.
</subslots>
</slots>
</pkgmetadata>

View File

@ -0,0 +1,70 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ ${PV} != *9999* ]]; then
QT5_KDEPATCHSET_REV=1
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
fi
inherit qt5-build
DESCRIPTION="Multimedia (audio, video, radio, camera) library for the Qt5 framework"
IUSE="alsa gles2-only gstreamer openal pulseaudio qml widgets"
RDEPEND="
=dev-qt/qtcore-${QT5_PV}*
=dev-qt/qtgui-${QT5_PV}*[gles2-only=]
=dev-qt/qtnetwork-${QT5_PV}*
alsa? ( media-libs/alsa-lib )
gstreamer? (
dev-libs/glib:2
media-libs/gstreamer:1.0
media-libs/gst-plugins-bad:1.0
media-libs/gst-plugins-base:1.0
)
pulseaudio? ( media-libs/libpulse[glib] )
qml? (
=dev-qt/qtdeclarative-${QT5_PV}*
gles2-only? ( =dev-qt/qtgui-${QT5_PV}*[egl] )
openal? ( media-libs/openal )
)
widgets? (
=dev-qt/qtwidgets-${QT5_PV}*[gles2-only=]
media-libs/libglvnd
)
"
DEPEND="${RDEPEND}
gstreamer? ( x11-base/xorg-proto )
"
src_prepare() {
sed -i -e '/CONFIG\s*+=/ s/optimize_full//' \
src/multimedia/multimedia.pro || die
qt_use_disable_config openal openal \
src/imports/imports.pro
qt_use_disable_mod qml quick \
src/src.pro \
src/plugins/plugins.pro
qt_use_disable_mod widgets widgets \
src/src.pro \
src/gsttools/gsttools.pro \
src/plugins/gstreamer/common.pri
qt5-build_src_prepare
}
src_configure() {
local myqmakeargs=(
--
$(qt_use alsa)
$(qt_use gstreamer)
$(qt_use pulseaudio)
)
qt5-build_src_configure
}

View File

@ -0,0 +1,153 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
QT6_HAS_STATIC_LIBS=1
inherit flag-o-matic qt6-build
DESCRIPTION="Multimedia (audio, video, radio, camera) library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc64 ~riscv x86"
fi
IUSE="
+X alsa +dbus eglfs +ffmpeg gstreamer opengl pipewire pulseaudio
qml +v4l vaapi vulkan wayland
"
REQUIRED_USE="
|| ( ffmpeg gstreamer )
eglfs? ( ffmpeg opengl qml )
vaapi? ( ffmpeg opengl )
"
# dlopen/dbus: pipewire
RDEPEND="
~dev-qt/qtbase-${PV}:6[concurrent,gui,network,opengl=,vulkan=,widgets]
alsa? (
!pulseaudio? ( media-libs/alsa-lib )
)
ffmpeg? (
~dev-qt/qtbase-${PV}:6[X=,concurrent,eglfs=]
media-video/ffmpeg:=[vaapi?]
X? (
x11-libs/libX11
x11-libs/libXext
x11-libs/libXrandr
)
)
gstreamer? (
dev-libs/glib:2
media-libs/gst-plugins-bad:1.0
media-libs/gst-plugins-base:1.0
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 )
pipewire? (
~dev-qt/qtbase-${PV}:6[dbus?]
media-video/pipewire:=
)
pulseaudio? ( media-libs/libpulse )
qml? (
~dev-qt/qtdeclarative-${PV}:6
~dev-qt/qtquick3d-${PV}:6
)
"
DEPEND="
${RDEPEND}
X? ( x11-base/xorg-proto )
v4l? ( sys-kernel/linux-headers )
vulkan? ( dev-util/vulkan-headers )
"
BDEPEND="~dev-qt/qtshadertools-${PV}:6"
CMAKE_SKIP_TESTS=(
# unimportant and expects all backends to be available (bug #928420)
tst_backends
# tries to use real alsa or pulseaudio and fails in sandbox
tst_qaudiosink
tst_qaudiosource
tst_qmediacapture_gstreamer
tst_qmediacapturesession
tst_qmediaframeinputsbackend
tst_qmediaplayer_gstreamer
tst_qmediaplayerbackend
tst_qsoundeffect
# may try to use v4l2 or hardware acceleration depending on availability
tst_qcamerabackend #972689
tst_qmediarecorderbackend
tst_qscreencapture_integration
tst_qscreencapturebackend
tst_qvideoframebackend
# seems flaky depending on what codecs system libraries support or not
tst_qmediaformatbackend
# fails with offscreen rendering
tst_qvideoframecolormanagement
tst_qwindowcapturebackend
)
src_prepare() {
qt6-build_src_prepare
# test expects GStreamer to report an exact bitrate value, but
# this varies depending on version and Qt updates it only now
# and then (disabling permanently with a sed to avoid rebases)
sed -e '/bool validateBitRates = GST_CHECK_VERSION/s/= .*/= false;/' \
-i tests/auto/unit/plugins/multimedia/gstreamer/gstreamer_backend/tst_gstreamer_backend.cpp || die
}
src_configure() {
# normally passed by the build system, but needed for 32-on-64 chroots
use x86 && append-cppflags -DDISABLE_SIMD -DPFFFT_SIMD_DISABLE
local mycmakeargs=(
$(cmake_use_find_package qml Qt6Qml)
$(qt_feature ffmpeg)
$(qt_feature gstreamer)
$(usev gstreamer "
$(qt_feature opengl gstreamer_gl)
$(usev opengl "
$(qt_feature X gstreamer_gl_x11)
$(qt_feature wayland gstreamer_gl_wayland)
")
")
$(qt_feature pipewire)
$(usev pipewire $(qt_feature dbus pipewire_screencapture))
$(qt_feature pulseaudio)
$(qt_feature v4l linux_v4l)
$(qt_feature vaapi)
)
# ALSA backend is experimental off-by-default and can take priority
# causing problems (bug #935146), disable if USE=pulseaudio is set
# (also do not want unnecessary usage of ALSA plugins -> pulse)
if use alsa && use pulseaudio; then
# einfo should be enough given pure-ALSA users tend to disable pulse
einfo "Warning: USE=alsa is ignored when USE=pulseaudio is set"
mycmakeargs+=( -DQT_FEATURE_alsa=OFF )
else
mycmakeargs+=( $(qt_feature alsa) )
fi
qt6-build_src_configure
}
src_install() {
qt6-build_src_install
if use test; then
local delete=( # sigh
"${D}${QT6_LIBDIR}"/cmake/Qt6Multimedia/Qt6MockMultimediaPlugin*.cmake
"${D}${QT6_MKSPECSDIR}"/modules/qt_plugin_mockmultimediaplugin.pri
"${D}${QT6_PLUGINDIR}"/multimedia/libmockmultimediaplugin.*
"${D}${QT6_PLUGINDIR}"/multimedia/objects-*
)
# using -f given not tracking which tests may be skipped or not
rm -rf -- "${delete[@]}" || die
fi
}

View File

@ -0,0 +1,154 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
QT6_HAS_STATIC_LIBS=1
inherit flag-o-matic qt6-build
DESCRIPTION="Multimedia (audio, video, radio, camera) library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc64 ~riscv x86"
fi
IUSE="
+X alsa +dbus eglfs +ffmpeg gstreamer opengl pipewire pulseaudio
qml +v4l vaapi vulkan wayland
"
REQUIRED_USE="
|| ( ffmpeg gstreamer )
eglfs? ( ffmpeg opengl qml )
vaapi? ( ffmpeg opengl )
"
# dlopen/dbus: pipewire
RDEPEND="
~dev-qt/qtbase-${PV}:6[concurrent,gui,network,opengl=,vulkan=,widgets]
alsa? (
!pulseaudio? ( media-libs/alsa-lib )
)
ffmpeg? (
~dev-qt/qtbase-${PV}:6[X=,concurrent,eglfs=]
media-video/ffmpeg:=[vaapi?]
X? (
x11-libs/libX11
x11-libs/libXext
x11-libs/libXrandr
)
)
gstreamer? (
dev-libs/glib:2
media-libs/gst-plugins-bad:1.0
media-libs/gst-plugins-base:1.0
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 )
pipewire? (
~dev-qt/qtbase-${PV}:6[dbus?]
media-video/pipewire:=
)
pulseaudio? ( media-libs/libpulse )
qml? (
~dev-qt/qtdeclarative-${PV}:6
~dev-qt/qtquick3d-${PV}:6
)
vaapi? ( media-libs/libva:= )
"
DEPEND="
${RDEPEND}
X? ( x11-base/xorg-proto )
v4l? ( sys-kernel/linux-headers )
vulkan? ( dev-util/vulkan-headers )
"
BDEPEND="~dev-qt/qtshadertools-${PV}:6"
CMAKE_SKIP_TESTS=(
# unimportant and expects all backends to be available (bug #928420)
tst_backends
# tries to use real alsa or pulseaudio and fails in sandbox
tst_qaudiosink
tst_qaudiosource
tst_qmediacapture_gstreamer
tst_qmediacapturesession
tst_qmediaframeinputsbackend
tst_qmediaplayer_gstreamer
tst_qmediaplayerbackend
tst_qsoundeffect
# may try to use v4l2 or hardware acceleration depending on availability
tst_qcamerabackend #972689
tst_qmediarecorderbackend
tst_qscreencapture_integration
tst_qscreencapturebackend
tst_qvideoframebackend
# seems flaky depending on what codecs system libraries support or not
tst_qmediaformatbackend
# fails with offscreen rendering
tst_qvideoframecolormanagement
tst_qwindowcapturebackend
)
src_prepare() {
qt6-build_src_prepare
# test expects GStreamer to report an exact bitrate value, but
# this varies depending on version and Qt updates it only now
# and then (disabling permanently with a sed to avoid rebases)
sed -e '/bool validateBitRates = GST_CHECK_VERSION/s/= .*/= false;/' \
-i tests/auto/unit/plugins/multimedia/gstreamer/gstreamer_backend/tst_gstreamer_backend.cpp || die
}
src_configure() {
# normally passed by the build system, but needed for 32-on-64 chroots
use x86 && append-cppflags -DDISABLE_SIMD -DPFFFT_SIMD_DISABLE
local mycmakeargs=(
$(cmake_use_find_package qml Qt6Qml)
$(qt_feature ffmpeg)
$(qt_feature gstreamer)
$(usev gstreamer "
$(qt_feature opengl gstreamer_gl)
$(usev opengl "
$(qt_feature X gstreamer_gl_x11)
$(qt_feature wayland gstreamer_gl_wayland)
")
")
$(qt_feature pipewire)
$(usev pipewire $(qt_feature dbus pipewire_screencapture))
$(qt_feature pulseaudio)
$(qt_feature v4l linux_v4l)
$(qt_feature vaapi)
)
# ALSA backend is experimental off-by-default and can take priority
# causing problems (bug #935146), disable if USE=pulseaudio is set
# (also do not want unnecessary usage of ALSA plugins -> pulse)
if use alsa && use pulseaudio; then
# einfo should be enough given pure-ALSA users tend to disable pulse
einfo "Warning: USE=alsa is ignored when USE=pulseaudio is set"
mycmakeargs+=( -DQT_FEATURE_alsa=OFF )
else
mycmakeargs+=( $(qt_feature alsa) )
fi
qt6-build_src_configure
}
src_install() {
qt6-build_src_install
if use test; then
local delete=( # sigh
"${D}${QT6_LIBDIR}"/cmake/Qt6Multimedia/Qt6MockMultimediaPlugin*.cmake
"${D}${QT6_MKSPECSDIR}"/modules/qt_plugin_mockmultimediaplugin.pri
"${D}${QT6_PLUGINDIR}"/multimedia/libmockmultimediaplugin.*
"${D}${QT6_PLUGINDIR}"/multimedia/objects-*
)
# using -f given not tracking which tests may be skipped or not
rm -rf -- "${delete[@]}" || die
fi
}

View File

@ -0,0 +1,154 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
QT6_HAS_STATIC_LIBS=1
inherit flag-o-matic qt6-build
DESCRIPTION="Multimedia (audio, video, radio, camera) library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc64 ~riscv ~x86"
fi
IUSE="
+X alsa +dbus eglfs +ffmpeg gstreamer opengl pipewire pulseaudio
qml +v4l vaapi vulkan wayland
"
REQUIRED_USE="
|| ( ffmpeg gstreamer )
eglfs? ( ffmpeg opengl qml )
vaapi? ( ffmpeg opengl )
"
# dlopen/dbus: pipewire
RDEPEND="
~dev-qt/qtbase-${PV}:6[concurrent,gui,network,opengl=,vulkan=,widgets]
alsa? (
!pulseaudio? ( media-libs/alsa-lib )
)
ffmpeg? (
~dev-qt/qtbase-${PV}:6[X=,concurrent,eglfs=]
media-video/ffmpeg:=[vaapi?]
X? (
x11-libs/libX11
x11-libs/libXext
x11-libs/libXrandr
)
)
gstreamer? (
dev-libs/glib:2
media-libs/gst-plugins-bad:1.0
media-libs/gst-plugins-base:1.0
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 )
pipewire? (
~dev-qt/qtbase-${PV}:6[dbus?]
media-video/pipewire:=
)
pulseaudio? ( media-libs/libpulse )
qml? (
~dev-qt/qtdeclarative-${PV}:6
~dev-qt/qtquick3d-${PV}:6
)
vaapi? ( media-libs/libva:= )
"
DEPEND="
${RDEPEND}
X? ( x11-base/xorg-proto )
v4l? ( sys-kernel/linux-headers )
vulkan? ( dev-util/vulkan-headers )
"
BDEPEND="~dev-qt/qtshadertools-${PV}:6"
CMAKE_SKIP_TESTS=(
# unimportant and expects all backends to be available (bug #928420)
tst_backends
# tries to use real alsa or pulseaudio and fails in sandbox
tst_qaudiosink
tst_qaudiosource
tst_qmediacapture_gstreamer
tst_qmediacapturesession
tst_qmediaframeinputsbackend
tst_qmediaplayer_gstreamer
tst_qmediaplayerbackend
tst_qsoundeffect
# may try to use v4l2 or hardware acceleration depending on availability
tst_qcamerabackend #972689
tst_qmediarecorderbackend
tst_qscreencapture_integration
tst_qscreencapturebackend
tst_qvideoframebackend
# seems flaky depending on what codecs system libraries support or not
tst_qmediaformatbackend
# fails with offscreen rendering
tst_qvideoframecolormanagement
tst_qwindowcapturebackend
)
src_prepare() {
qt6-build_src_prepare
# test expects GStreamer to report an exact bitrate value, but
# this varies depending on version and Qt updates it only now
# and then (disabling permanently with a sed to avoid rebases)
sed -e '/bool validateBitRates = GST_CHECK_VERSION/s/= .*/= false;/' \
-i tests/auto/unit/plugins/multimedia/gstreamer/gstreamer_backend/tst_gstreamer_backend.cpp || die
}
src_configure() {
# normally passed by the build system, but needed for 32-on-64 chroots
use x86 && append-cppflags -DDISABLE_SIMD -DPFFFT_SIMD_DISABLE
local mycmakeargs=(
$(cmake_use_find_package qml Qt6Qml)
$(qt_feature ffmpeg)
$(qt_feature gstreamer)
$(usev gstreamer "
$(qt_feature opengl gstreamer_gl)
$(usev opengl "
$(qt_feature X gstreamer_gl_x11)
$(qt_feature wayland gstreamer_gl_wayland)
")
")
$(qt_feature pipewire)
$(usev pipewire $(qt_feature dbus pipewire_screencapture))
$(qt_feature pulseaudio)
$(qt_feature v4l linux_v4l)
$(qt_feature vaapi)
)
# ALSA backend is experimental off-by-default and can take priority
# causing problems (bug #935146), disable if USE=pulseaudio is set
# (also do not want unnecessary usage of ALSA plugins -> pulse)
if use alsa && use pulseaudio; then
# einfo should be enough given pure-ALSA users tend to disable pulse
einfo "Warning: USE=alsa is ignored when USE=pulseaudio is set"
mycmakeargs+=( -DQT_FEATURE_alsa=OFF )
else
mycmakeargs+=( $(qt_feature alsa) )
fi
qt6-build_src_configure
}
src_install() {
qt6-build_src_install
if use test; then
local delete=( # sigh
"${D}${QT6_LIBDIR}"/cmake/Qt6Multimedia/Qt6MockMultimediaPlugin*.cmake
"${D}${QT6_MKSPECSDIR}"/modules/qt_plugin_mockmultimediaplugin.pri
"${D}${QT6_PLUGINDIR}"/multimedia/libmockmultimediaplugin.*
"${D}${QT6_PLUGINDIR}"/multimedia/objects-*
)
# using -f given not tracking which tests may be skipped or not
rm -rf -- "${delete[@]}" || die
fi
}

View File

@ -0,0 +1,154 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
QT6_HAS_STATIC_LIBS=1
inherit flag-o-matic qt6-build
DESCRIPTION="Multimedia (audio, video, radio, camera) library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc64 ~riscv ~x86"
fi
IUSE="
+X alsa +dbus eglfs +ffmpeg gstreamer opengl pipewire pulseaudio
qml +v4l vaapi vulkan wayland
"
REQUIRED_USE="
|| ( ffmpeg gstreamer )
eglfs? ( ffmpeg opengl qml )
vaapi? ( ffmpeg opengl )
"
# dlopen/dbus: pipewire
RDEPEND="
~dev-qt/qtbase-${PV}:6[concurrent,gui,network,opengl=,vulkan=,widgets]
alsa? (
!pulseaudio? ( media-libs/alsa-lib )
)
ffmpeg? (
~dev-qt/qtbase-${PV}:6[X=,concurrent,eglfs=]
media-video/ffmpeg:=[vaapi?]
X? (
x11-libs/libX11
x11-libs/libXext
x11-libs/libXrandr
)
)
gstreamer? (
dev-libs/glib:2
media-libs/gst-plugins-bad:1.0
media-libs/gst-plugins-base:1.0
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 )
pipewire? (
~dev-qt/qtbase-${PV}:6[dbus?]
media-video/pipewire:=
)
pulseaudio? ( media-libs/libpulse )
qml? (
~dev-qt/qtdeclarative-${PV}:6
~dev-qt/qtquick3d-${PV}:6
)
vaapi? ( media-libs/libva:= )
"
DEPEND="
${RDEPEND}
X? ( x11-base/xorg-proto )
v4l? ( sys-kernel/linux-headers )
vulkan? ( dev-util/vulkan-headers )
"
BDEPEND="~dev-qt/qtshadertools-${PV}:6"
CMAKE_SKIP_TESTS=(
# unimportant and expects all backends to be available (bug #928420)
tst_backends
# tries to use real alsa or pulseaudio and fails in sandbox
tst_qaudiosink
tst_qaudiosource
tst_qmediacapture_gstreamer
tst_qmediacapturesession
tst_qmediaframeinputsbackend
tst_qmediaplayer_gstreamer
tst_qmediaplayerbackend
tst_qsoundeffect
# may try to use v4l2 or hardware acceleration depending on availability
tst_qcamerabackend #972689
tst_qmediarecorderbackend
tst_qscreencapture_integration
tst_qscreencapturebackend
tst_qvideoframebackend
# seems flaky depending on what codecs system libraries support or not
tst_qmediaformatbackend
# fails with offscreen rendering
tst_qvideoframecolormanagement
tst_qwindowcapturebackend
)
src_prepare() {
qt6-build_src_prepare
# test expects GStreamer to report an exact bitrate value, but
# this varies depending on version and Qt updates it only now
# and then (disabling permanently with a sed to avoid rebases)
sed -e '/bool validateBitRates = GST_CHECK_VERSION/s/= .*/= false;/' \
-i tests/auto/unit/plugins/multimedia/gstreamer/gstreamer_backend/tst_gstreamer_backend.cpp || die
}
src_configure() {
# normally passed by the build system, but needed for 32-on-64 chroots
use x86 && append-cppflags -DDISABLE_SIMD -DPFFFT_SIMD_DISABLE
local mycmakeargs=(
$(cmake_use_find_package qml Qt6Qml)
$(qt_feature ffmpeg)
$(qt_feature gstreamer)
$(usev gstreamer "
$(qt_feature opengl gstreamer_gl)
$(usev opengl "
$(qt_feature X gstreamer_gl_x11)
$(qt_feature wayland gstreamer_gl_wayland)
")
")
$(qt_feature pipewire)
$(usev pipewire $(qt_feature dbus pipewire_screencapture))
$(qt_feature pulseaudio)
$(qt_feature v4l linux_v4l)
$(qt_feature vaapi)
)
# ALSA backend is experimental off-by-default and can take priority
# causing problems (bug #935146), disable if USE=pulseaudio is set
# (also do not want unnecessary usage of ALSA plugins -> pulse)
if use alsa && use pulseaudio; then
# einfo should be enough given pure-ALSA users tend to disable pulse
einfo "Warning: USE=alsa is ignored when USE=pulseaudio is set"
mycmakeargs+=( -DQT_FEATURE_alsa=OFF )
else
mycmakeargs+=( $(qt_feature alsa) )
fi
qt6-build_src_configure
}
src_install() {
qt6-build_src_install
if use test; then
local delete=( # sigh
"${D}${QT6_LIBDIR}"/cmake/Qt6Multimedia/Qt6MockMultimediaPlugin*.cmake
"${D}${QT6_MKSPECSDIR}"/modules/qt_plugin_mockmultimediaplugin.pri
"${D}${QT6_PLUGINDIR}"/multimedia/libmockmultimediaplugin.*
"${D}${QT6_PLUGINDIR}"/multimedia/objects-*
)
# using -f given not tracking which tests may be skipped or not
rm -rf -- "${delete[@]}" || die
fi
}

View File

@ -0,0 +1,154 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
QT6_HAS_STATIC_LIBS=1
inherit flag-o-matic qt6-build
DESCRIPTION="Multimedia (audio, video, radio, camera) library for the Qt6 framework"
if [[ ${QT6_BUILD_TYPE} == release ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc64 ~riscv ~x86"
fi
IUSE="
+X alsa +dbus eglfs +ffmpeg gstreamer opengl pipewire pulseaudio
qml +v4l vaapi vulkan wayland
"
REQUIRED_USE="
|| ( ffmpeg gstreamer )
eglfs? ( ffmpeg opengl qml )
vaapi? ( ffmpeg opengl )
"
# dlopen/dbus: pipewire
RDEPEND="
~dev-qt/qtbase-${PV}:6[concurrent,gui,network,opengl=,vulkan=,widgets]
alsa? (
!pulseaudio? ( media-libs/alsa-lib )
)
ffmpeg? (
~dev-qt/qtbase-${PV}:6[X=,concurrent,eglfs=]
media-video/ffmpeg:=[vaapi?]
X? (
x11-libs/libX11
x11-libs/libXext
x11-libs/libXrandr
)
)
gstreamer? (
dev-libs/glib:2
media-libs/gst-plugins-bad:1.0
media-libs/gst-plugins-base:1.0
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 )
pipewire? (
~dev-qt/qtbase-${PV}:6[dbus?]
media-video/pipewire:=
)
pulseaudio? ( media-libs/libpulse )
qml? (
~dev-qt/qtdeclarative-${PV}:6
~dev-qt/qtquick3d-${PV}:6
)
vaapi? ( media-libs/libva:= )
"
DEPEND="
${RDEPEND}
X? ( x11-base/xorg-proto )
v4l? ( sys-kernel/linux-headers )
vulkan? ( dev-util/vulkan-headers )
"
BDEPEND="~dev-qt/qtshadertools-${PV}:6"
CMAKE_SKIP_TESTS=(
# unimportant and expects all backends to be available (bug #928420)
tst_backends
# tries to use real alsa or pulseaudio and fails in sandbox
tst_qaudiosink
tst_qaudiosource
tst_qmediacapture_gstreamer
tst_qmediacapturesession
tst_qmediaframeinputsbackend
tst_qmediaplayer_gstreamer
tst_qmediaplayerbackend
tst_qsoundeffect
# may try to use v4l2 or hardware acceleration depending on availability
tst_qcamerabackend #972689
tst_qmediarecorderbackend
tst_qscreencapture_integration
tst_qscreencapturebackend
tst_qvideoframebackend
# seems flaky depending on what codecs system libraries support or not
tst_qmediaformatbackend
# fails with offscreen rendering
tst_qvideoframecolormanagement
tst_qwindowcapturebackend
)
src_prepare() {
qt6-build_src_prepare
# test expects GStreamer to report an exact bitrate value, but
# this varies depending on version and Qt updates it only now
# and then (disabling permanently with a sed to avoid rebases)
sed -e '/bool validateBitRates = GST_CHECK_VERSION/s/= .*/= false;/' \
-i tests/auto/unit/plugins/multimedia/gstreamer/gstreamer_backend/tst_gstreamer_backend.cpp || die
}
src_configure() {
# normally passed by the build system, but needed for 32-on-64 chroots
use x86 && append-cppflags -DDISABLE_SIMD -DPFFFT_SIMD_DISABLE
local mycmakeargs=(
$(cmake_use_find_package qml Qt6Qml)
$(qt_feature ffmpeg)
$(qt_feature gstreamer)
$(usev gstreamer "
$(qt_feature opengl gstreamer_gl)
$(usev opengl "
$(qt_feature X gstreamer_gl_x11)
$(qt_feature wayland gstreamer_gl_wayland)
")
")
$(qt_feature pipewire)
$(usev pipewire $(qt_feature dbus pipewire_screencapture))
$(qt_feature pulseaudio)
$(qt_feature v4l linux_v4l)
$(qt_feature vaapi)
)
# ALSA backend is experimental off-by-default and can take priority
# causing problems (bug #935146), disable if USE=pulseaudio is set
# (also do not want unnecessary usage of ALSA plugins -> pulse)
if use alsa && use pulseaudio; then
# einfo should be enough given pure-ALSA users tend to disable pulse
einfo "Warning: USE=alsa is ignored when USE=pulseaudio is set"
mycmakeargs+=( -DQT_FEATURE_alsa=OFF )
else
mycmakeargs+=( $(qt_feature alsa) )
fi
qt6-build_src_configure
}
src_install() {
qt6-build_src_install
if use test; then
local delete=( # sigh
"${D}${QT6_LIBDIR}"/cmake/Qt6Multimedia/Qt6MockMultimediaPlugin*.cmake
"${D}${QT6_MKSPECSDIR}"/modules/qt_plugin_mockmultimediaplugin.pri
"${D}${QT6_PLUGINDIR}"/multimedia/libmockmultimediaplugin.*
"${D}${QT6_PLUGINDIR}"/multimedia/objects-*
)
# using -f given not tracking which tests may be skipped or not
rm -rf -- "${delete[@]}" || die
fi
}