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