kde-plasma/xdg-desktop-portal-kde: Add USE screencast
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 7 Jul 2019 15:33:05 +0000 (17:33 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 7 Jul 2019 15:51:03 +0000 (17:51 +0200)
Bug: https://bugs.gentoo.org/686336
Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
kde-plasma/xdg-desktop-portal-kde/metadata.xml
kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.16.2.ebuild

index 2fdbf33d963db81228cb30a4f1abf67dbe9c29f1..bcfc8e0c39c0df5ac509acd316f0a642a92c43fc 100644 (file)
@@ -5,4 +5,7 @@
                <email>kde@gentoo.org</email>
                <name>Gentoo KDE Project</name>
        </maintainer>
+       <use>
+               <flag name="screencast">Enable screencast portal using <pkg>media-video/pipewire</pkg></flag>
+       </use>
 </pkgmetadata>
index b36da6ccfc53aca0579c7a6fdfa79344d7aaca8e..0f81e42f3e0b945756dfbd2269a59656bd1bdd40 100644 (file)
@@ -9,13 +9,8 @@ inherit kde5
 DESCRIPTION="Backend implementation for xdg-desktop-portal that is using Qt/KDE Frameworks"
 LICENSE="LGPL-2+"
 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-IUSE=""
+IUSE="screencast"
 
-# TODO: Needed for screencast portal
-#      dev-libs/glib:2
-#      media-libs/libepoxy
-#      media-libs/mesa[gbm]
-# not packaged: PipeWire
 COMMON_DEPEND="
        $(add_frameworks_dep kcoreaddons)
        $(add_frameworks_dep ki18n)
@@ -26,11 +21,28 @@ COMMON_DEPEND="
        $(add_qt_dep qtgui)
        $(add_qt_dep qtprintsupport 'cups')
        $(add_qt_dep qtwidgets)
+       screencast? (
+               dev-libs/glib:2
+               media-libs/libepoxy
+               media-libs/mesa[gbm]
+               media-video/pipewire
+       )
 "
 DEPEND="${COMMON_DEPEND}
        $(add_frameworks_dep kwayland)
        $(add_qt_dep qtconcurrent)
 "
 RDEPEND="${COMMON_DEPEND}
-       sys-apps/xdg-desktop-portal
+       screencast? ( sys-apps/xdg-desktop-portal[screencast] )
+       !screencast? ( sys-apps/xdg-desktop-portal )
 "
+
+src_configure() {
+       local mycmakeargs=(
+               $(cmake-utils_use_find_package screencast GLIB2)
+               $(cmake-utils_use_find_package screencast PipeWire)
+               $(cmake-utils_use_find_package screencast GBM)
+               $(cmake-utils_use_find_package screencast Epoxy)
+       )
+       kde5_src_configure
+}