1 |
On Mon, Jul 31, 2017 at 09:11:19AM +0200, Nicolas Bock wrote: |
2 |
>Hi, |
3 |
> |
4 |
>I would like to add neomutt to the tree. This new package is meant as |
5 |
>an alternative and not a replacement of the existing mutt package. |
6 |
|
7 |
This is the third edition. Please have another look. Thanks! |
8 |
|
9 |
|
10 |
|
11 |
# Copyright 1999-2017 Gentoo Foundation |
12 |
# Distributed under the terms of the GNU General Public License v2 |
13 |
|
14 |
EAPI=6 |
15 |
|
16 |
inherit autotools eutils flag-o-matic |
17 |
|
18 |
SRC_URI="https://github.com/${PN}/${PN}/archive/${P}.tar.gz" |
19 |
KEYWORDS="~amd64 ~x86" |
20 |
|
21 |
DESCRIPTION="A small but very powerful text-based mail client" |
22 |
HOMEPAGE="https://www.neomutt.org/" |
23 |
|
24 |
LICENSE="GPL-2" |
25 |
SLOT="0" |
26 |
IUSE="berkdb crypt debug doc gdbm gnutls gpg idn kerberos kyotocabinet |
27 |
libressl lmdb nls notmuch qdbm sasl selinux slang smime ssl +symlink |
28 |
tokyocabinet" |
29 |
|
30 |
CDEPEND=" |
31 |
app-misc/mime-types |
32 |
berkdb? ( >=sys-libs/db-4:= ) |
33 |
gdbm? ( sys-libs/gdbm ) |
34 |
kyotocabinet? ( dev-db/kyotocabinet ) |
35 |
lmdb? ( dev-db/lmdb ) |
36 |
nls? ( virtual/libintl ) |
37 |
qdbm? ( dev-db/qdbm ) |
38 |
tokyocabinet? ( dev-db/tokyocabinet ) |
39 |
gnutls? ( >=net-libs/gnutls-1.0.17 ) |
40 |
gpg? ( >=app-crypt/gpgme-0.9.0 ) |
41 |
idn? ( net-dns/libidn ) |
42 |
kerberos? ( virtual/krb5 ) |
43 |
notmuch? ( net-mail/notmuch ) |
44 |
sasl? ( >=dev-libs/cyrus-sasl-2 ) |
45 |
!slang? ( sys-libs/ncurses:0 ) |
46 |
slang? ( sys-libs/slang ) |
47 |
ssl? ( |
48 |
!libressl? ( >=dev-libs/openssl-0.9.6:0 ) |
49 |
libressl? ( dev-libs/libressl ) |
50 |
) |
51 |
" |
52 |
DEPEND="${CDEPEND} |
53 |
net-mail/mailbase |
54 |
doc? ( |
55 |
dev-libs/libxml2 |
56 |
dev-libs/libxslt |
57 |
app-text/docbook-xsl-stylesheets |
58 |
|| ( www-client/lynx www-client/w3m www-client/elinks ) |
59 |
)" |
60 |
RDEPEND="${CDEPEND} |
61 |
selinux? ( sec-policy/selinux-mutt ) |
62 |
" |
63 |
|
64 |
S="${WORKDIR}/${PN}-${P}" |
65 |
|
66 |
src_prepare() { |
67 |
eapply "${FILESDIR}/0001-Rename-mutt-to-neomutt.patch" |
68 |
eapply_user |
69 |
AT_M4DIR="m4" eautoreconf |
70 |
} |
71 |
|
72 |
src_configure() { |
73 |
local myconf=( |
74 |
"$(use_enable crypt pgp)" |
75 |
"$(use_enable debug)" |
76 |
"$(use_enable doc)" |
77 |
"$(use_enable gpg gpgme)" |
78 |
"$(use_enable nls)" |
79 |
"$(use_enable smime)" |
80 |
"$(use_enable notmuch)" |
81 |
"$(use_with idn)" |
82 |
"$(use_with kerberos gss)" |
83 |
"$(use_with sasl)" |
84 |
"$(use_with tokyocabinet)" |
85 |
"$(use_with kyotocabinet)" |
86 |
"$(use_with qdbm)" |
87 |
"$(use_with gdbm)" |
88 |
"$(use_with berkdb bdb)" |
89 |
"$(use_with lmdb)" |
90 |
"--with-$(usex slang slang curses)" |
91 |
"--sysconfdir=${EPREFIX}/etc/${PN}" |
92 |
"--with-docdir=${EPREFIX}/usr/share/doc/${PF}" |
93 |
) |
94 |
|
95 |
if [[ ${CHOST} == *-solaris* ]] ; then |
96 |
# arrows in index view do not show when using wchar_t |
97 |
myconf+=( "--without-wc-funcs" ) |
98 |
fi |
99 |
|
100 |
if use gnutls; then |
101 |
myconf+=( "--with-gnutls" ) |
102 |
elif use ssl; then |
103 |
myconf+=( "--with-ssl" ) |
104 |
fi |
105 |
|
106 |
econf "${myconf[@]}" |
107 |
} |
108 |
|
109 |
src_install() { |
110 |
emake DESTDIR="${D}" install |
111 |
|
112 |
# A newer file is provided by app-misc/mime-types. So we link it. |
113 |
rm "${ED}"/etc/${PN}/mime.types || die |
114 |
dosym "${EPREFIX}/etc/mime.types" /etc/${PN}/mime.types |
115 |
|
116 |
## A man-page is always handy, so fake one |
117 |
if use !doc; then |
118 |
emake -C doc muttrc.man |
119 |
# make the fake slightly better, bug #413405 |
120 |
sed -e 's#@docdir@/manual.txt#http://www.neomutt.org/guide#' \ |
121 |
-e 's#in @docdir@,#at http://www.neomutt.org/,#' \ |
122 |
-e "s#@sysconfdir@#${EPREFIX}/etc/${PN}#" \ |
123 |
-e "s#@bindir@#${EPREFIX}/usr/bin#" \ |
124 |
doc/mutt.man > neomutt.1 || die |
125 |
cp doc/muttrc.man neomuttrc.5 || die |
126 |
doman neomutt.1 neomuttrc.5 |
127 |
fi |
128 |
|
129 |
dodoc COPYRIGHT ChangeLog* OPS* README* |
130 |
} |
131 |
|
132 |
-- |
133 |
Nicolas Bock <nicolasbock@g.o> |