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, 03 Nov 2019 10:21:31
Message-Id: 1572776480.f1e4c489f5cccac3303a9dab40b2be290a618fb2.grobian@gentoo
1 commit: f1e4c489f5cccac3303a9dab40b2be290a618fb2
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 3 10:20:58 2019 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 3 10:21:20 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1e4c489
7
8 mail-client/mutt-1.12.2-r2: revbump with USE-flag rename for bug 695078
9
10 Bug: https://bugs.gentoo.org/695078
11 Package-Manager: Portage-2.3.76, Repoman-2.3.16
12 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
13
14 mail-client/mutt/metadata.xml | 8 +-
15 mail-client/mutt/mutt-1.12.2-r2.ebuild | 272 +++++++++++++++++++++++++++++++++
16 2 files changed, 276 insertions(+), 4 deletions(-)
17
18 diff --git a/mail-client/mutt/metadata.xml b/mail-client/mutt/metadata.xml
19 index d3cb60f1c32..3c947815701 100644
20 --- a/mail-client/mutt/metadata.xml
21 +++ b/mail-client/mutt/metadata.xml
22 @@ -20,18 +20,18 @@
23 database backend for header caching</flag>
24 <flag name="pgp_classic">Build classic_pgp backend to support PGP/MIME
25 and traditional/inline PGP</flag>
26 + <flag name="pgp-classic">Build classic_pgp backend to support PGP/MIME
27 + and traditional/inline PGP</flag>
28 <flag name="gpg">Enable support for <pkg>app-crypt/gpgme</pkg></flag>
29 <flag name="gpgme">Build gpgme backend to support S/MIME, PGP/MIME and
30 traditional/inline PGP</flag>
31 <flag name="smime">Enable support for smime</flag>
32 <flag name="smime_classic">Build classic_smime backend to support
33 S/MIME</flag>
34 + <flag name="smime-classic">Build classic_smime backend to support
35 + S/MIME</flag>
36 </use>
37 <upstream>
38 - <!-- for releases before 1.9.2 -->
39 - <remote-id type="sourceforge">mutt</remote-id>
40 - <remote-id type="bitbucket">mutt/mutt</remote-id>
41 - <!-- from 1.9.2 onwards -->
42 <remote-id type="gitlab">muttmua/mutt</remote-id>
43 </upstream>
44 </pkgmetadata>
45
46 diff --git a/mail-client/mutt/mutt-1.12.2-r2.ebuild b/mail-client/mutt/mutt-1.12.2-r2.ebuild
47 new file mode 100644
48 index 00000000000..06de6bae9ad
49 --- /dev/null
50 +++ b/mail-client/mutt/mutt-1.12.2-r2.ebuild
51 @@ -0,0 +1,272 @@
52 +# Copyright 1999-2019 Gentoo Authors
53 +# Distributed under the terms of the GNU General Public License v2
54 +
55 +EAPI="6"
56 +
57 +inherit eutils flag-o-matic autotools
58 +
59 +PATCHREV="r1"
60 +PATCHSET="gentoo-${PVR}/${PATCHREV}"
61 +
62 +DESCRIPTION="A small but very powerful text-based mail client"
63 +HOMEPAGE="http://www.mutt.org/"
64 +MUTT_G_PATCHES="mutt-gentoo-${PV}-patches-${PATCHREV}.tar.xz"
65 +SRC_URI="ftp://ftp.mutt.org/pub/mutt/${P}.tar.gz
66 + https://bitbucket.org/${PN}/${PN}/downloads/${P}.tar.gz
67 + https://dev.gentoo.org/~grobian/distfiles/${MUTT_G_PATCHES}"
68 +IUSE="berkdb debug doc gdbm gnutls gpgme +hcache idn +imap kerberos libressl +lmdb mbox nls nntp notmuch pgp_classic pgp-classic pop qdbm +sasl selinux slang smime_classic smime-classic +smtp +ssl tokyocabinet vanilla prefix"
69 +# hcache: allow multiple, bug #607360
70 +REQUIRED_USE="
71 + hcache? ( || ( berkdb gdbm lmdb qdbm tokyocabinet ) )
72 + imap? ( ssl )
73 + pop? ( ssl )
74 + nntp? ( ssl )
75 + smime_classic? ( ssl !gnutls )
76 + smtp? ( ssl sasl )
77 + sasl? ( || ( imap pop smtp nntp ) )
78 + kerberos? ( || ( imap pop smtp nntp ) )
79 + vanilla? ( !nntp !notmuch )"
80 +SLOT="0"
81 +LICENSE="GPL-2"
82 +KEYWORDS="~alpha ~amd64 ~arm ~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"
83 +# yes, we overdepend on the backend impls here, hopefully one day we can
84 +# have REQUIRED_USE do what it is made for again. bug #607360
85 +CDEPEND="
86 + app-misc/mime-types
87 + virtual/libiconv
88 +
89 + berkdb? ( >=sys-libs/db-4:= )
90 + gdbm? ( sys-libs/gdbm )
91 + lmdb? ( dev-db/lmdb:= )
92 + qdbm? ( dev-db/qdbm )
93 + tokyocabinet? ( dev-db/tokyocabinet )
94 +
95 + ssl? (
96 + gnutls? ( >=net-libs/gnutls-1.0.17:= )
97 + !gnutls? (
98 + libressl? ( dev-libs/libressl:= )
99 + !libressl? ( >=dev-libs/openssl-0.9.6:0= )
100 + )
101 + )
102 +
103 + nls? ( virtual/libintl )
104 + sasl? ( >=dev-libs/cyrus-sasl-2 )
105 + kerberos? ( virtual/krb5 )
106 + idn? ( net-dns/libidn2 )
107 + gpgme? ( >=app-crypt/gpgme-0.9.0:= )
108 + notmuch? ( net-mail/notmuch:= )
109 + slang? ( sys-libs/slang )
110 + !slang? ( >=sys-libs/ncurses-5.2:0= )
111 +"
112 +DEPEND="${CDEPEND}
113 + net-mail/mailbase
114 + doc? (
115 + dev-libs/libxml2
116 + dev-libs/libxslt
117 + app-text/docbook-xsl-stylesheets
118 + || ( www-client/lynx www-client/w3m www-client/elinks )
119 + )"
120 +RDEPEND="${CDEPEND}
121 + selinux? ( sec-policy/selinux-mutt )
122 + smime_classic? ( || ( dev-libs/libressl >=dev-libs/openssl-0.9.6:0 ) )
123 + pgp_classic? ( app-crypt/gnupg )
124 +"
125 +
126 +src_prepare() {
127 + local PATCHDIR="${WORKDIR}"/mutt-gentoo-${PV}-patches-${PATCHREV}
128 +
129 + if use !vanilla ; then
130 + # apply patches
131 + export EPATCH_FORCE="yes"
132 + export EPATCH_SUFFIX="patch"
133 + # http://hg.code.sf.net/p/gentoomuttpatches/code/file/mutt-1.10
134 + local patches=(
135 + patches-mutt
136 + bugs-gentoo
137 + features-common
138 + features-extra
139 + gentoo
140 + )
141 + local patchset
142 + for patchset in "${patches[@]}" ; do
143 + [[ -d "${PATCHDIR}/${patchset}" ]] || continue
144 + einfo "Patches for ${PATCHSET} patchset ${patchset}"
145 + EPATCH_SOURCE="${PATCHDIR}"/${patchset} epatch \
146 + || die "patchset ${patchset} failed"
147 + done
148 + # add some explanation as to why not to go upstream
149 + sed -i \
150 + -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\\' \
151 + main.c || die "Failed to add bug instructions"
152 + fi
153 +
154 + local upatches=
155 + # allow user patches
156 + eapply_user && upatches=" with user patches"
157 +
158 + # patch version string for bug reports
159 + local patchset=
160 + use vanilla || patchset=", ${PATCHSET}"
161 + sed -i -e 's|"Mutt %s (%s)"|"Mutt %s (%s'"${patchset}${upatches}"')"|' \
162 + muttlib.c || die "failed patching in Gentoo version"
163 +
164 + # many patches touch the buildsystem, we always need this
165 + AT_M4DIR="m4" eautoreconf
166 +
167 + # the configure script contains some "cleverness" whether or not to setgid
168 + # the dotlock program, resulting in bugs like #278332
169 + sed -i -e 's/@DOTLOCK_GROUP@//' Makefile.in || die "sed failed"
170 +}
171 +
172 +src_configure() {
173 + local myconf=(
174 + # signing and encryption
175 + # clumpsy blocks for transition period of USE-flag renames
176 + $(use pgp_classic && use_enable pgp_classic pgp)
177 + $(use pgp-classic && use_enable pgp-classic pgp)
178 + $(use !pgp_classic && use !pgp-classic && echo "--disable-pgp")
179 +
180 + $(use smime_classic && use_enable smime_classic smime)
181 + $(use smime-classic && use_enable smime-classic smime)
182 + $(use !smime_classic && use !smime-classic && echo "--disable-smime")
183 +
184 + $(use_enable gpgme)
185 +
186 + # features
187 + $(use_enable debug)
188 + $(use_enable doc)
189 + $(use_enable nls)
190 + $(use_enable notmuch)
191 +
192 + # protocols
193 + $(use_enable imap)
194 + $(use_enable pop)
195 + $(use_enable nntp)
196 + $(use_enable smtp)
197 +
198 + $(use ssl && use gnutls && echo --with-gnutls --without-ssl)
199 + $(use ssl && use !gnutls && echo --without-gnutls --with-ssl )
200 + $(use !ssl && echo --without-gnutls --without-ssl)
201 +
202 + $(use_with sasl)
203 + $(use_with idn idn2) --without-idn # avoid automagic libidn dep
204 + $(use_with kerberos gss)
205 + "$(use slang && echo --with-slang="${EPREFIX}"/usr || echo a=b)"
206 + "$(use_with !slang curses "${EPREFIX}"/usr)"
207 +
208 + "--enable-compressed"
209 + "--enable-external-dotlock"
210 + "--enable-iconv"
211 + "--enable-nfs-fix"
212 + "--enable-sidebar"
213 + "--sysconfdir=${EPREFIX}/etc/${PN}"
214 + "--with-docdir=${EPREFIX}/usr/share/doc/${PN}-${PVR}"
215 + "--with-regex"
216 + "--with-exec-shell=${EPREFIX}/bin/sh"
217 + )
218 +
219 + if [[ ${CHOST} == *-solaris2.* && ${CHOST#*-solaris2.} -le 10 ]] ; then
220 + # arrows in index view do not show when using wchar_t
221 + # or misalign due to wrong computations
222 + myconf+=( "--without-wc-funcs" )
223 + fi
224 +
225 + # note: REQUIRED_USE should have selected only one of these, but for
226 + # bug #607360 we're forced to allow multiple. For that reason, this
227 + # list is ordered to preference, and only the first is taken.
228 + local hcaches=(
229 + "lmdb"
230 + "qdbm"
231 + "tokyocabinet"
232 + "gdbm"
233 + "berkdb:bdb"
234 + )
235 + local ucache hcache lcache
236 + for hcache in "${hcaches[@]}" ; do
237 + if use ${hcache%%:*} ; then
238 + ucache=${hcache}
239 + break
240 + fi
241 + done
242 + if [[ -n ${ucache} ]] ; then
243 + myconf+=( "--enable-hcache" )
244 + else
245 + myconf+=( "--disable-hcache" )
246 + fi
247 + for hcache in "${hcaches[@]}" ; do
248 + [[ ${hcache} == ${ucache} ]] \
249 + && myconf+=( "--with-${hcache#*:}" ) \
250 + || myconf+=( "--without-${hcache#*:}" )
251 + done
252 +
253 + if use mbox; then
254 + myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" )
255 + else
256 + myconf+=( "--with-homespool=Maildir" )
257 + fi
258 +
259 + econf "${myconf[@]}" || die "configure failed"
260 +}
261 +
262 +src_install() {
263 + emake DESTDIR="${D}" install || die "install failed"
264 + if use mbox; then
265 + insinto /etc/mutt
266 + newins "${FILESDIR}"/Muttrc.mbox Muttrc
267 + else
268 + insinto /etc/mutt
269 + doins "${FILESDIR}"/Muttrc
270 + fi
271 +
272 + # A newer file is provided by app-misc/mime-types. So we link it.
273 + rm "${ED}"/etc/${PN}/mime.types
274 + dosym "${EPREFIX}"/etc/mime.types /etc/${PN}/mime.types
275 +
276 + # A man-page is always handy, so fake one
277 + if use !doc; then
278 + emake -C doc DESTDIR="${D}" muttrc.man || die
279 + # make the fake slightly better, bug #413405
280 + sed -e 's#@docdir@/manual.txt#http://www.mutt.org/doc/devel/manual.html#' \
281 + -e 's#in @docdir@,#at http://www.mutt.org/,#' \
282 + -e "s#@sysconfdir@#${EPREFIX}/etc/${PN}#" \
283 + -e "s#@bindir@#${EPREFIX}/usr/bin#" \
284 + doc/mutt.man > mutt.1 || die
285 + cp doc/muttrc.man muttrc.5 || die
286 + doman mutt.1 muttrc.5
287 + else
288 + # nuke manpages that should be provided by an MTA, bug #177605
289 + rm "${ED}"/usr/share/man/man5/{mbox,mmdf}.5 \
290 + || ewarn "failed to remove files, please file a bug"
291 + fi
292 +
293 + if use !prefix ; then
294 + fowners root:mail /usr/bin/mutt_dotlock
295 + fperms g+s /usr/bin/mutt_dotlock
296 + fi
297 +
298 + dodoc BEWARE COPYRIGHT ChangeLog NEWS OPS* PATCHES README* TODO VERSION
299 +}
300 +
301 +pkg_postinst() {
302 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
303 + echo
304 + elog "If you are new to mutt you may want to take a look at"
305 + elog "the Gentoo QuickStart Guide to Mutt E-Mail:"
306 + elog " https://wiki.gentoo.org/wiki/Mutt"
307 + echo
308 + fi
309 + if use gpg_classic || use smime_classic ; then
310 + ewarn "Please note that crypto related USE-flags of mutt have changed."
311 + ewarn "To compile to PMS, the following USE-flags are renamed:"
312 + ewarn "(see https://bugs.gentoo.org/695078)"
313 + ewarn " pgp_classic -> pgp-classic"
314 + ewarn " smime_classic -> smime-classic"
315 + ewarn "The old USE flags still work but their use is deprecated and will"
316 + ewarn "be removed in a future release. Please update your package.use"
317 + fi
318 + if use gpgme ; then
319 + ewarn "Note: in order for Mutt to actually use the gpgme backend"
320 + ewarn " you MUST include 'set crypt_use_gpgme=yes' in .muttrc"
321 + ewarn " https://dev.mutt.org/doc/manual.html#crypt-use-gpgme"
322 + fi
323 +}