diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-03-03 17:09:23 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-03-03 17:16:15 +0100 |
commit | f36f623ce0b2566c299233d684bd722be9396b3e (patch) | |
tree | 963507d009c09afd78cd06e7cb6910324c3b7826 /media-libs | |
parent | media-libs/phonon: Use cmake.eclass and multibuild instead of ecm.eclass (diff) | |
download | kde-f36f623ce0b2566c299233d684bd722be9396b3e.tar.gz kde-f36f623ce0b2566c299233d684bd722be9396b3e.tar.bz2 kde-f36f623ce0b2566c299233d684bd722be9396b3e.zip |
media-libs/phonon-vlc: 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-vlc/phonon-vlc-9999.ebuild | 53 |
1 files changed, 44 insertions, 9 deletions
diff --git a/media-libs/phonon-vlc/phonon-vlc-9999.ebuild b/media-libs/phonon-vlc/phonon-vlc-9999.ebuild index 3f2110698e..4753dd1660 100644 --- a/media-libs/phonon-vlc/phonon-vlc-9999.ebuild +++ b/media-libs/phonon-vlc/phonon-vlc-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit ecm kde.org +inherit cmake flag-o-matic kde.org multibuild DESCRIPTION="VLC backend for the Phonon multimedia library" HOMEPAGE="https://community.kde.org/Phonon" @@ -16,13 +16,14 @@ fi LICENSE="LGPL-2.1+ || ( LGPL-2.1 LGPL-3 )" SLOT="0" -IUSE="+qt5 qt6" +IUSE="debug +qt5 qt6" REQUIRED_USE="|| ( qt5 qt6 )" DEPEND=" >=media-libs/phonon-4.12.0[qt5=,qt6=] media-video/vlc:=[dbus,ogg,vorbis(+)] qt5? ( + dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 ) @@ -30,15 +31,49 @@ DEPEND=" " RDEPEND="${DEPEND}" 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:* + ) " +pkg_setup() { + MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) ) +} + src_configure() { - local mycmakeargs=( - -DPHONON_BUILD_QT5=$(usex qt5) - -DPHONON_BUILD_QT6=$(usex qt6) - ) - 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 + ) + + if [[ ${MULTIBUILD_VARIANT} == qt6 ]]; then + mycmakeargs+=( -DPHONON_BUILD_QT5=OFF ) + else + mycmakeargs+=( -DPHONON_BUILD_QT6=OFF ) + fi + + cmake_src_configure + } + + multibuild_foreach_variant myconfigure +} + +src_compile() { + multibuild_foreach_variant cmake_src_compile +} + +src_install() { + multibuild_foreach_variant cmake_src_install } |