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 |
I should have inlined the patch. Sorry. |
8 |
|
9 |
|
10 |
|
11 |
From 63f5d569aec514d67645b1c2e891e51810bb7ab5 Mon Sep 17 00:00:00 2001 |
12 |
From: Nicolas Bock <nicolasbock@g.o> |
13 |
Date: Mon, 31 Jul 2017 09:06:07 +0200 |
14 |
Subject: [PATCH] mail-client/neomutt: New package mail-client/neomutt-20170714 |
15 |
|
16 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
17 |
--- |
18 |
mail-client/neomutt/Manifest | 1 + |
19 |
mail-client/neomutt/metadata.xml | 24 +++++ |
20 |
mail-client/neomutt/neomutt-20170714.ebuild | 161 ++++++++++++++++++++++++++++ |
21 |
3 files changed, 186 insertions(+) |
22 |
create mode 100644 mail-client/neomutt/Manifest |
23 |
create mode 100644 mail-client/neomutt/metadata.xml |
24 |
create mode 100644 mail-client/neomutt/neomutt-20170714.ebuild |
25 |
|
26 |
diff --git a/mail-client/neomutt/Manifest b/mail-client/neomutt/Manifest |
27 |
new file mode 100644 |
28 |
index 00000000000..2b38484e24d |
29 |
--- /dev/null |
30 |
+++ b/mail-client/neomutt/Manifest |
31 |
@@ -0,0 +1 @@ |
32 |
+DIST neomutt-20170714.tar.gz 2509160 SHA256 40d48920f95ca49ab96eb109b658f5cf6e1c222320c58bdd03769c1355d7a383 SHA512 eb31d2f23b7211904cd66ba293c008f953778b37f13fd09d4db571d013f1c8e6449fccd827872f3ad0a2c8e62555f92b3f9591a1f0f4ac37ab362a4681abaaa0 WHIRLPOOL 455495501a2ab1989d5f3bfa75aa2370896956cdfd7d2e852e225c96aa23a1abdaf2dbb9d886d1d96486d19b2b38c225e8263f268ebafcef8cbd0024885189f3 |
33 |
diff --git a/mail-client/neomutt/metadata.xml b/mail-client/neomutt/metadata.xml |
34 |
new file mode 100644 |
35 |
index 00000000000..081f253b3a1 |
36 |
--- /dev/null |
37 |
+++ b/mail-client/neomutt/metadata.xml |
38 |
@@ -0,0 +1,24 @@ |
39 |
+<?xml version="1.0" encoding="UTF-8"?> |
40 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
41 |
+<pkgmetadata> |
42 |
+ <maintainer type="person"> |
43 |
+ <email>nicolasbock@g.o</email> |
44 |
+ <name>Nicolas Bock</name> |
45 |
+ </maintainer> |
46 |
+ <maintainer type="project"> |
47 |
+ <email>net-mail@g.o</email> |
48 |
+ <name>Net-Mail</name> |
49 |
+ </maintainer> |
50 |
+ <use> |
51 |
+ <flag name="gpg">Enable support for <pkg>app-crypt/gpgme</pkg></flag> |
52 |
+ <flag name="notmuch">Enable support for <pkg>net-mail/notmuch</pkg></flag> |
53 |
+ <flag name="smime">Enable support for S/MIME</flag> |
54 |
+ <flag name="tokyocabinet">Enable <pkg>dev-db/tokyocabinet</pkg> |
55 |
+ database backend for header caching</flag> |
56 |
+ </use> |
57 |
+ <longdescription lang="en"> |
58 |
+ </longdescription> |
59 |
+ <upstream> |
60 |
+ <remote-id type="github">neomutt/neomutt</remote-id> |
61 |
+ </upstream> |
62 |
+</pkgmetadata> |
63 |
diff --git a/mail-client/neomutt/neomutt-20170714.ebuild b/mail-client/neomutt/neomutt-20170714.ebuild |
64 |
new file mode 100644 |
65 |
index 00000000000..9bcf72e7479 |
66 |
--- /dev/null |
67 |
+++ b/mail-client/neomutt/neomutt-20170714.ebuild |
68 |
@@ -0,0 +1,161 @@ |
69 |
+# Copyright 1999-2017 Gentoo Foundation |
70 |
+# Distributed under the terms of the GNU General Public License v2 |
71 |
+# $Id$ |
72 |
+ |
73 |
+EAPI=6 |
74 |
+ |
75 |
+inherit autotools eutils flag-o-matic |
76 |
+ |
77 |
+DESCRIPTION="A small but very powerful text-based mail client" |
78 |
+HOMEPAGE="https://www.neomutt.org/" |
79 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/${P}.tar.gz" |
80 |
+ |
81 |
+LICENSE="GPL-2" |
82 |
+SLOT="0" |
83 |
+KEYWORDS="~amd64 ~x86" |
84 |
+IUSE="berkdb crypt debug doc gdbm gnutls gpg idn kerberos libressl mbox nls |
85 |
+ notmuch qdbm sasl selinux slang smime ssl tokyocabinet vanilla" |
86 |
+ |
87 |
+CDEPEND=" |
88 |
+ !mail-client/mutt |
89 |
+ app-misc/mime-types |
90 |
+ nls? ( virtual/libintl ) |
91 |
+ tokyocabinet? ( dev-db/tokyocabinet ) |
92 |
+ !tokyocabinet? ( |
93 |
+ qdbm? ( dev-db/qdbm ) |
94 |
+ !qdbm? ( |
95 |
+ gdbm? ( sys-libs/gdbm ) |
96 |
+ !gdbm? ( berkdb? ( >=sys-libs/db-4:= ) ) |
97 |
+ ) |
98 |
+ ) |
99 |
+ gnutls? ( >=net-libs/gnutls-1.0.17 ) |
100 |
+ !gnutls? ( |
101 |
+ ssl? ( |
102 |
+ !libressl? ( >=dev-libs/openssl-0.9.6:0 ) |
103 |
+ libressl? ( dev-libs/libressl ) |
104 |
+ ) |
105 |
+ ) |
106 |
+ sasl? ( >=dev-libs/cyrus-sasl-2 ) |
107 |
+ kerberos? ( virtual/krb5 ) |
108 |
+ idn? ( net-dns/libidn ) |
109 |
+ gpg? ( >=app-crypt/gpgme-0.9.0 ) |
110 |
+ smime? ( |
111 |
+ !libressl? ( >=dev-libs/openssl-0.9.6:0 ) |
112 |
+ libressl? ( dev-libs/libressl ) |
113 |
+ ) |
114 |
+ notmuch? ( net-mail/notmuch ) |
115 |
+ slang? ( sys-libs/slang ) |
116 |
+ !slang? ( >=sys-libs/ncurses-5.2:0 ) |
117 |
+" |
118 |
+DEPEND="${CDEPEND} |
119 |
+ net-mail/mailbase |
120 |
+ doc? ( |
121 |
+ dev-libs/libxml2 |
122 |
+ dev-libs/libxslt |
123 |
+ app-text/docbook-xsl-stylesheets |
124 |
+ || ( www-client/lynx www-client/w3m www-client/elinks ) |
125 |
+ )" |
126 |
+RDEPEND="${CDEPEND} |
127 |
+ selinux? ( sec-policy/selinux-mutt ) |
128 |
+" |
129 |
+ |
130 |
+S="${WORKDIR}/${PN}-${P}" |
131 |
+ |
132 |
+src_prepare() { |
133 |
+ eapply_user |
134 |
+ eautoreconf |
135 |
+} |
136 |
+ |
137 |
+src_configure() { |
138 |
+ local myconf=( |
139 |
+ "$(use_enable crypt pgp)" |
140 |
+ "$(use_enable debug)" |
141 |
+ "$(use_enable doc)" |
142 |
+ "$(use_enable gpg gpgme)" |
143 |
+ "$(use_enable nls)" |
144 |
+ "$(use_enable smime)" |
145 |
+ "$(use_enable notmuch)" |
146 |
+ "$(use_with idn)" |
147 |
+ "$(use_with kerberos gss)" |
148 |
+ "--with-$(use slang && echo slang || echo curses)=${EPREFIX}/usr" |
149 |
+ "--sysconfdir=${EPREFIX}/etc/${PN}" |
150 |
+ "--with-docdir=${EPREFIX}/usr/share/doc/${PN}-${PVR}" |
151 |
+ ) |
152 |
+ |
153 |
+ if [[ ${CHOST} == *-solaris* ]] ; then |
154 |
+ # arrows in index view do not show when using wchar_t |
155 |
+ myconf+=( "--without-wc-funcs" ) |
156 |
+ fi |
157 |
+ |
158 |
+ # mutt prioritizes gdbm over bdb, so we will too. |
159 |
+ # hcache feature requires at least one database is in USE. |
160 |
+ local hcaches=( |
161 |
+ "tokyocabinet" |
162 |
+ "qdbm" |
163 |
+ "gdbm" |
164 |
+ "berkdb:bdb" |
165 |
+ ) |
166 |
+ local ucache hcache lcache |
167 |
+ for hcache in "${hcaches[@]}" ; do |
168 |
+ if use ${hcache%%:*} ; then |
169 |
+ ucache=${hcache} |
170 |
+ break |
171 |
+ fi |
172 |
+ done |
173 |
+ for hcache in "${hcaches[@]}" ; do |
174 |
+ [[ ${hcache} == ${ucache} ]] \ |
175 |
+ && myconf+=( "--with-${hcache#*:}" ) \ |
176 |
+ || myconf+=( "--without-${hcache#*:}" ) |
177 |
+ done |
178 |
+ |
179 |
+ # there's no need for gnutls, ssl or sasl without socket support |
180 |
+ if use gnutls; then |
181 |
+ myconf+=( "--with-gnutls" ) |
182 |
+ elif use ssl; then |
183 |
+ myconf+=( "--with-ssl" ) |
184 |
+ fi |
185 |
+ # not sure if this should be mutually exclusive with the other two |
186 |
+ myconf+=( "$(use_with sasl)" ) |
187 |
+ |
188 |
+ if use mbox; then |
189 |
+ myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" ) |
190 |
+ else |
191 |
+ myconf+=( "--with-homespool=Maildir" ) |
192 |
+ fi |
193 |
+ |
194 |
+ econf "${myconf[@]}" || die "configure failed" |
195 |
+} |
196 |
+ |
197 |
+src_install() { |
198 |
+ emake DESTDIR="${D}" install || die "install failed" |
199 |
+ if use mbox; then |
200 |
+ insinto /etc/neomutt |
201 |
+ newins "${FILESDIR}"/Muttrc.mbox Muttrc |
202 |
+ else |
203 |
+ insinto /etc/neomutt |
204 |
+ doins "${FILESDIR}"/Muttrc |
205 |
+ fi |
206 |
+ |
207 |
+ # A newer file is provided by app-misc/mime-types. So we link it. |
208 |
+ rm "${ED}"/etc/${PN}/mime.types |
209 |
+ dosym /etc/mime.types /etc/${PN}/mime.types |
210 |
+ |
211 |
+ # A man-page is always handy, so fake one |
212 |
+ if use !doc; then |
213 |
+ emake -C doc DESTDIR="${D}" muttrc.man || die |
214 |
+ # make the fake slightly better, bug #413405 |
215 |
+ sed -e 's#@docdir@/manual.txt#http://www.mutt.org/doc/devel/manual.html#' \ |
216 |
+ -e 's#in @docdir@,#at http://www.mutt.org/,#' \ |
217 |
+ -e "s#@sysconfdir@#${EPREFIX}/etc/${PN}#" \ |
218 |
+ -e "s#@bindir@#${EPREFIX}/usr/bin#" \ |
219 |
+ doc/mutt.man > mutt.1 |
220 |
+ cp doc/muttrc.man muttrc.5 |
221 |
+ doman mutt.1 muttrc.5 |
222 |
+ else |
223 |
+ # nuke manpages that should be provided by an MTA, bug #177605 |
224 |
+ rm "${ED}"/usr/share/man/man5/{mbox,mmdf}.5 \ |
225 |
+ || ewarn "failed to remove files, please file a bug" |
226 |
+ fi |
227 |
+ |
228 |
+ dodoc COPYRIGHT ChangeLog.md OPS* README* |
229 |
+} |
230 |
-- |
231 |
2.13.0 |
232 |
|
233 |
|
234 |
-- |
235 |
Nicolas Bock <nicolasbock@g.o> |