commit:     fbd91c2abfd5e20f2561cbd6fecf38d9e2e6dc95
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  7 13:29:50 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Sep  7 15:05:49 2020 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=fbd91c2a

kde-apps/kmail: Use optfeature

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

 kde-apps/kmail/kmail-20.08.49.9999.ebuild | 24 +++++++-----------------
 kde-apps/kmail/kmail-9999.ebuild          | 24 +++++++-----------------
 2 files changed, 14 insertions(+), 34 deletions(-)

diff --git a/kde-apps/kmail/kmail-20.08.49.9999.ebuild 
b/kde-apps/kmail/kmail-20.08.49.9999.ebuild
index cdadd74a7b..6f4f4d5764 100644
--- a/kde-apps/kmail/kmail-20.08.49.9999.ebuild
+++ b/kde-apps/kmail/kmail-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="Email client, supporting POP3 and IMAP mailboxes."
 HOMEPAGE="https://kde.org/applications/office/org.kde.kmail2
@@ -103,22 +103,12 @@ src_configure() {
 }
 
 pkg_postinst() {
-       ecm_pkg_postinst
-
-       pkg_is_installed() {
-               echo "${1} ($(has_version ${1} || echo "not ")installed)"
-       }
-
        if [[ -z "${REPLACING_VERSIONS}" ]]; then
-               elog "KMail supports the following runtime dependencies:"
-               elog "  Virus detection:"
-               elog "    $(pkg_is_installed app-antivirus/clamav)"
-               elog "  Spam filtering:"
-               elog "    $(pkg_is_installed mail-filter/bogofilter)"
-               elog "    $(pkg_is_installed mail-filter/spamassassin)"
-               elog "  Fancy e-mail headers and various useful plugins:"
-               elog "    $(pkg_is_installed kde-apps/kdepim-addons:${SLOT})"
-               elog "  Crypto config and certificate details GUI:"
-               elog "    $(pkg_is_installed kde-apps/kleopatra:${SLOT})"
+               elog "Optional dependencies:"
+               optfeature "Virus detection" app-antivirus/clamav
+               optfeature "Spam filtering" mail-filter/bogofilter 
mail-filter/spamassassin
+               optfeature "Fancy e-mail headers and useful plugins" 
kde-apps/kdepim-addons:${SLOT}
+               optfeature "Crypto config and certificate details GUI" 
kde-apps/kleopatra:${SLOT}
        fi
+       ecm_pkg_postinst
 }

diff --git a/kde-apps/kmail/kmail-9999.ebuild b/kde-apps/kmail/kmail-9999.ebuild
index fc2ee9e1d9..14b1858a73 100644
--- a/kde-apps/kmail/kmail-9999.ebuild
+++ b/kde-apps/kmail/kmail-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="Email client, supporting POP3 and IMAP mailboxes."
 HOMEPAGE="https://kde.org/applications/office/org.kde.kmail2
@@ -103,22 +103,12 @@ src_configure() {
 }
 
 pkg_postinst() {
-       ecm_pkg_postinst
-
-       pkg_is_installed() {
-               echo "${1} ($(has_version ${1} || echo "not ")installed)"
-       }
-
        if [[ -z "${REPLACING_VERSIONS}" ]]; then
-               elog "KMail supports the following runtime dependencies:"
-               elog "  Virus detection:"
-               elog "    $(pkg_is_installed app-antivirus/clamav)"
-               elog "  Spam filtering:"
-               elog "    $(pkg_is_installed mail-filter/bogofilter)"
-               elog "    $(pkg_is_installed mail-filter/spamassassin)"
-               elog "  Fancy e-mail headers and various useful plugins:"
-               elog "    $(pkg_is_installed kde-apps/kdepim-addons:${SLOT})"
-               elog "  Crypto config and certificate details GUI:"
-               elog "    $(pkg_is_installed kde-apps/kleopatra:${SLOT})"
+               elog "Optional dependencies:"
+               optfeature "Virus detection" app-antivirus/clamav
+               optfeature "Spam filtering" mail-filter/bogofilter 
mail-filter/spamassassin
+               optfeature "Fancy e-mail headers and useful plugins" 
kde-apps/kdepim-addons:${SLOT}
+               optfeature "Crypto config and certificate details GUI" 
kde-apps/kleopatra:${SLOT}
        fi
+       ecm_pkg_postinst
 }

Reply via email to