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: Sun, 31 Dec 2017 14:48:20
Message-Id: 1514731651.345ccc1fd15f1b5c7b14982ac367136aea7b33cb.grobian@gentoo
1 commit: 345ccc1fd15f1b5c7b14982ac367136aea7b33cb
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 31 14:47:18 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 31 14:47:31 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=345ccc1f
7
8 mail-client/mutt: revbump for some patches and changes from upstream
9
10 pgp_display_signature -> crypt_display_signature and now also works for gpgme
11
12 Package-Manager: Portage-2.3.13, Repoman-2.3.3
13
14 mail-client/mutt/Manifest | 1 +
15 mail-client/mutt/mutt-1.9.2-r1.ebuild | 279 ++++++++++++++++++++++++++++++++++
16 2 files changed, 280 insertions(+)
17
18 diff --git a/mail-client/mutt/Manifest b/mail-client/mutt/Manifest
19 index 5ff5c82abc1..1151ad46a03 100644
20 --- a/mail-client/mutt/Manifest
21 +++ b/mail-client/mutt/Manifest
22 @@ -4,3 +4,4 @@ DIST mutt-1.9.2.tar.gz 4195627 BLAKE2B 626ddd2535e28d46a50ea8e862573c2956587b9b8
23 DIST mutt-gentoo-1.7.2-patches-r1.tar.xz 143816 BLAKE2B ecc845983dc00e388c25ced0ca0c253d9fdfa813e9df6a4f166f4ccbb05cc26b5522fa84ccdfd1f92d5cce7291ac3d70ddefaeac3e13dafc892f924236a62f11 SHA512 21703bc808ae510e26ede38e1dda5d7c74cad15823154584a83209e9dbf68bf6350961e66729cf2ede78bde003f3b92567d42f9f8f89ed53643dcfa536625b7e
24 DIST mutt-gentoo-1.9.1-patches-r2.tar.xz 112976 BLAKE2B 3b4e882992982cf513bdfb27f24a136230e70e2e654136175394db5b6c2c37a48d1d4ae52da05a7b64c741eadd1c294f2141a36007516e6d444e3c5d2d949bdd SHA512 39204b0336bdcc610cf6152f2a41e1a4bde9a5cb05e2120b9ac80360ce978ba830656d53fb4c860ac35baf0ad7f9f359e151a2ae6a657de3073c97667b02c264
25 DIST mutt-gentoo-1.9.2-patches-r0.tar.xz 112224 BLAKE2B 7c5a5e67029e8c2775a1aeb876c5ee87c5616d748b08457364da07eccde5d3baecb328a95ef2fae7755be72b08d553d4beea08ccc751e146ce46694eac0c1f73 SHA512 b2ba382c21fe8d31059dd58760bba1ecd0b8fd256b3ade3d4dc0ea3dfa8c94e6ae9ec7baaf4b7c1c6c29d819fc78e9e781f07964478796e882903c0e9e438342
26 +DIST mutt-gentoo-1.9.2-patches-r1.tar.xz 113324 BLAKE2B a5ae4ca22001e91de8450086928bc7e3b26a26745d74f2969fb15e1f020037f8caffb92e0990dd9c8d13161afaa99c6cca593f8322f2870e413220447de20b3a SHA512 250323bb7b697ece97846f078f18ae93560f5ea5a8e1cedbc6d30ee21f3b430722e794d7a751ee4f9e673777ff39868c9c1e9dca4d4787b54240df7d981dbb39
27
28 diff --git a/mail-client/mutt/mutt-1.9.2-r1.ebuild b/mail-client/mutt/mutt-1.9.2-r1.ebuild
29 new file mode 100644
30 index 00000000000..de6cc180692
31 --- /dev/null
32 +++ b/mail-client/mutt/mutt-1.9.2-r1.ebuild
33 @@ -0,0 +1,279 @@
34 +# Copyright 1999-2017 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI="6"
38 +
39 +inherit eutils flag-o-matic autotools
40 +
41 +PATCHREV="r1"
42 +PATCHSET="gentoo-${PVR}/${PATCHREV}"
43 +
44 +DESCRIPTION="A small but very powerful text-based mail client"
45 +HOMEPAGE="http://www.mutt.org/"
46 +MUTT_G_PATCHES="mutt-gentoo-${PV}-patches-${PATCHREV}.tar.xz"
47 +SRC_URI="ftp://ftp.mutt.org/pub/mutt/${P}.tar.gz
48 + https://bitbucket.org/${PN}/${PN}/downloads/${P}.tar.gz
49 + https://dev.gentoo.org/~grobian/distfiles/${MUTT_G_PATCHES}"
50 +IUSE="berkdb crypt debug doc gdbm gnutls gpg gpgme +hcache idn +imap kerberos libressl +lmdb mbox nls nntp notmuch pgp_classic pop qdbm +sasl selinux slang smime smime_classic +smtp +ssl tokyocabinet vanilla prefix"
51 +REQUIRED_USE="
52 + hcache? ( ^^ ( berkdb gdbm lmdb qdbm tokyocabinet ) )
53 + imap? ( ssl )
54 + pop? ( ssl )
55 + nntp? ( ssl )
56 + smime? ( ssl !gnutls )
57 + smime_classic? ( ssl !gnutls )
58 + smtp? ( ssl )
59 + sasl? ( || ( imap pop smtp nntp ) )
60 + kerberos? ( || ( imap pop smtp nntp ) )"
61 +SLOT="0"
62 +LICENSE="GPL-2"
63 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
64 +CDEPEND="
65 + app-misc/mime-types
66 +
67 + berkdb? ( >=sys-libs/db-4:= )
68 + gdbm? ( sys-libs/gdbm )
69 + lmdb? ( dev-db/lmdb:= )
70 + qdbm? ( dev-db/qdbm )
71 + tokyocabinet? ( dev-db/tokyocabinet )
72 +
73 + ssl? (
74 + gnutls? ( >=net-libs/gnutls-1.0.17:= )
75 + !gnutls? (
76 + libressl? ( dev-libs/libressl:= )
77 + !libressl? ( >=dev-libs/openssl-0.9.6:0= )
78 + )
79 + )
80 +
81 + nls? ( virtual/libintl )
82 + sasl? ( >=dev-libs/cyrus-sasl-2 )
83 + kerberos? ( virtual/krb5 )
84 + idn? ( net-dns/libidn )
85 + gpg? ( >=app-crypt/gpgme-0.9.0:= )
86 + gpgme? ( >=app-crypt/gpgme-0.9.0:= )
87 + notmuch? ( net-mail/notmuch:= )
88 + slang? ( sys-libs/slang )
89 + !slang? ( >=sys-libs/ncurses-5.2:0= )
90 +"
91 +DEPEND="${CDEPEND}
92 + net-mail/mailbase
93 + doc? (
94 + dev-libs/libxml2
95 + dev-libs/libxslt
96 + app-text/docbook-xsl-stylesheets
97 + || ( www-client/lynx www-client/w3m www-client/elinks )
98 + )"
99 +RDEPEND="${CDEPEND}
100 + selinux? ( sec-policy/selinux-mutt )
101 + smime? ( || ( dev-libs/libressl >=dev-libs/openssl-0.9.6:0 ) )
102 + smime_classic? ( || ( dev-libs/libressl >=dev-libs/openssl-0.9.6:0 ) )
103 + crypt? ( app-crypt/gnupg )
104 + pgp_classic? ( app-crypt/gnupg )
105 +"
106 +
107 +src_prepare() {
108 + local PATCHDIR="${WORKDIR}"/mutt-gentoo-${PV}-patches
109 +
110 + if use !vanilla ; then
111 + # apply patches
112 + export EPATCH_FORCE="yes"
113 + export EPATCH_SUFFIX="patch"
114 + # http://hg.code.sf.net/p/gentoomuttpatches/code/file/mutt-1.9
115 + local patches=(
116 + patches-mutt
117 + bugs-gentoo
118 + features-common
119 + features-extra
120 + gentoo
121 + )
122 + local patchset
123 + for patchset in "${patches[@]}" ; do
124 + [[ -d "${PATCHDIR}/${patchset}" ]] || continue
125 + einfo "Patches for ${PATCHSET} patchset ${patchset}"
126 + EPATCH_SOURCE="${PATCHDIR}"/${patchset} epatch \
127 + || die "patchset ${patchset} failed"
128 + done
129 + # add some explanation as to why not to go upstream
130 + sed -i \
131 + -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\\' \
132 + main.c || die "Failed to add bug instructions"
133 + fi
134 +
135 + local upatches=
136 + # allow user patches
137 + eapply_user && upatches=" with user patches"
138 +
139 + # patch version string for bug reports
140 + local patchset=
141 + use vanilla || patchset=", ${PATCHSET}"
142 + sed -i -e 's|"Mutt %s (%s)"|"Mutt %s (%s'"${patchset}${upatches}"')"|' \
143 + muttlib.c || die "failed patching in Gentoo version"
144 +
145 + # many patches touch the buildsystem, we always need this
146 + AT_M4DIR="m4" eautoreconf
147 +
148 + # the configure script contains some "cleverness" whether or not to setgid
149 + # the dotlock program, resulting in bugs like #278332
150 + sed -i -e 's/@DOTLOCK_GROUP@//' \
151 + Makefile.in || die "sed failed"
152 +}
153 +
154 +src_configure() {
155 + local myconf=(
156 + # signing and encryption
157 + # clumpsy blocks for transition period of USE-flag renames
158 + $(use crypt && use_enable crypt pgp)
159 + $(use pgp_classic && use_enable pgp_classic pgp)
160 + $(use !crypt && use !pgp_classic && echo "--disable-pgp")
161 +
162 + $(use smime && use_enable smime)
163 + $(use smime_classic && use_enable smime_classic smime)
164 + $(use !smime && use !smime_classic && echo "--disable-smime")
165 +
166 + $(use gpg && use_enable gpg gpgme)
167 + $(use gpgme && use_enable gpgme)
168 + $(use !gpg && use !gpgme && echo "--disable-gpgme")
169 +
170 + # features
171 + $(use_enable debug)
172 + $(use_enable doc)
173 + $(use_enable nls)
174 + $(use_enable notmuch)
175 +
176 + # protocols
177 + $(use_enable imap)
178 + $(use_enable pop)
179 + $(use_enable nntp)
180 + $(use_enable smtp)
181 +
182 + $(use ssl && use gnutls && echo --with-gnutls --without-ssl)
183 + $(use ssl && use !gnutls && echo --without-gnutls --with-ssl )
184 + $(use !ssl && echo --without-gnutls --without-ssl)
185 +
186 + $(use_with sasl)
187 + $(use_with idn)
188 + $(use_with kerberos gss)
189 + "$(use slang && echo --with-slang="${EPREFIX}"/usr || echo a=b)"
190 + "$(use_with !slang curses "${EPREFIX}"/usr)"
191 +
192 + "--enable-compressed"
193 + "--enable-external-dotlock"
194 + "--enable-nfs-fix"
195 + "--enable-sidebar"
196 + "--sysconfdir=${EPREFIX}/etc/${PN}"
197 + "--with-docdir=${EPREFIX}/usr/share/doc/${PN}-${PVR}"
198 + "--with-regex"
199 + "--with-exec-shell=${EPREFIX}/bin/sh"
200 + )
201 +
202 + if [[ ${CHOST} == *-solaris2.* && ${CHOST#*-solaris2.} -le 10 ]] ; then
203 + # arrows in index view do not show when using wchar_t
204 + # or misalign due to wrong computations
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 "${EPREFIX}"/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 + fi
291 + if use crypt || use gpg || use smime ; then
292 + ewarn "Please note that the crypto related USE-flags of mutt have changed."
293 + ewarn "To remove some unclarity, the following USE-flags are renamed:"
294 + ewarn "(see https://bugs.gentoo.org/637176)"
295 + ewarn " crypt -> pgp_classic"
296 + ewarn " gpg -> gpgme"
297 + ewarn " smime -> smime_classic"
298 + ewarn "The old USE flags still work but their use is deprecated and will"
299 + ewarn "be removed in a future release. Please update your package.use"
300 + if use gpg && ( use crypt || use smime ) ; then
301 + ewarn " Note that gpgme (old gpg) includes both pgp and smime"
302 + ewarn " support. You can probably remove pgp_classic (old crypt)"
303 + ewarn " and smime_classic (old smime) from your USE-flags and"
304 + ewarn " only enable gpgme."
305 + fi
306 + fi
307 + if use gpgme ; then
308 + ewarn "Note: in order for Mutt to actually use the gpgme backend"
309 + ewarn " you MUST include 'set crypt_use_gpgme=yes' in .muttrc"
310 + ewarn " https://dev.mutt.org/doc/manual.html#crypt-use-gpgme"
311 + fi
312 +}