Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-client/mutt/
Date: Wed, 25 Jan 2017 13:53:44
Message-Id: 1485352412.a3e5d630edada96d9a128b9c50daf5c710fa3a50.grobian@gentoo
1 commit: a3e5d630edada96d9a128b9c50daf5c710fa3a50
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 25 13:53:12 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 25 13:53:32 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3e5d630
7
8 mail-client/mutt: revbump with latest features/fixes, added lmdb support
9
10 Package-Manager: portage-2.3.0
11
12 mail-client/mutt/Manifest | 1 +
13 mail-client/mutt/metadata.xml | 9 +-
14 mail-client/mutt/mutt-1.7.2-r2.ebuild | 246 ++++++++++++++++++++++++++++++++++
15 3 files changed, 253 insertions(+), 3 deletions(-)
16
17 diff --git a/mail-client/mutt/Manifest b/mail-client/mutt/Manifest
18 index b1574cc..84663e0 100644
19 --- a/mail-client/mutt/Manifest
20 +++ b/mail-client/mutt/Manifest
21 @@ -5,3 +5,4 @@ DIST mutt-1.5.24.tar.gz 3897115 SHA256 a292ca765ed7b19db4ac495938a3ef808a16193b7
22 DIST mutt-1.7.2.tar.gz 4025880 SHA256 1553501687cd22d5b8aaee4dc5a7d9dcf6cc61d7956f6aabaadd252d10cd5ff9 SHA512 5f13cbdf802bca80668b2f54bc66201d01bfe34c7f377b1bad88f8fa0e0c695264ff0bf6b64ae9bb6f5a3e22b6f096d2dd99fa36724937609f6f46e6a74da74e WHIRLPOOL c3a6bac41e31d79ae06ddfba1e9d8868e0cd4b54b04b3ca61ed5330f61ab56c7cf88273ae937c9de134fde01a31aebd70242afee6987177f152a5acd6d9d26b4
23 DIST mutt-gentoo-1.7.2-patches-r1.tar.xz 143816 SHA256 6358ee38ff32a35a0bc6449cba13b5cab406148fc068f2faa81aca16a6b5d158 SHA512 21703bc808ae510e26ede38e1dda5d7c74cad15823154584a83209e9dbf68bf6350961e66729cf2ede78bde003f3b92567d42f9f8f89ed53643dcfa536625b7e WHIRLPOOL 8b6b19da9ced5bf27d86b3143c878c8a392ffa1a3505d7f07d6a5ba5f76289f08447266be0b717179062cff3ba52155538be39f02f5af67fe4d84f9dc2a9d36c
24 DIST mutt-gentoo-1.7.2-patches-r2.tar.xz 152992 SHA256 ac6f017f5d4b14d44a8d5d71e7cdeac59ba381a35ddff2db329e1d0a1af23720 SHA512 b96c658e151ee6b47a46b91311d9b9de002ae8ba6438d6e628f75722e9e66de5010b6ee6691f26ed0b9ba60aa4d96eee23bff39b7e6a27621e69d33701fafb01 WHIRLPOOL 3bb959a58eea74e9286146f0436a499a923c9d451d3d5fe6cef18bf9aa2038a5ce2f9c6514f5fe0c0297a5791fe1de135744eb7149b1c741cd1665a18c8224eb
25 +DIST mutt-gentoo-1.7.2-patches-r3.tar.xz 157048 SHA256 6355352d77b4297f4c1a6c2ff3e5877ed03b735ecb9b032dd0ac82e732a748e5 SHA512 31e71b8d444c93a4db13fea2bfb04dca12e252ea57a6cc77aea74213025ba57fdae207aa1d3a0ef3d0f22617edf090ddd6141d7aa87e03bd896dc4bc98bc3b99 WHIRLPOOL cec7f3b335a5f673a0b6b78a2b807a4432bcfb4df52a28665b74fcf367257d33fcb7a3e594be15453574cf6a22ef63a2bbdffa9124a529229abb71456070bf3d
26
27 diff --git a/mail-client/mutt/metadata.xml b/mail-client/mutt/metadata.xml
28 index de2759e..0e7f081 100644
29 --- a/mail-client/mutt/metadata.xml
30 +++ b/mail-client/mutt/metadata.xml
31 @@ -9,14 +9,17 @@
32 <name>Net-Mail</name>
33 </maintainer>
34 <use>
35 + <flag name="hcache">Enable header cache</flag>
36 <flag name="gpg">Enable support for <pkg>app-crypt/gpgme</pkg></flag>
37 <flag name="pop">Enable support for POP3</flag>
38 - <flag name="notmuch">Enable support for <pkg>net-mail/notmuch</pkg></flag>
39 + <flag name="lmdb">Enable <pkg>dev-db/lmdb</pkg> database backend for
40 + header caching</flag>
41 + <flag name="notmuch">Enable support for <pkg>net-mail/notmuch</pkg></flag>
42 <flag name="sidebar">Enable the sidebar feature</flag>
43 <flag name="smime">Enable support for S/MIME</flag>
44 <flag name="smtp">Enable support for smtp</flag>
45 - <flag name="tokyocabinet">Enable tokyocabinet database backend for header
46 - caching</flag>
47 + <flag name="tokyocabinet">Enable <pkg>dev-db/tokyocabinet</pkg>
48 + database backend for header caching</flag>
49 </use>
50 <upstream>
51 <remote-id type="sourceforge">mutt</remote-id>
52
53 diff --git a/mail-client/mutt/mutt-1.7.2-r2.ebuild b/mail-client/mutt/mutt-1.7.2-r2.ebuild
54 new file mode 100644
55 index 00000000..6669d59
56 --- /dev/null
57 +++ b/mail-client/mutt/mutt-1.7.2-r2.ebuild
58 @@ -0,0 +1,246 @@
59 +# Copyright 1999-2017 Gentoo Foundation
60 +# Distributed under the terms of the GNU General Public License v2
61 +# $Id$
62 +
63 +EAPI="6"
64 +
65 +inherit eutils flag-o-matic autotools
66 +
67 +PATCHREV="r3"
68 +PATCHSET="gentoo-${PVR}/${PATCHREV}"
69 +
70 +DESCRIPTION="A small but very powerful text-based mail client"
71 +HOMEPAGE="http://www.mutt.org/"
72 +MUTT_G_PATCHES="mutt-gentoo-${PV}-patches-${PATCHREV}.tar.xz"
73 +SRC_URI="ftp://ftp.mutt.org/pub/mutt/${P}.tar.gz
74 + https://bitbucket.org/${PN}/${PN}/downloads/${P}.tar.gz
75 + https://dev.gentoo.org/~grobian/distfiles/${MUTT_G_PATCHES}"
76 +IUSE="berkdb crypt debug doc gdbm gnutls gpg +hcache idn imap kerberos libressl lmdb mbox nls nntp notmuch pop qdbm sasl selinux sidebar slang smime smtp ssl tokyocabinet vanilla"
77 +REQUIRED_USE="
78 + hcache? ( ^^ ( berkdb gdbm lmdb qdbm tokyocabinet ) )
79 + imap? ( ^^ ( ssl gnutls libressl ) )
80 + pop? ( ^^ ( ssl gnutls libressl ) )
81 + nntp? ( ^^ ( ssl gnutls libressl ) )
82 + smime? ( ^^ ( ssl libressl ) )
83 + smtp? ( ^^ ( ssl gnutls libressl ) )
84 + sasl? ( || ( imap pop smtp nntp ) )
85 + kerberos? ( || ( imap pop smtp nntp ) )"
86 +SLOT="0"
87 +LICENSE="GPL-2"
88 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
89 +CDEPEND="
90 + app-misc/mime-types
91 +
92 + berkdb? ( >=sys-libs/db-4:= )
93 + gdbm? ( sys-libs/gdbm )
94 + lmdb? ( dev-db/lmdb:= )
95 + qdbm? ( dev-db/qdbm )
96 + tokyocabinet? ( dev-db/tokyocabinet )
97 +
98 + gnutls? ( >=net-libs/gnutls-1.0.17:= )
99 + libressl? ( dev-libs/libressl:= )
100 + ssl? ( >=dev-libs/openssl-0.9.6:0= )
101 +
102 + nls? ( virtual/libintl )
103 + sasl? ( >=dev-libs/cyrus-sasl-2 )
104 + kerberos? ( virtual/krb5 )
105 + idn? ( net-dns/libidn )
106 + gpg? ( >=app-crypt/gpgme-0.9.0:= )
107 + notmuch? ( net-mail/notmuch:= )
108 + slang? ( sys-libs/slang )
109 + !slang? ( >=sys-libs/ncurses-5.2:0= )
110 +"
111 +DEPEND="${CDEPEND}
112 + net-mail/mailbase
113 + doc? (
114 + dev-libs/libxml2
115 + dev-libs/libxslt
116 + app-text/docbook-xsl-stylesheets
117 + || ( www-client/lynx www-client/w3m www-client/elinks )
118 + )"
119 +RDEPEND="${CDEPEND}
120 + selinux? ( sec-policy/selinux-mutt )
121 +"
122 +
123 +src_prepare() {
124 + local PATCHDIR="${WORKDIR}"/gentoo-mutt-${PV}-patches
125 +
126 + if use !vanilla ; then
127 + # apply patches
128 + export EPATCH_FORCE="yes"
129 + export EPATCH_SUFFIX="patch"
130 + local patches=(
131 + patches-mutt
132 + bugs-gentoo
133 + features-common
134 + features-extra
135 + gentoo
136 + )
137 + local patchset
138 + for patchset in "${patches[@]}" ; do
139 + einfo "Applying ${PATCHSET} patchset ${patchset}"
140 + EPATCH_SOURCE="${PATCHDIR}"/${patchset} epatch \
141 + || die "patchset ${patchset} failed"
142 + done
143 + # add some explanation as to why not to go upstream
144 + sed -i \
145 + -e '/ReachingUs = N_(/aThis release of Mutt is heavily enriched with patches.\\nFor this reason, any bugs are better reported at https://bugs.gentoo.org/\\nor re-emerge with USE=vanilla and try to reproduce your problem.\\n\\' \
146 + main.c || die "Failed to add bug instructions"
147 + fi
148 +
149 + local upatches=
150 + # allow user patches
151 + eapply_user && upatches=" with user patches"
152 +
153 + # patch version string for bug reports
154 + local patchset=
155 + use vanilla || patchset=", ${PATCHSET}"
156 + sed -i -e 's|"Mutt %s (%s)"|"Mutt %s (%s'"${patchset}${upatches}"')"|' \
157 + muttlib.c || die "failed patching in Gentoo version"
158 +
159 + # many patches touch the buildsystem, we always need this
160 + AT_M4DIR="m4" eautoreconf
161 +
162 + # the configure script contains some "cleverness" whether or not to setgid
163 + # the dotlock program, resulting in bugs like #278332
164 + sed -i -e 's/@DOTLOCK_GROUP@//' \
165 + Makefile.in || die "sed failed"
166 +}
167 +
168 +src_configure() {
169 + local myconf=(
170 + "$(use_enable crypt pgp)"
171 + "$(use_enable debug)"
172 + "$(use_enable doc)"
173 + "$(use_enable gpg gpgme)"
174 + "$(use_enable nls)"
175 + "$(use_enable notmuch)"
176 + "$(use_enable sidebar)"
177 + "$(use_enable smime)"
178 +
179 + "$(use_enable imap)"
180 + "$(use_enable pop)"
181 + "$(use_enable nntp)"
182 + "$(use_enable smtp)"
183 +
184 + "$(use_with gnutls)"
185 + "$(use libressl || use ssl && echo --with-ssl)"
186 + "$(use !libressl && use !ssl && echo --without-ssl)"
187 +
188 + "$(use_with idn)"
189 + "$(use_with kerberos gss)"
190 + "$(use_with sasl)"
191 + "$(use slang && echo --with-slang=${EPREFIX}/usr)"
192 + "$(use_with !slang curses ${EPREFIX}/usr)"
193 +
194 + "--enable-compressed"
195 + "--enable-external-dotlock"
196 + "--enable-nfs-fix"
197 + "--sysconfdir=${EPREFIX}/etc/${PN}"
198 + "--with-docdir=${EPREFIX}/usr/share/doc/${PN}-${PVR}"
199 + "--with-regex"
200 + "--with-exec-shell=${EPREFIX}/bin/sh"
201 + )
202 +
203 + if [[ ${CHOST} == *-solaris* ]] ; then
204 + # arrows in index view do not show when using wchar_t
205 + myconf+=( "--without-wc-funcs" )
206 + fi
207 +
208 + # REQUIRED_USE should have selected only one of these
209 + local hcaches=(
210 + "berkdb:bdb"
211 + "gdbm"
212 + "lmdb"
213 + "qdbm"
214 + "tokyocabinet"
215 + )
216 + local ucache hcache lcache
217 + for hcache in "${hcaches[@]}" ; do
218 + if use ${hcache%%:*} ; then
219 + ucache=${hcache}
220 + break
221 + fi
222 + done
223 + if [[ -n ${ucache} ]] ; then
224 + myconf+=( "--enable-hcache" )
225 + else
226 + myconf+=( "--disable-hcache" )
227 + fi
228 + for hcache in "${hcaches[@]}" ; do
229 + [[ ${hcache} == ${ucache} ]] \
230 + && myconf+=( "--with-${hcache#*:}" ) \
231 + || myconf+=( "--without-${hcache#*:}" )
232 + done
233 +
234 + if use mbox; then
235 + myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" )
236 + else
237 + myconf+=( "--with-homespool=Maildir" )
238 + fi
239 +
240 + econf "${myconf[@]}" || die "configure failed"
241 +}
242 +
243 +src_install() {
244 + emake DESTDIR="${D}" install || die "install failed"
245 + if use mbox; then
246 + insinto /etc/mutt
247 + newins "${FILESDIR}"/Muttrc.mbox Muttrc
248 + else
249 + insinto /etc/mutt
250 + doins "${FILESDIR}"/Muttrc
251 + fi
252 +
253 + # A newer file is provided by app-misc/mime-types. So we link it.
254 + rm "${ED}"/etc/${PN}/mime.types
255 + dosym /etc/mime.types /etc/${PN}/mime.types
256 +
257 + # A man-page is always handy, so fake one
258 + if use !doc; then
259 + emake -C doc DESTDIR="${D}" muttrc.man || die
260 + # make the fake slightly better, bug #413405
261 + sed -e 's#@docdir@/manual.txt#http://www.mutt.org/doc/devel/manual.html#' \
262 + -e 's#in @docdir@,#at http://www.mutt.org/,#' \
263 + -e "s#@sysconfdir@#${EPREFIX}/etc/${PN}#" \
264 + -e "s#@bindir@#${EPREFIX}/usr/bin#" \
265 + doc/mutt.man > mutt.1
266 + cp doc/muttbug.man flea.1
267 + cp doc/muttrc.man muttrc.5
268 + doman mutt.1 flea.1 muttrc.5
269 + else
270 + # nuke manpages that should be provided by an MTA, bug #177605
271 + rm "${ED}"/usr/share/man/man5/{mbox,mmdf}.5 \
272 + || ewarn "failed to remove files, please file a bug"
273 + fi
274 +
275 + if use !prefix ; then
276 + fowners root:mail /usr/bin/mutt_dotlock
277 + fperms g+s /usr/bin/mutt_dotlock
278 + fi
279 +
280 + dodoc BEWARE COPYRIGHT ChangeLog NEWS OPS* PATCHES README* TODO VERSION
281 +}
282 +
283 +pkg_postinst() {
284 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
285 + echo
286 + elog "If you are new to mutt you may want to take a look at"
287 + elog "the Gentoo QuickStart Guide to Mutt E-Mail:"
288 + elog " https://wiki.gentoo.org/wiki/Mutt"
289 + echo
290 + else
291 + local ver
292 + local preconddate=
293 + for ver in ${REPLACING_VERSIONS} ; do
294 + [[ ${ver} == "1.5"* || ${ver} == "1.6"* ]] && preconddate=true
295 + done
296 + if [[ -n ${preconddate} ]] ; then
297 + echo
298 + elog "The SmartTime functionality has been replaced with"
299 + elog "CondDate feature. To mimic SmartTime, use this CondDate formatter:"
300 + elog "%<[12m?%<[7d?%<[12H?%[%H:%M ]&%[%a-%d]>&%[%d-%b]>&%[%b-%y]>"
301 + echo
302 + fi
303 + fi
304 +}