commit:     de1e5b48cd2c02be62ed8fe4c86cc62fc695479f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  7 15:33:05 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jul  7 16:01:43 2019 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=de1e5b48

kde-plasma/xdg-desktop-portal-kde: Add USE screencast

Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-plasma/xdg-desktop-portal-kde/metadata.xml     |  3 +++
 .../xdg-desktop-portal-kde-5.16.49.9999.ebuild     | 26 ++++++++++++++++------
 .../xdg-desktop-portal-kde-9999.ebuild             | 26 ++++++++++++++++------
 3 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/kde-plasma/xdg-desktop-portal-kde/metadata.xml 
b/kde-plasma/xdg-desktop-portal-kde/metadata.xml
index 2fdbf33d96..bcfc8e0c39 100644
--- a/kde-plasma/xdg-desktop-portal-kde/metadata.xml
+++ b/kde-plasma/xdg-desktop-portal-kde/metadata.xml
@@ -5,4 +5,7 @@
                <email>k...@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>

diff --git 
a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.16.49.9999.ebuild 
b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.16.49.9999.ebuild
index ab93b235e4..2eb10fd815 100644
--- 
a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.16.49.9999.ebuild
+++ 
b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.16.49.9999.ebuild
@@ -9,13 +9,8 @@ inherit kde5
 DESCRIPTION="Backend implementation for xdg-desktop-portal that is using 
Qt/KDE Frameworks"
 LICENSE="LGPL-2+"
 KEYWORDS=""
-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
+}

diff --git 
a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-9999.ebuild 
b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-9999.ebuild
index ab93b235e4..2eb10fd815 100644
--- a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-9999.ebuild
+++ b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-9999.ebuild
@@ -9,13 +9,8 @@ inherit kde5
 DESCRIPTION="Backend implementation for xdg-desktop-portal that is using 
Qt/KDE Frameworks"
 LICENSE="LGPL-2+"
 KEYWORDS=""
-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
+}

Reply via email to