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: Thu, 31 Dec 2020 08:58:52
Message-Id: 1609405127.030ea435ed58d50c8fc59da81b55c4796da19e9d.grobian@gentoo
1 commit: 030ea435ed58d50c8fc59da81b55c4796da19e9d
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 31 08:58:29 2020 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 31 08:58:47 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=030ea435
7
8 mail-client/mutt-2.0.4: version bump
9
10 Package-Manager: Portage-3.0.9, Repoman-3.0.2
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 mail-client/mutt/Manifest | 2 +
14 mail-client/mutt/mutt-2.0.4.ebuild | 265 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 267 insertions(+)
16
17 diff --git a/mail-client/mutt/Manifest b/mail-client/mutt/Manifest
18 index f1c7dd8f25d..e802d07e53c 100644
19 --- a/mail-client/mutt/Manifest
20 +++ b/mail-client/mutt/Manifest
21 @@ -1,4 +1,6 @@
22 DIST mutt-2.0.2.tar.gz 5293613 BLAKE2B 215a4d54e6dd202ebced91d0536a7f70e774b3c41c129ef87a55ea75a298e485b72145e5dd3c654d9b28138800c4b3e87a3815ab789d952b6b58cfc068fd397b SHA512 5dea02edf60b33e4873806481aa4256f91d90b05de99a9eccc620c459bd924197b656f85eb5a31757a61675389e6c4d76571128a757cfda255240934e82eec29
23 DIST mutt-2.0.3.tar.gz 5292808 BLAKE2B 323a63b1b4ece774674b6f207ae51ffb58e57fd90fa2a44d8a69bb5311bf66318f8d6e8ca20b333bb7e3bea1ef995ab84f1f6cd8486ee91fbfdb90e2d64444b9 SHA512 6511f6690137f2cd8798a6c76a6f1a6305b2ddaad9bf339ec7144f6c249fe9cbcfb5bfbbdd308fcc6829b7fa12132b14d555dd3a9ef9e9b46c9748e2f31be852
24 +DIST mutt-2.0.4.tar.gz 5293913 BLAKE2B 9c5d2d17fae9653868cca08eb7d92f9c6e122702590ba88a2ba04ee8606cfba5bca99716045b59cf40a21e95a0e32f3b21a34ee34440f155a3e2788720c3d57c SHA512 8080107810d2ff572b1532bb441573e4dcfbfbc03f28be711dcdebd1e6a1c8b5adf5c5a4f386ce0a661ff7050722b41e122c58964feae665ff4138013af18762
25 DIST mutt-gentoo-2.0.2-patches-r0.tar.xz 26380 BLAKE2B 3ce2dbe07f9340adbaeb0489fe88564b6cc44ef330d298915d42617357799a26f277cc0dcab2b78a5620f20a2533f2fe43287bab76eeb9529013e9f9c7659ffb SHA512 79fb00ccf6084da805c75eedbdb1631b12e616318e91a4c246d0194a478b803e3dc5d2815f757fecc91316c010058c2d0e9ecaf3fe40d5664ac25af63a0d7e13
26 DIST mutt-gentoo-2.0.3-patches-r0.tar.xz 26396 BLAKE2B 1ee41baedb2ade72437ec4ffbd617e7e8a07c432ae2c025001df7fc19b2e6181e54f25dd16f02027f03f0f9df0032b35088354ae8c2c238a57fea2c3407dee4e SHA512 290416aa72d6938c9f52f60702ae1a9306704a3c63ca35c8fb35902c8e2307da42b478718521ebe0d6b857089b778bc172cd9cf5f061fab56fe5dea47c01f792
27 +DIST mutt-gentoo-2.0.4-patches-r0.tar.xz 26448 BLAKE2B 7f2e2730e18def7281cf59bc783ebc4047e459ebb8796810507ff11f5e99b78c2d6914be154251f1a279b4963156825931e22cd727e86eb40c15637736be457e SHA512 16025a790fba20ba1e693b1b826bf86bd2697d0d3ab5ceaf08b1692902235ef40866daec80862c7082a82a58fa4f9631889688f1d06b864cb29c613725fe5024
28
29 diff --git a/mail-client/mutt/mutt-2.0.4.ebuild b/mail-client/mutt/mutt-2.0.4.ebuild
30 new file mode 100644
31 index 00000000000..098178a8242
32 --- /dev/null
33 +++ b/mail-client/mutt/mutt-2.0.4.ebuild
34 @@ -0,0 +1,265 @@
35 +# Copyright 1999-2020 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI="6"
39 +
40 +inherit eutils flag-o-matic autotools
41 +
42 +PATCHREV="r0"
43 +PATCHSET="gentoo-${PVR}/${PATCHREV}"
44 +
45 +DESCRIPTION="A small but very powerful text-based mail client"
46 +HOMEPAGE="http://www.mutt.org/"
47 +MUTT_G_PATCHES="mutt-gentoo-${PV}-patches-${PATCHREV}.tar.xz"
48 +SRC_URI="ftp://ftp.mutt.org/pub/mutt/${P}.tar.gz
49 + https://bitbucket.org/${PN}/${PN}/downloads/${P}.tar.gz
50 + https://dev.gentoo.org/~grobian/distfiles/${MUTT_G_PATCHES}"
51 +IUSE="autocrypt berkdb debug doc gdbm gnutls gpgme +hcache idn +imap kerberos libressl +lmdb mbox nls pgp-classic pop qdbm +sasl selinux slang smime-classic +smtp +ssl tokyocabinet vanilla prefix"
52 +# hcache: allow multiple, bug #607360
53 +REQUIRED_USE="
54 + hcache? ( || ( berkdb gdbm lmdb qdbm tokyocabinet ) )
55 + imap? ( ssl )
56 + pop? ( ssl )
57 + smime-classic? ( ssl !gnutls )
58 + smtp? ( ssl sasl )
59 + sasl? ( || ( imap pop smtp ) )
60 + kerberos? ( || ( imap pop smtp ) )
61 + autocrypt? ( gpgme )"
62 +SLOT="0"
63 +LICENSE="GPL-2"
64 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
65 +# yes, we overdepend on the backend impls here, hopefully one day we can
66 +# have REQUIRED_USE do what it is made for again. bug #607360
67 +CDEPEND="
68 + app-misc/mime-types
69 + virtual/libiconv
70 +
71 + berkdb? ( >=sys-libs/db-4:= )
72 + gdbm? ( sys-libs/gdbm )
73 + lmdb? ( dev-db/lmdb:= )
74 + qdbm? ( dev-db/qdbm )
75 + tokyocabinet? ( dev-db/tokyocabinet )
76 +
77 + ssl? (
78 + gnutls? ( >=net-libs/gnutls-1.0.17:= )
79 + !gnutls? (
80 + libressl? ( dev-libs/libressl:= )
81 + !libressl? ( >=dev-libs/openssl-0.9.6:0= )
82 + )
83 + )
84 +
85 + nls? ( virtual/libintl )
86 + sasl? ( >=dev-libs/cyrus-sasl-2 )
87 + kerberos? ( virtual/krb5 )
88 + idn? ( net-dns/libidn2 )
89 + gpgme? ( >=app-crypt/gpgme-0.9.0:= )
90 + autocrypt? ( >=dev-db/sqlite-3 )
91 + slang? ( sys-libs/slang )
92 + !slang? ( >=sys-libs/ncurses-5.2:0= )
93 +"
94 +DEPEND="${CDEPEND}
95 + net-mail/mailbase
96 + doc? (
97 + dev-libs/libxml2
98 + dev-libs/libxslt
99 + app-text/docbook-xsl-stylesheets
100 + || ( www-client/lynx www-client/w3m www-client/elinks )
101 + )"
102 +RDEPEND="${CDEPEND}
103 + selinux? ( sec-policy/selinux-mutt )
104 + smime-classic? ( || ( dev-libs/libressl >=dev-libs/openssl-0.9.6:0 ) )
105 + pgp-classic? ( app-crypt/gnupg )
106 +"
107 +
108 +src_prepare() {
109 + local PATCHDIR="${WORKDIR}"/mutt-gentoo-${PV}-patches-${PATCHREV}
110 +
111 + if use !vanilla ; then
112 + # apply patches
113 + export EPATCH_FORCE="yes"
114 + export EPATCH_SUFFIX="patch"
115 + # http://hg.code.sf.net/p/gentoomuttpatches/code/file/mutt-1.10
116 + local patches=(
117 + patches-mutt
118 + bugs-gentoo
119 + features-common
120 + features-extra
121 + gentoo
122 + )
123 + local patchset
124 + for patchset in "${patches[@]}" ; do
125 + [[ -d "${PATCHDIR}/${patchset}" ]] || continue
126 + einfo "Patches for ${PATCHSET} patchset ${patchset}"
127 + EPATCH_SOURCE="${PATCHDIR}"/${patchset} epatch \
128 + || die "patchset ${patchset} failed"
129 + done
130 + # add some explanation as to why not to go upstream
131 + sed -i \
132 + -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\\' \
133 + main.c || die "Failed to add bug instructions"
134 + fi
135 +
136 + local upatches=
137 + # allow user patches
138 + eapply_user && upatches=" with user patches"
139 +
140 + # patch version string for bug reports
141 + local patchset=
142 + use vanilla || patchset=", ${PATCHSET}"
143 + sed -i -e 's|"Mutt %s (%s)"|"Mutt %s (%s'"${patchset}${upatches}"')"|' \
144 + muttlib.c || die "failed patching in Gentoo version"
145 +
146 + # many patches touch the buildsystem, we always need this
147 + AT_M4DIR="m4" eautoreconf
148 +
149 + # the configure script contains some "cleverness" whether or not to setgid
150 + # the dotlock program, resulting in bugs like #278332
151 + sed -i -e 's/@DOTLOCK_GROUP@//' Makefile.in || die "sed failed"
152 +}
153 +
154 +src_configure() {
155 + local myconf=(
156 + # signing and encryption
157 + $(use_enable autocrypt) $(use_with autocrypt sqlite3)
158 + $(use_enable pgp-classic pgp)
159 + $(use_enable smime-classic smime)
160 + $(use_enable gpgme)
161 +
162 + # features
163 + $(use_enable debug)
164 + $(use_enable doc)
165 + $(use_enable nls)
166 +
167 + # protocols
168 + $(use_enable imap)
169 + $(use_enable pop)
170 + $(use_enable smtp)
171 +
172 + $(use ssl && use gnutls && echo --with-gnutls --without-ssl)
173 + $(use ssl && use !gnutls && echo --without-gnutls --with-ssl )
174 + $(use !ssl && echo --without-gnutls --without-ssl)
175 +
176 + $(use_with sasl)
177 + $(use_with idn idn2) --without-idn # avoid automagic libidn dep
178 + $(use_with kerberos gss)
179 + "$(use slang && echo --with-slang="${EPREFIX}"/usr || echo a=b)"
180 + "$(use_with !slang curses "${EPREFIX}"/usr)"
181 +
182 + "--enable-compressed"
183 + "--enable-external-dotlock"
184 + "--enable-iconv"
185 + "--enable-nfs-fix"
186 + "--enable-sidebar"
187 + "--sysconfdir=${EPREFIX}/etc/${PN}"
188 + "--with-docdir=${EPREFIX}/usr/share/doc/${PN}-${PVR}"
189 + "--without-bundled-regex" # use the implementation from libc
190 + "--with-exec-shell=${EPREFIX}/bin/sh"
191 + )
192 +
193 + if [[ ${CHOST} == *-solaris2.* && ${CHOST#*-solaris2.} -le 10 ]] ; then
194 + # arrows in index view do not show when using wchar_t
195 + # or misalign due to wrong computations
196 + myconf+=( "--without-wc-funcs" )
197 + fi
198 +
199 + # note: REQUIRED_USE should have selected only one of these, but for
200 + # bug #607360 we're forced to allow multiple. For that reason, this
201 + # list is ordered to preference, and only the first is taken.
202 + local hcaches=(
203 + "lmdb"
204 + "qdbm"
205 + "tokyocabinet"
206 + "gdbm"
207 + "berkdb:bdb"
208 + )
209 + local ucache hcache lcache
210 + for hcache in "${hcaches[@]}" ; do
211 + if use ${hcache%%:*} ; then
212 + ucache=${hcache}
213 + break
214 + fi
215 + done
216 + if [[ -n ${ucache} ]] ; then
217 + myconf+=( "--enable-hcache" )
218 + else
219 + myconf+=( "--disable-hcache" )
220 + fi
221 + for hcache in "${hcaches[@]}" ; do
222 + [[ ${hcache} == ${ucache} ]] \
223 + && myconf+=( "--with-${hcache#*:}" ) \
224 + || myconf+=( "--without-${hcache#*:}" )
225 + done
226 +
227 + if use mbox; then
228 + myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" )
229 + else
230 + myconf+=( "--with-homespool=Maildir" )
231 + fi
232 +
233 + econf "${myconf[@]}"
234 +}
235 +
236 +src_install() {
237 + emake DESTDIR="${D}" install
238 + insinto /etc/${PN}
239 + if use mbox; then
240 + newins "${FILESDIR}"/Muttrc.mbox Muttrc
241 + else
242 + doins "${FILESDIR}"/Muttrc
243 + fi
244 +
245 + # include attachment settings, it's mandatory and shouldn't harm
246 + # when not being referenced (index_format using %X)
247 + {
248 + echo
249 + echo "# mandatory attachments settings, not setting these is a BUG!"
250 + echo "# see https://marc.info/?l=mutt-dev&m=158347284923517&w=2"
251 + grep '^attachments' "${ED}"/etc/${PN}/Muttrc.dist
252 + } >> "${ED}"/etc/${PN}/Muttrc
253 +
254 + # add setting to actually enable gpgme usage
255 + if use gpgme || use autocrypt ; then
256 + {
257 + echo
258 + echo "# this setting enables the gpgme backend (via USE=gpgme)"
259 + # https is broken due to a certificate mismatch :(
260 + echo "# see http://www.mutt.org/doc/manual/#crypt-use-gpgme"
261 + echo "set crypt_use_gpgme = yes"
262 + } >> "${ED}"/etc/${PN}/Muttrc
263 + fi
264 +
265 + # similar for autocrypt
266 + if use autocrypt ; then
267 + {
268 + echo
269 + echo "# enables autocrypt (via USE=autocrypt)"
270 + echo "# see http://www.mutt.org/doc/manual/#autocryptdoc"
271 + echo "set autocrypt = yes"
272 + } >> "${ED}"/etc/${PN}/Muttrc
273 + fi
274 +
275 + # A newer file is provided by app-misc/mime-types. So we link it.
276 + rm "${ED}"/etc/${PN}/mime.types
277 + dosym ../mime.types /etc/${PN}/mime.types
278 +
279 + # nuke manpages that should be provided by an MTA, bug #177605
280 + rm "${ED}"/usr/share/man/man5/{mbox,mmdf}.5 \
281 + || ewarn "failed to remove files, please file a bug"
282 +
283 + if use !prefix ; then
284 + fowners root:mail /usr/bin/mutt_dotlock
285 + fperms g+s /usr/bin/mutt_dotlock
286 + fi
287 +
288 + dodoc COPYRIGHT ChangeLog NEWS OPS* PATCHES README* TODO VERSION
289 +}
290 +
291 +pkg_postinst() {
292 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
293 + echo
294 + elog "If you are new to mutt you may want to take a look at"
295 + elog "the Gentoo QuickStart Guide to Mutt E-Mail:"
296 + elog " https://wiki.gentoo.org/wiki/Mutt"
297 + echo
298 + fi
299 +}