1 |
|
# Copyright 1999-2023 Gentoo Authors
|
|
1 |
# Copyright 2021-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
if [[ ${PV} != *9999* ]]; then
|
7 |
|
QT5_KDEPATCHSET_REV=1
|
8 |
|
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86"
|
9 |
|
fi
|
|
6 |
inherit flag-o-matic qt6-build
|
10 |
7 |
|
11 |
|
inherit qt5-build
|
|
8 |
DESCRIPTION="Multimedia (audio, video, radio, camera) library for the Qt6 framework"
|
12 |
9 |
|
13 |
|
DESCRIPTION="Multimedia (audio, video, radio, camera) library for the Qt5 framework"
|
|
10 |
if [[ ${QT6_BUILD_TYPE} == release ]]; then
|
|
11 |
KEYWORDS="amd64"
|
|
12 |
fi
|
14 |
13 |
|
15 |
|
IUSE="alsa gles2-only gstreamer openal pulseaudio qml widgets"
|
|
14 |
IUSE="+X alsa +ffmpeg gstreamer opengl pulseaudio qml v4l vaapi vulkan"
|
|
15 |
# tst_qmediaplayerbackend hard requires qml, review in case becomes optional
|
|
16 |
REQUIRED_USE="
|
|
17 |
|| ( ffmpeg gstreamer )
|
|
18 |
vaapi? ( ffmpeg )
|
|
19 |
test? ( qml )
|
|
20 |
"
|
16 |
21 |
|
17 |
22 |
RDEPEND="
|
18 |
|
=dev-qt/qtcore-${QT5_PV}*
|
19 |
|
=dev-qt/qtgui-${QT5_PV}*[gles2-only=]
|
20 |
|
=dev-qt/qtnetwork-${QT5_PV}*
|
|
23 |
~dev-qt/qtbase-${PV}:6[gui,network,opengl=,vulkan=,widgets]
|
21 |
24 |
alsa? ( media-libs/alsa-lib )
|
|
25 |
ffmpeg? (
|
|
26 |
~dev-qt/qtbase-${PV}:6[X=]
|
|
27 |
media-video/ffmpeg:=[vaapi?]
|
|
28 |
X? (
|
|
29 |
x11-libs/libX11
|
|
30 |
x11-libs/libXext
|
|
31 |
x11-libs/libXrandr
|
|
32 |
)
|
|
33 |
vaapi? (
|
|
34 |
media-libs/libglvnd
|
|
35 |
media-libs/libva:=
|
|
36 |
)
|
|
37 |
)
|
22 |
38 |
gstreamer? (
|
23 |
39 |
dev-libs/glib:2
|
24 |
|
media-libs/gstreamer:1.0
|
25 |
40 |
media-libs/gst-plugins-bad:1.0
|
26 |
|
media-libs/gst-plugins-base:1.0
|
|
41 |
media-libs/gst-plugins-base:1.0[X=,opengl?]
|
|
42 |
media-libs/gstreamer:1.0
|
|
43 |
opengl? ( media-libs/libglvnd )
|
27 |
44 |
)
|
28 |
|
pulseaudio? ( media-libs/libpulse[glib] )
|
|
45 |
pulseaudio? ( media-libs/libpulse )
|
29 |
46 |
qml? (
|
30 |
|
=dev-qt/qtdeclarative-${QT5_PV}*
|
31 |
|
gles2-only? ( =dev-qt/qtgui-${QT5_PV}*[egl] )
|
32 |
|
openal? ( media-libs/openal )
|
33 |
|
)
|
34 |
|
widgets? (
|
35 |
|
=dev-qt/qtwidgets-${QT5_PV}*[gles2-only=]
|
36 |
|
media-libs/libglvnd
|
|
47 |
~dev-qt/qtdeclarative-${PV}:6
|
|
48 |
~dev-qt/qtquick3d-${PV}:6
|
37 |
49 |
)
|
38 |
50 |
"
|
39 |
|
DEPEND="${RDEPEND}
|
40 |
|
gstreamer? ( x11-base/xorg-proto )
|
|
51 |
DEPEND="
|
|
52 |
${RDEPEND}
|
|
53 |
X? ( x11-base/xorg-proto )
|
|
54 |
v4l? ( sys-kernel/linux-headers )
|
41 |
55 |
"
|
|
56 |
BDEPEND="~dev-qt/qtshadertools-${PV}:6"
|
42 |
57 |
|
43 |
|
src_prepare() {
|
44 |
|
sed -i -e '/CONFIG\s*+=/ s/optimize_full//' \
|
45 |
|
src/multimedia/multimedia.pro || die
|
46 |
|
|
47 |
|
qt_use_disable_config openal openal \
|
48 |
|
src/imports/imports.pro
|
49 |
|
|
50 |
|
qt_use_disable_mod qml quick \
|
51 |
|
src/src.pro \
|
52 |
|
src/plugins/plugins.pro
|
53 |
|
|
54 |
|
qt_use_disable_mod widgets widgets \
|
55 |
|
src/src.pro \
|
56 |
|
src/gsttools/gsttools.pro \
|
57 |
|
src/plugins/gstreamer/common.pri
|
58 |
|
|
59 |
|
qt5-build_src_prepare
|
60 |
|
}
|
|
58 |
CMAKE_SKIP_TESTS=(
|
|
59 |
# tries to use real alsa or pulseaudio and fails in sandbox
|
|
60 |
tst_qaudiosink
|
|
61 |
tst_qaudiosource
|
|
62 |
tst_qmediacapturesession
|
|
63 |
tst_qmediaplayerbackend
|
|
64 |
tst_qsoundeffect
|
|
65 |
# may try to use v4l2 or hardware acceleration depending on availability
|
|
66 |
tst_qscreencapture_integration
|
|
67 |
tst_qscreencapturebackend
|
|
68 |
)
|
61 |
69 |
|
62 |
70 |
src_configure() {
|
63 |
|
local myqmakeargs=(
|
64 |
|
--
|
65 |
|
$(qt_use alsa)
|
66 |
|
$(qt_use gstreamer)
|
67 |
|
$(qt_use pulseaudio)
|
|
71 |
# normally passed by the build system, but needed for 32-on-64 chroots
|
|
72 |
use x86 && append-cppflags -DPFFFT_SIMD_DISABLE
|
|
73 |
|
|
74 |
local mycmakeargs=(
|
|
75 |
$(cmake_use_find_package qml Qt6Qml)
|
|
76 |
$(qt_feature alsa)
|
|
77 |
$(qt_feature ffmpeg)
|
|
78 |
$(qt_feature gstreamer)
|
|
79 |
$(usev gstreamer $(qt_feature opengl gstreamer_gl))
|
|
80 |
$(qt_feature pulseaudio)
|
|
81 |
$(qt_feature v4l linux_v4l)
|
|
82 |
$(qt_feature vaapi)
|
68 |
83 |
)
|
69 |
|
qt5-build_src_configure
|
|
84 |
|
|
85 |
qt6-build_src_configure
|
70 |
86 |
}
|