diff options
author | 2024-03-03 17:04:05 +0100 | |
---|---|---|
committer | 2024-03-03 17:15:33 +0100 | |
commit | 38dfeae0ee38f55f0bc1d98f8372a5d4f80ba8d6 (patch) | |
tree | c4ac891d72756156739958f8cd3f71c33254d159 /media-libs | |
parent | kde-apps/kio-extras-9999: Depend on dev-cpp/ms-gsl for sftp (diff) | |
download | kde-38dfeae0ee38f55f0bc1d98f8372a5d4f80ba8d6.tar.gz kde-38dfeae0ee38f55f0bc1d98f8372a5d4f80ba8d6.tar.bz2 kde-38dfeae0ee38f55f0bc1d98f8372a5d4f80ba8d6.zip |
media-libs/phonon: Use cmake.eclass and multibuild instead of ecm.eclass
Simultanous build of Qt5 and Qt6 is broken, installing Qt6 plugins
in Qt5 paths and vice versa.
ebuild was barely using ecm facilities anyway, this makes sure only those
deps that are needed are also used.
Bug: https://bugs.gentoo.org/923502
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/phonon/phonon-9999.ebuild | 71 |
1 files changed, 56 insertions, 15 deletions
diff --git a/media-libs/phonon/phonon-9999.ebuild b/media-libs/phonon/phonon-9999.ebuild index 8c92513a04..8f8d0cf724 100644 --- a/media-libs/phonon/phonon-9999.ebuild +++ b/media-libs/phonon/phonon-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit desktop ecm kde.org +inherit cmake desktop flag-o-matic kde.org multibuild DESCRIPTION="KDE multimedia abstraction library" HOMEPAGE="https://community.kde.org/Phonon" @@ -15,7 +15,7 @@ fi LICENSE="|| ( LGPL-2.1 LGPL-3 ) !pulseaudio? ( || ( GPL-2 GPL-3 ) )" SLOT="0" -IUSE="designer pulseaudio +qt5 qt6 +vlc" +IUSE="debug designer pulseaudio +qt5 qt6 +vlc" REQUIRED_USE="|| ( qt5 qt6 )" DEPEND=" @@ -24,6 +24,7 @@ DEPEND=" media-libs/libpulse[glib] ) qt5? ( + dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 designer? ( dev-qt/designer:5 ) @@ -34,30 +35,70 @@ DEPEND=" designer? ( dev-qt/qttools:6[designer] ) ) " -RDEPEND="${DEPEND}" +RDEPEND="${DEPEND} + || ( + kde-frameworks/breeze-icons:* + kde-frameworks/oxygen-icons:* + ) +" BDEPEND=" - qt5? ( dev-qt/linguist-tools:5 ) - qt6? ( dev-qt/qttools:6[linguist] ) + dev-libs/libpcre2:* virtual/pkgconfig + qt5? ( + dev-qt/linguist-tools:5 + >=kde-frameworks/extra-cmake-modules-5.115.0:* + ) + qt6? ( + dev-qt/qttools:6[linguist] + >=kde-frameworks/extra-cmake-modules-6.0.0:* + ) " PDEPEND=" vlc? ( >=media-libs/phonon-vlc-0.12.0[qt5?,qt6?] ) " +pkg_setup() { + MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) ) +} + src_configure() { - local mycmakeargs=( - -DPHONON_BUILD_DESIGNER_PLUGIN=$(usex designer) - -DCMAKE_DISABLE_FIND_PACKAGE_GLIB2=$(usex !pulseaudio) - -DCMAKE_DISABLE_FIND_PACKAGE_PulseAudio=$(usex !pulseaudio) - -DPHONON_BUILD_QT5=$(usex qt5) - -DPHONON_BUILD_QT6=$(usex qt6) - -DPHONON_BUILD_SETTINGS=ON - ) - ecm_src_configure + use debug || append-cppflags -DQT_NO_DEBUG + + myconfigure() { + local mycmakeargs=( + -DQT_MAJOR_VERSION=${MULTIBUILD_VARIANT/qt/} + -DPHONON_BUILD_${MULTIBUILD_VARIANT^^}=ON + -DKDE_INSTALL_USE_QT_SYS_PATHS=ON # ecm.eclass + -DKDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help" # ecm.eclass + -DPHONON_BUILD_DESIGNER_PLUGIN=$(usex designer) + -DCMAKE_DISABLE_FIND_PACKAGE_GLIB2=$(usex !pulseaudio) + -DCMAKE_DISABLE_FIND_PACKAGE_PulseAudio=$(usex !pulseaudio) + ) + + if [[ ${MULTIBUILD_VARIANT} == qt6 ]]; then + mycmakeargs+=( + -DPHONON_BUILD_QT5=OFF + -DPHONON_BUILD_SETTINGS=ON + ) + else + mycmakeargs+=( + -DPHONON_BUILD_QT6=OFF + -DPHONON_BUILD_SETTINGS=$(usex !qt6) + ) + fi + + cmake_src_configure + } + + multibuild_foreach_variant myconfigure +} + +src_compile() { + multibuild_foreach_variant cmake_src_compile } src_install() { - ecm_src_install + multibuild_foreach_variant cmake_src_install make_desktop_entry "${PN}settings" \ "Phonon Audio and Video" preferences-desktop-sound } |