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