commit:     3c62d9ebc31c56c049cbcbe29ad491b9e5454df9
Author:     Nicolas Bock <nicolasbock <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 14 13:47:40 2017 +0000
Commit:     Nicolas Bock <nicolasbock <AT> gentoo <DOT> org>
CommitDate: Thu Dec 14 13:55:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c62d9eb

mail-client/neomutt: Update crypto USE flags

During the transition period between the old and the new crypto related
flags, the neomutt package needs to support both sets. Currently the
ebuild emits crypto '--enable' flags twice, with the second flag
overriding the first. This can lead to unwanted settings. This change
adds some logic around those flags to emit the configure option only
once.

Related: https://bugs.gentoo.org/640824

Package-Manager: Portage-2.3.13, Repoman-2.3.3

 mail-client/neomutt/neomutt-9999.ebuild | 46 +++++++++++++++++++++------------
 1 file changed, 30 insertions(+), 16 deletions(-)

diff --git a/mail-client/neomutt/neomutt-9999.ebuild 
b/mail-client/neomutt/neomutt-9999.ebuild
index 8496d18ad8c..7b36a57de36 100644
--- a/mail-client/neomutt/neomutt-9999.ebuild
+++ b/mail-client/neomutt/neomutt-9999.ebuild
@@ -64,23 +64,29 @@ S="${WORKDIR}/${PN}-${P}"
 src_configure() {
        local myconf=(
                "$(use_enable doc)"
-               "$(use_enable gpg gpgme)"
-               "$(use_enable gpgme)"
                "$(use_enable nls)"
                "$(use_enable notmuch)"
-               "$(use_enable crypt pgp)"
-               "$(use_enable pgp_classic pgp)"
-               "$(use_enable smime)"
-               "$(use_enable smime_classic smime)"
+
+               # During the transition of the crypto USE flags we need to 
support
+               # both sets of flags. We do not want to emit a configuration 
setting
+               # twice, since the second flag overrides the first, potentially
+               # leading to unwanted settings. See 
https://bugs.gentoo.org/640824 for
+               # details.
+               "$(if use gpg || use gpgme; then echo "--enable"; else echo 
"--disable"; fi)-gpgme"
+               "$(if use crypt || use pgp_classic; then echo "--enable"; else 
echo "--disable"; fi)-pgp"
+               "$(if use smime || use smime_classic; then echo "--enable"; 
else echo "--disable"; fi)-smime"
+
+               # Database backends.
                "$(use_enable berkdb bdb)"
                "$(use_enable gdbm)"
+               "$(use_enable kyotocabinet)"
+               "$(use_enable qdbm)"
+               "$(use_enable tokyocabinet)"
+
                "$(use_enable idn)"
                "$(use_enable kerberos gss)"
-               "$(use_enable kyotocabinet)"
                "$(use_enable lmdb)"
-               "$(use_enable qdbm)"
                "$(use_enable sasl)"
-               "$(use_enable tokyocabinet)"
                "--with-ui=$(usex slang slang ncurses)"
                "--sysconfdir=${EPREFIX}/etc/${PN}"
                "$(use_enable ssl)"
@@ -110,11 +116,19 @@ src_install() {
 }
 
 pkg_postinst() {
-       ewarn "Pleae note that the crypto related USE flags of neomutt have 
changed."
-       ewarn "(https://bugs.gentoo.org/637176)"
-       ewarn "crypt -> pgp_classic"
-       ewarn "gpg -> gpgme"
-       ewarn "smime -> smime_classic"
-       ewarn "The old USE flags still work but their use is deprecated and 
will"
-       ewarn "be removed in a future release."
+       if use crypt || use gpg || use smime; then
+               ewarn "Pleae note that the crypto related USE flags of neomutt 
have changed."
+               ewarn "(https://bugs.gentoo.org/637176)"
+               ewarn "crypt -> pgp_classic"
+               ewarn "gpg -> gpgme"
+               ewarn "smime -> smime_classic"
+               ewarn "The old USE flags still work but their use is deprecated 
and will"
+               ewarn "be removed in a future release."
+               if use gpg && ( use crypt || use smime ); then
+                       ewarn "  Note that gpgme (old gpg) includes both pgp 
and smime"
+                       ewarn "  support.  You can probably remove pgp_classic 
(old crypt)"
+                       ewarn "  and smime_classic (old smime) from your 
USE-flags and"
+                       ewarn "  only enable gpgme."
+               fi
+       fi
 }

Reply via email to