commit:     dd195a7a2fd957d45f6dd27dd7e128a2541dc6a8
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  7 14:40:54 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Sep  7 15:05:50 2020 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=dd195a7a

kde-plasma/kinfocenter: Use optfeature

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

 kde-plasma/kinfocenter/kinfocenter-9999.ebuild | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/kde-plasma/kinfocenter/kinfocenter-9999.ebuild 
b/kde-plasma/kinfocenter/kinfocenter-9999.ebuild
index 606a489d54..e8e7385b09 100644
--- a/kde-plasma/kinfocenter/kinfocenter-9999.ebuild
+++ b/kde-plasma/kinfocenter/kinfocenter-9999.ebuild
@@ -7,7 +7,7 @@ ECM_HANDBOOK="forceoptional"
 KFMIN=9999
 PVCUT=$(ver_cut 1-3)
 QTMIN=5.15.0
-inherit ecm kde.org
+inherit ecm kde.org optfeature
 
 DESCRIPTION="Utility providing information about the computer hardware"
 HOMEPAGE="https://userbase.kde.org/KInfoCenter";
@@ -93,13 +93,10 @@ src_install() {
 }
 
 pkg_postinst() {
-       ecm_pkg_postinst
-
        if [[ -z "${REPLACING_VERSIONS}" ]]; then
-               has_version "net-fs/nfs-utils" || \
-                       elog "Installing net-fs/nfs-utils will enable the NFS 
information module."
-
-               has_version "net-fs/samba" || \
-                       elog "Installing net-fs/samba will enable the Samba 
status information module."
+               elog "Optional dependencies:"
+               optfeature "NFS information module" net-fs/nfs-utils
+               optfeature "Samba status information module" net-fs/samba
        fi
+       ecm_pkg_postinst
 }

Reply via email to