Gentoo Archives: gentoo-dev

From: Nicolas Bock <nicolasbock@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] New package neomutt
Date: Mon, 18 Sep 2017 12:02:13
Message-Id: 20170918115843.lugsc7dtrjrn72by@rubberducky
In Reply to: Re: [gentoo-dev] New package neomutt by "Michał Górny"
1 On Thu, Aug 10, 2017 at 09:40:30AM +0200, Michał Górny wrote:
2 >On czw, 2017-08-10 at 06:58 +0200, Nicolas Bock wrote:
3 >> On Mon, Jul 31, 2017 at 09:11:19AM +0200, Nicolas Bock wrote:
4 >>> Hi,
5 >>>
6 >>> I would like to add neomutt to the tree. This new package is meant as
7 >>> an alternative and not a replacement of the existing mutt package.
8 >>
9 >> Thanks for all of the great suggestions and feedback!
10 >>
11 >> This is round two. I have update the ebuild with all your
12 >> suggestions. I have also added support for eselecting between mutt
13 >> and neomutt. Before the eselect ebuild can land though, we need to
14 >> rename the mutt binary so that the managed link can be called
15 >> mutt.
16 >
17 >What for? How many people are exactly in the dire need of having both
18 >installed simultaneously and switching between them? If you really can't
19 >learn to type the new command, add IUSE=symlink blocking original mutt
20 >and be done with it. Don't add more unowned files to /usr by another
21 >poorly written eselect module.
22
23 I changed the ebuild such that it can be installed together with
24 mutt without having to use symlinks or eselet.
25
26 >> # Copyright 1999-2017 Gentoo Foundation
27 >> # Distributed under the terms of the GNU General Public License v2
28 >>
29 >> EAPI=6
30 >>
31 >> inherit autotools eutils flag-o-matic
32 >>
33 >> if [[ ${PV} == 99999999 ]] ; then
34 >> # live ebuild
35 >> inherit git-r3
36 >> EGIT_REPO_URI="https://github.com/neomutt/neomutt.git"
37 >> EGIT_CHECKOUT_DIR="${WORKDIR}/neomutt-${P}"
38 >> KEYWORDS=""
39 >
40 >This is going to confuse the hell out of ekeyword.
41
42 I split the ebuild into two so that this conditional is unnecessary.
43
44 >> else
45 >> SRC_URI="https://github.com/${PN}/${PN}/archive/${P}.tar.gz"
46 >> KEYWORDS="~amd64 ~x86"
47 >> fi
48 >>
49 >> DESCRIPTION="Teaching an Old Dog New Tricks"
50 >
51 >This doesn't tell anybody who doesn't know mutt what this is.
52
53 Fixed, I reverted that change.
54
55 >> HOMEPAGE="https://www.neomutt.org/"
56 >>
57 >> LICENSE="GPL-2"
58 >> SLOT="0"
59 >> IUSE="berkdb crypt debug doc gdbm gnutls gpg idn kerberos libressl mbox
60 >> nls notmuch qdbm sasl selinux slang smime ssl tokyocabinet kyotocabinet
61 >> lmdb"
62 >
63 >Sort lexically.
64
65 Fixed.
66
67 >>
68 >> CDEPEND="
69 >> app-eselect/eselect-mutt
70 >> app-misc/mime-types
71 >> nls? ( virtual/libintl )
72 >> tokyocabinet? ( dev-db/tokyocabinet )
73 >> qdbm? ( dev-db/qdbm )
74 >> gdbm? ( sys-libs/gdbm )
75 >> berkdb? ( >=sys-libs/db-4:= )
76 >> kyotocabinet? ( dev-db/kyotocabinet )
77 >> lmdb? ( dev-db/lmdb )
78 >> gnutls? ( >=net-libs/gnutls-1.0.17 )
79 >> !gnutls? (
80 >> ssl? (
81 >> !libressl? ( >=dev-libs/openssl-0.9.6:0 )
82 >> libressl? ( dev-libs/libressl )
83 >> )
84 >> )
85 >
86 >This is not a correct use of 'ssl' flag:
87 >
88 > global:ssl: Add support for Secure Socket Layer connections
89 >
90 >It's supposed to go top-level, above any implementation flags.
91 >
92 >> sasl? ( >=dev-libs/cyrus-sasl-2 )
93 >> kerberos? ( virtual/krb5 )
94 >> idn? ( net-dns/libidn )
95 >> gpg? ( >=app-crypt/gpgme-0.9.0 )
96 >> smime? (
97 >> !libressl? ( >=dev-libs/openssl-0.9.6:0 )
98 >> libressl? ( dev-libs/libressl )
99 >
100 >What is the point of preferring gnutls when USE=smime pulls openssl
101 >anyway?
102 >
103 >> )
104 >> notmuch? ( net-mail/notmuch )
105 >> slang? ( sys-libs/slang )
106 >> !slang? ( >=sys-libs/ncurses-5.2:0 )
107 >
108 >Why not = slotop? ncurses definitely changed ABI in the past. It's
109 >something you are supposed to use when needed, not when repoman
110 >complains about it and you didn't accidentally workaround the check.
111
112 The current version of ncurses works, so I removed the version on it. I
113 also sorted the dependencies.
114
115 >Sorting this would also help reviews.
116 >
117 >> "
118 >> DEPEND="${CDEPEND}
119 >> net-mail/mailbase
120 >> doc? (
121 >> dev-libs/libxml2
122 >> dev-libs/libxslt
123 >> app-text/docbook-xsl-stylesheets
124 >> || ( www-client/lynx www-client/w3m www-client/elinks )
125 >> )"
126 >> RDEPEND="${CDEPEND}
127 >> selinux? ( sec-policy/selinux-mutt )
128 >> "
129 >>
130 >> S="${WORKDIR}/${PN}-${P}"
131 >>
132 >> src_prepare() {
133 >> eapply "${FILESDIR}/0001-Rename-mutt-to-neomutt.patch"
134 >> eapply_user
135 >> AT_M4DIR="m4" eautoreconf
136 >> }
137 >>
138 >> src_configure() {
139 >> local myconf=(
140 >> "$(use_enable crypt pgp)"
141 >> "$(use_enable debug)"
142 >> "$(use_enable doc)"
143 >> "$(use_enable gpg gpgme)"
144 >> "$(use_enable nls)"
145 >> "$(use_enable smime)"
146 >> "$(use_enable notmuch)"
147 >> "$(use_with idn)"
148 >> "$(use_with kerberos gss)"
149 >> "$(use_with sasl)"
150 >> "$(use_with tokyocabinet)"
151 >> "$(use_with kyotocabinet)"
152 >> "$(use_with qdbm)"
153 >> "$(use_with gdbm)"
154 >> "$(use_with berkdb bdb)"
155 >> "$(use_with lmdb)"
156 >> "--with-$(use slang && echo slang || echo curses)=${EPREFIX}/usr"
157 >
158 >usex
159
160 Fixed
161
162 >> "--sysconfdir=${EPREFIX}/etc/${PN}"
163 >
164 >I'd really prefer if you didn't abuse PN to construct paths, and make me
165 >wonder if upstream really wants 'neomutt' or 'mutt' here.
166
167 Up until now upstream was using `mutt` but there is work in progress to
168 rename it to `neomutt`. I think that there is a legitimate use case for
169 installing `mutt` and `neomutt` at the same time.
170
171 >> "--with-docdir=${EPREFIX}/usr/share/doc/${PN}-${PVR}"
172 >
173 >PF?
174
175 Fixed.
176
177 >> )
178 >>
179 >> if [[ ${CHOST} == *-solaris* ]] ; then
180 >> # arrows in index view do not show when using wchar_t
181 >> myconf+=( "--without-wc-funcs" )
182 >> fi
183 >
184 >Are you sure that this still applies?
185
186 No, and as I don't have access to such a machine I can't test it.
187
188 >>
189 >> # there's no need for gnutls, ssl or sasl without socket support
190 >
191 >What is this comment supposed to mean? Looks like copy-paste without
192 >even reading it.
193
194 This was a copy-and-paste leftover. I have removed it. I don't know what
195 it's supposed to mean either.
196
197 >> if use gnutls; then
198 >> myconf+=( "--with-gnutls" )
199 >> elif use ssl; then
200 >> myconf+=( "--with-ssl" )
201 >> fi
202 >>
203 >> if use mbox; then
204 >> myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" )
205 >> else
206 >> myconf+=( "--with-homespool=Maildir" )
207 >> fi
208 >
209 >Would configuring both paths do any harm? Maybe it'd make easier for
210 >user to switch without having to rebuild it.
211
212 Good point. I have removed the conditional. I also removed the default
213 configuration files.
214
215 >>
216 >> econf "${myconf[@]}"
217 >> }
218 >>
219 >> src_install() {
220 >> emake DESTDIR="${D}" install
221 >> if use mbox; then
222 >> insinto /etc/${PN}
223 >
224 >You can move the insinto above the 'if'.
225
226 I have removed this part.
227
228 >> newins "${FILESDIR}"/Muttrc.mbox Muttrc
229 >> else
230 >> insinto /etc/${PN}
231 >> doins "${FILESDIR}"/Muttrc
232 >> fi
233 >>
234 >> # A newer file is provided by app-misc/mime-types. So we link it.
235 >> rm "${ED}"/etc/${PN}/mime.types || die
236 >> dosym /etc/mime.types /etc/${PN}/mime.types
237 >
238 >Don't use absolute symlinks.
239
240 Fixed.
241
242 >>
243 >> # A man-page is always handy, so fake one
244 >> if use !doc; then
245 >> emake -C doc DESTDIR="${D}" muttrc.man
246 >
247 >Is DESTDIR really necessary here?
248
249 No, fixed.
250
251 >> # make the fake slightly better, bug #413405
252 >> sed -e 's#@docdir@/manual.txt#http://www.mutt.org/doc/manual/#' \
253 >> -e 's#in @docdir@,#at http://www.mutt.org/,#' \
254 >
255 >You sure you want to link to the original mutt.org?
256
257 True, I changed the link to point to neomutt.
258
259 >> -e "s#@sysconfdir@#${EPREFIX}/etc/${PN}#" \
260 >> -e "s#@bindir@#${EPREFIX}/usr/bin#" \
261 >> doc/mutt.man > neomutt.1 || die
262 >> cp doc/muttrc.man neomuttrc.5 || die
263 >> doman neomutt.1 neomuttrc.5
264 >> else
265 >> # nuke manpages that should be provided by an MTA, bug #177605
266 >> rm "${ED}"/usr/share/man/man5/{mbox,mmdf}.5 \
267 >> || ewarn "failed to remove files, please file a bug"
268 >
269 >die.
270
271 Fixed.
272
273 >> fi
274 >>
275 >> dodoc COPYRIGHT ChangeLog* OPS* README*
276 >> }
277
278 --
279 Nicolas Bock <nicolasbock@g.o>

Attachments

File name MIME type
signature.asc application/pgp-signature