1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils flag-o-matic
8 if [[ ${PV} =~ 99999999$ ]]; then
10 EGIT_REPO_URI="https://github.com/neomutt/neomutt.git"
11 EGIT_CHECKOUT_DIR="${WORKDIR}/neomutt-${P}"
13 SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14 KEYWORDS="~amd64 ~x86"
17 DESCRIPTION="A small but very powerful text-based mail client"
18 HOMEPAGE="https://neomutt.org/"
22 IUSE="berkdb doc gdbm gnutls gpgme idn kerberos kyotocabinet libressl
23 lmdb nls notmuch pgp-classic qdbm sasl selinux slang smime-classic
36 gdbm? ( sys-libs/gdbm )
37 kyotocabinet? ( dev-db/kyotocabinet )
39 nls? ( virtual/libintl )
41 tokyocabinet? ( dev-db/tokyocabinet )
42 gnutls? ( >=net-libs/gnutls-1.0.17 )
43 gpgme? ( >=app-crypt/gpgme-0.9.0 )
44 idn? ( net-dns/libidn:= )
45 kerberos? ( virtual/krb5 )
46 notmuch? ( net-mail/notmuch )
47 sasl? ( >=dev-libs/cyrus-sasl-2 )
48 !slang? ( sys-libs/ncurses:0 )
49 slang? ( sys-libs/slang )
51 !libressl? ( >=dev-libs/openssl-0.9.6:0 )
52 libressl? ( dev-libs/libressl )
61 app-text/docbook-xsl-stylesheets
62 || ( www-client/lynx www-client/w3m www-client/elinks )
65 selinux? ( sec-policy/selinux-mutt )
70 "$(usex doc --full-doc --disable-doc)"
72 "$(use_enable notmuch)"
75 "$(use_enable pgp-classic pgp)"
76 "$(use_enable smime-classic smime)"
79 "$(use_enable berkdb bdb)"
81 "$(use_enable kyotocabinet)"
83 "$(use_enable tokyocabinet)"
86 "$(use_enable kerberos gss)"
89 "--with-ui=$(usex slang slang ncurses)"
90 "--sysconfdir=${EPREFIX}/etc/${PN}"
92 "$(use_enable gnutls)"
95 econf CCACHE=none "${myconf[@]}"
99 emake DESTDIR="${D}" install
101 # A man-page is always handy, so fake one – here neomuttrc.5
102 # (neomutt.1 already exists)
105 -e '/^\(CC_FOR_BUILD\|CFLAGS_FOR_BUILD\)\s*=/p' \
106 -e '/^\(EXTRA_CFLAGS_FOR_BUILD\|LDFLAGS_FOR_BUILD\)\s*=/p' \
107 -e '/^\(EXEEXT\|SRCDIR\)\s*=/p' \
108 Makefile > docs/Makefile.fakedoc || die
110 -e '/^MAKEDOC_CPP\s*=/,/^\s*$/p' \
111 -e '/^docs\/\(makedoc$(EXEEXT)\|neomutt\.1\|neomuttrc\.5\)\s*:/,/^\s*$/p' \
112 docs/Makefile.autosetup >> docs/Makefile.fakedoc || die
113 emake -f docs/Makefile.fakedoc docs/neomutt.1
114 emake -f docs/Makefile.fakedoc docs/neomuttrc.5
115 doman docs/neomutt.1 docs/neomuttrc.5
118 dodoc LICENSE* ChangeLog* README*
122 if use gpgme && ( use pgp-classic || use smime-classic ); then
123 ewarn " Note that gpgme (old gpg) includes both pgp and smime"
124 ewarn " support. You can probably remove pgp-classic (old crypt)"
125 ewarn " and smime-classic (old smime) from your USE-flags and"
126 ewarn " only enable gpgme."