commit:     ae18e71fa5bf81a8082e571ee66567664973d081
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  7 13:17:02 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Sep  7 15:05:48 2020 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=ae18e71f

kde-apps/dolphin: Use optfeature

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

 kde-apps/dolphin/dolphin-20.08.49.9999.ebuild | 25 ++++++++-----------------
 kde-apps/dolphin/dolphin-9999.ebuild          | 25 ++++++++-----------------
 2 files changed, 16 insertions(+), 34 deletions(-)

diff --git a/kde-apps/dolphin/dolphin-20.08.49.9999.ebuild 
b/kde-apps/dolphin/dolphin-20.08.49.9999.ebuild
index bf24bc1f46..59476633af 100644
--- a/kde-apps/dolphin/dolphin-20.08.49.9999.ebuild
+++ b/kde-apps/dolphin/dolphin-20.08.49.9999.ebuild
@@ -9,7 +9,7 @@ PVCUT=$(ver_cut 1-3)
 KFMIN=5.72.0
 QTMIN=5.14.2
 VIRTUALX_REQUIRED="test"
-inherit ecm kde.org
+inherit ecm kde.org optfeature
 
 DESCRIPTION="Plasma filemanager focusing on usability"
 HOMEPAGE="https://kde.org/applications/system/org.kde.dolphin
@@ -77,22 +77,13 @@ src_configure() {
 }
 
 pkg_postinst() {
-       ecm_pkg_postinst
-
        if [[ -z "${REPLACING_VERSIONS}" ]]; then
-               has_version "kde-apps/ark:${SLOT}" || \
-                       elog "For compress/extract and other actions install 
kde-apps/ark:${SLOT}"
-
-               has_version "kde-apps/kleopatra:${SLOT}" || \
-                       elog "For crypto actions install 
kde-apps/kleopatra:${SLOT}"
-
-               has_version "kde-apps/ffmpegthumbs:${SLOT}" || \
-                       elog "For video file thumbnails install 
kde-apps/ffmpegthumbs:${SLOT}"
-
-               has_version "kde-apps/thumbnailers:${SLOT}" || \
-                       elog "For graphics file thumbnails install 
kde-apps/thumbnailers:${SLOT}"
-
-               has_version "kde-frameworks/purpose:${SLOT}" || \
-                       elog "For 'Share' context menu actions install 
kde-frameworks/purpose:${SLOT}"
+               elog "Optional dependencies:"
+               optfeature "compress/extract and other actions" 
kde-apps/ark:${SLOT}
+               optfeature "crypto actions" kde-apps/kleopatra:${SLOT}
+               optfeature "video file thumbnails" kde-apps/ffmpegthumbs:${SLOT}
+               optfeature "graphics file thumbnails" 
kde-apps/thumbnailers:${SLOT}
+               optfeature "'Share' context menu actions" 
kde-frameworks/purpose:${SLOT}
        fi
+       ecm_pkg_postinst
 }

diff --git a/kde-apps/dolphin/dolphin-9999.ebuild 
b/kde-apps/dolphin/dolphin-9999.ebuild
index 815df8325e..fda06708b3 100644
--- a/kde-apps/dolphin/dolphin-9999.ebuild
+++ b/kde-apps/dolphin/dolphin-9999.ebuild
@@ -9,7 +9,7 @@ PVCUT=$(ver_cut 1-3)
 KFMIN=5.73.0
 QTMIN=5.14.2
 VIRTUALX_REQUIRED="test"
-inherit ecm kde.org
+inherit ecm kde.org optfeature
 
 DESCRIPTION="Plasma filemanager focusing on usability"
 HOMEPAGE="https://kde.org/applications/system/org.kde.dolphin
@@ -77,22 +77,13 @@ src_configure() {
 }
 
 pkg_postinst() {
-       ecm_pkg_postinst
-
        if [[ -z "${REPLACING_VERSIONS}" ]]; then
-               has_version "kde-apps/ark:${SLOT}" || \
-                       elog "For compress/extract and other actions install 
kde-apps/ark:${SLOT}"
-
-               has_version "kde-apps/kleopatra:${SLOT}" || \
-                       elog "For crypto actions install 
kde-apps/kleopatra:${SLOT}"
-
-               has_version "kde-apps/ffmpegthumbs:${SLOT}" || \
-                       elog "For video file thumbnails install 
kde-apps/ffmpegthumbs:${SLOT}"
-
-               has_version "kde-apps/thumbnailers:${SLOT}" || \
-                       elog "For graphics file thumbnails install 
kde-apps/thumbnailers:${SLOT}"
-
-               has_version "kde-frameworks/purpose:${SLOT}" || \
-                       elog "For 'Share' context menu actions install 
kde-frameworks/purpose:${SLOT}"
+               elog "Optional dependencies:"
+               optfeature "compress/extract and other actions" 
kde-apps/ark:${SLOT}
+               optfeature "crypto actions" kde-apps/kleopatra:${SLOT}
+               optfeature "video file thumbnails" kde-apps/ffmpegthumbs:${SLOT}
+               optfeature "graphics file thumbnails" 
kde-apps/thumbnailers:${SLOT}
+               optfeature "'Share' context menu actions" 
kde-frameworks/purpose:${SLOT}
        fi
+       ecm_pkg_postinst
 }

Reply via email to