1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake desktop flag-o-matic kde.org multibuild
8 DESCRIPTION="KDE multimedia abstraction library"
9 HOMEPAGE="https://community.kde.org/Phonon"
11 if [[ ${KDE_BUILD_TYPE} = release ]]; then
12 SRC_URI="mirror://kde/stable/phonon/${PV}/${P}.tar.xz"
13 KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv x86"
16 LICENSE="|| ( LGPL-2.1 LGPL-3 ) !pulseaudio? ( || ( GPL-2 GPL-3 ) )"
18 IUSE="debug designer minimal pulseaudio +qt5 qt6"
19 REQUIRED_USE="|| ( qt5 qt6 )"
24 media-libs/libpulse[glib]
30 designer? ( dev-qt/designer:5 )
34 dev-qt/qtbase:6[gui,widgets]
35 designer? ( dev-qt/qttools:6[designer] )
39 !media-libs/phonon-gstreamer
41 kde-frameworks/breeze-icons:*
42 kde-frameworks/oxygen-icons:*
47 >=kde-frameworks/extra-cmake-modules-5.115.0:*
49 qt5? ( dev-qt/linguist-tools:5 )
50 qt6? ( dev-qt/qttools:6[linguist] )
52 PDEPEND="!minimal? ( >=media-libs/phonon-vlc-0.12.0[qt5?,qt6?] )"
54 PATCHES=( "${FILESDIR}/${P}-cmake.patch" ) # bug 938315
57 MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) )
61 use debug || append-cppflags -DQT_NO_DEBUG
65 -DQT_MAJOR_VERSION=${MULTIBUILD_VARIANT/qt/}
66 -DPHONON_BUILD_${MULTIBUILD_VARIANT^^}=ON
67 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON # ecm.eclass
68 -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help" # ecm.eclass
69 -DPHONON_BUILD_DESIGNER_PLUGIN=$(usex designer)
70 -DCMAKE_DISABLE_FIND_PACKAGE_GLIB2=$(usex !pulseaudio)
71 -DCMAKE_DISABLE_FIND_PACKAGE_PulseAudio=$(usex !pulseaudio)
74 if [[ ${MULTIBUILD_VARIANT} == qt6 ]]; then
76 -DPHONON_BUILD_QT5=OFF
77 -DPHONON_BUILD_SETTINGS=ON
81 -DPHONON_BUILD_QT6=OFF
82 -DPHONON_BUILD_SETTINGS=$(usex !qt6)
89 multibuild_foreach_variant myconfigure
93 multibuild_foreach_variant cmake_src_compile
97 multibuild_foreach_variant cmake_src_install
98 make_desktop_entry "${PN}settings" \
99 "Phonon Audio and Video" preferences-desktop-sound