1 |
commit: 5e265343ded309ffcfef1f6d3a0f511668053b78 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 23 12:55:05 2019 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 23 12:55:05 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e265343 |
7 |
|
8 |
mail-client/s-nail: Version bump for 14.9.15 |
9 |
|
10 |
Package-Manager: Portage-2.3.72, Repoman-2.3.17 |
11 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
12 |
|
13 |
mail-client/s-nail/Manifest | 1 + |
14 |
.../s-nail/files/s-nail-14.9.15-havenet.patch | 205 +++++++++++++++++++++ |
15 |
mail-client/s-nail/s-nail-14.9.15.ebuild | 94 ++++++++++ |
16 |
3 files changed, 300 insertions(+) |
17 |
|
18 |
diff --git a/mail-client/s-nail/Manifest b/mail-client/s-nail/Manifest |
19 |
index 1a48213f110..91c6b34decd 100644 |
20 |
--- a/mail-client/s-nail/Manifest |
21 |
+++ b/mail-client/s-nail/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST s-nail-14.9.13.tar.xz 734416 BLAKE2B b23de9c32357d5b88ecb723dc875d3366b2b4c57dd654a4f2422e8bb81b781a76568eb0955990d4166f034bf40459fa5d2992da6e7f2b403a641a4d4c0c1e200 SHA512 6467846fab5752c708886ba7a66cd2038effc0cf8d72e2feb670283cf1d5436c27037087eeaa201c074964476ff0c213cffe74169fb03089ebf964fcc766e6ea |
24 |
+DIST s-nail-14.9.15.tar.xz 757180 BLAKE2B 9d3efe43e6f1f4486bb66bb0060a6b656097c4b6d95e5f22e209e7464bd92bc9cf42a36009d674a3ee032ab32f64ecef2aa0cc1b09519a7760bf5d1145e35c5d SHA512 ca95c544890a13b475fb12f882a172942f29517319956eccab1fbc2a67625fe53e3f0cc10c31daac98e28bb1fae48364d80db9ec35f0e6cc71d748290a2635df |
25 |
|
26 |
diff --git a/mail-client/s-nail/files/s-nail-14.9.15-havenet.patch b/mail-client/s-nail/files/s-nail-14.9.15-havenet.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..386e03e174d |
29 |
--- /dev/null |
30 |
+++ b/mail-client/s-nail/files/s-nail-14.9.15-havenet.patch |
31 |
@@ -0,0 +1,205 @@ |
32 |
+diff --git a/THANKS b/THANKS |
33 |
+index 9613133d..1d4dfd0d 100644 |
34 |
+--- a/THANKS |
35 |
++++ b/THANKS |
36 |
+@@ -43,6 +43,7 @@ Erich Eckner erich dot eckner at gmx dot de |
37 |
+ Paul Eggert eggert at cs dot ucla dot edu |
38 |
+ Justin Ellingwood JustinEllingwood at gmail dot com |
39 |
+ Robert Elz kre at munnari dot OZ dot AU |
40 |
++Brian Evans grknight at gentoo dot org |
41 |
+ Rich Felker dalias at libc dot org |
42 |
+ Dr. Werner Fink werner at suse dot de |
43 |
+ Felix Fontein felix at fontein dot de |
44 |
+diff --git a/mx-test.sh b/mx-test.sh |
45 |
+index 4a60a1b0..201b00e7 100755 |
46 |
+--- a/mx-test.sh |
47 |
++++ b/mx-test.sh |
48 |
+@@ -5442,12 +5442,17 @@ t_mta_aliases() { |
49 |
+ ## xxx The following are actually *expandaddr* tests!! |
50 |
+ |
51 |
+ # May not send plain names over SMTP! |
52 |
+- echo | ${MAILX} ${ARGS} -Smta=smtp://laber.backe \ |
53 |
+- -Smta-aliases=./.tali \ |
54 |
+- -b a3 -c a2 a1 > ./.tall 2>&1 |
55 |
+- check_exn0 3 |
56 |
+- check 4 - "${MBOX}" '1172368381 238' |
57 |
+- if have_feat uistrings; then |
58 |
++ mtaali= |
59 |
++ if have_feat smtp; then |
60 |
++ echo | ${MAILX} ${ARGS} \ |
61 |
++ -Smta=smtp://laber.backe -Ssmtp-auth=none \ |
62 |
++ -Smta-aliases=./.tali \ |
63 |
++ -b a3 -c a2 a1 > ./.tall 2>&1 |
64 |
++ check_exn0 3 |
65 |
++ check 4 - "${MBOX}" '1172368381 238' |
66 |
++ mtaali=1 |
67 |
++ fi |
68 |
++ if [ -n "${mtaali}" ] && have_feat uistrings; then |
69 |
+ check 5 - .tall '771616226 179' |
70 |
+ else |
71 |
+ t_echoskip '5:[test unsupported]' |
72 |
+diff --git a/src/mx/cmd-resend.c b/src/mx/cmd-resend.c |
73 |
+index 488c9b78..31f20609 100644 |
74 |
+--- a/src/mx/cmd-resend.c |
75 |
++++ b/src/mx/cmd-resend.c |
76 |
+@@ -723,7 +723,11 @@ jleave: |
77 |
+ |
78 |
+ static int |
79 |
+ a_crese_resend1(void *vp, boole add_resent){ |
80 |
+- struct mx_url url; |
81 |
++#ifdef mx_HAVE_NET |
82 |
++ struct mx_url url, *urlp = &url; |
83 |
++#else |
84 |
++ struct mx_url *urlp = NIL; |
85 |
++#endif |
86 |
+ struct header head; |
87 |
+ struct mx_name *myto, *myrawto; |
88 |
+ boole mta_isexe; |
89 |
+@@ -747,7 +751,7 @@ jedar: |
90 |
+ goto jleave; |
91 |
+ } |
92 |
+ |
93 |
+- if(!(mta_isexe = mx_sendout_mta_url(&url))) |
94 |
++ if(!(mta_isexe = mx_sendout_mta_url(urlp))) |
95 |
+ goto jleave; |
96 |
+ mta_isexe = (mta_isexe != TRU1); |
97 |
+ |
98 |
+@@ -794,7 +798,7 @@ jedar: |
99 |
+ head.h_mailx_orig_cc = lextract(hfield1("cc", mp), GCC | gf); |
100 |
+ head.h_mailx_orig_bcc = lextract(hfield1("bcc", mp), GBCC | gf); |
101 |
+ |
102 |
+- if(n_resend_msg(mp, (mta_isexe ? NIL : &url), &head, add_resent |
103 |
++ if(n_resend_msg(mp, (mta_isexe ? NIL : urlp), &head, add_resent |
104 |
+ ) != OKAY){ |
105 |
+ /* n_autorec_relax_gut(); XXX but is handled automatically? */ |
106 |
+ goto jleave; |
107 |
+diff --git a/src/mx/sendout.c b/src/mx/sendout.c |
108 |
+index 2b0e8bf0..c4f373c1 100644 |
109 |
+--- a/src/mx/sendout.c |
110 |
++++ b/src/mx/sendout.c |
111 |
+@@ -2060,9 +2060,13 @@ FL enum okay |
112 |
+ n_mail1(enum n_mailsend_flags msf, struct header *hp, struct message *quote, |
113 |
+ char const *quotefile) |
114 |
+ { |
115 |
+- struct n_sigman sm; |
116 |
++#ifdef mx_HAVE_NET |
117 |
+ struct mx_cred_ctx cc; |
118 |
+- struct mx_url url; |
119 |
++ struct mx_url url, *urlp = &url; |
120 |
++#else |
121 |
++ struct mx_url *urlp = NIL; |
122 |
++#endif |
123 |
++ struct n_sigman sm; |
124 |
+ struct sendbundle sb; |
125 |
+ struct mx_name *to; |
126 |
+ boole dosign, mta_isexe; |
127 |
+@@ -2121,7 +2125,7 @@ n_mail1(enum n_mailsend_flags msf, struct header *hp, struct message *quote, |
128 |
+ #ifndef mx_HAVE_SMIME |
129 |
+ if (dosign) { |
130 |
+ n_err(_("No S/MIME support compiled in\n")); |
131 |
+- goto jleave; |
132 |
++ goto jfail_dead; |
133 |
+ } |
134 |
+ #endif |
135 |
+ |
136 |
+@@ -2139,8 +2143,8 @@ n_mail1(enum n_mailsend_flags msf, struct header *hp, struct message *quote, |
137 |
+ * TODO header fields ONCE, call that ONCE after user editing etc. has |
138 |
+ * TODO completed (one edit cycle) */ |
139 |
+ |
140 |
+- if(!(mta_isexe = mx_sendout_mta_url(&url))) |
141 |
+- goto jleave; |
142 |
++ if(!(mta_isexe = mx_sendout_mta_url(urlp))) |
143 |
++ goto jfail_dead; |
144 |
+ mta_isexe = (mta_isexe != TRU1); |
145 |
+ |
146 |
+ /* Take the user names from the combined to and cc lists and do all the |
147 |
+@@ -2174,8 +2178,10 @@ n_mail1(enum n_mailsend_flags msf, struct header *hp, struct message *quote, |
148 |
+ sb.sb_hp = hp; |
149 |
+ sb.sb_to = to; |
150 |
+ sb.sb_input = mtf; |
151 |
+- sb.sb_urlp = mta_isexe ? NIL : &url; |
152 |
++ sb.sb_urlp = mta_isexe ? NIL : urlp; |
153 |
++#ifdef mx_HAVE_NET |
154 |
+ sb.sb_credp = &cc; |
155 |
++#endif |
156 |
+ |
157 |
+ if((dosign || count_nonlocal(to) > 0) && |
158 |
+ !_sendbundle_setup_creds(&sb, (dosign > 0))){ |
159 |
+@@ -2728,8 +2734,10 @@ FL enum okay |
160 |
+ n_resend_msg(struct message *mp, struct mx_url *urlp, struct header *hp, |
161 |
+ boole add_resent) |
162 |
+ { |
163 |
+- struct n_sigman sm; |
164 |
++#ifdef mx_HAVE_NET |
165 |
+ struct mx_cred_ctx cc; |
166 |
++#endif |
167 |
++ struct n_sigman sm; |
168 |
+ struct sendbundle sb; |
169 |
+ FILE * volatile ibuf, *nfo, * volatile nfi; |
170 |
+ struct mx_fs_tmp_ctx *fstcp; |
171 |
+@@ -2794,7 +2802,9 @@ n_resend_msg(struct message *mp, struct mx_url *urlp, struct header *hp, |
172 |
+ sb.sb_to = to; |
173 |
+ sb.sb_input = nfi; |
174 |
+ sb.sb_urlp = urlp; |
175 |
++#ifdef mx_HAVE_NET |
176 |
+ sb.sb_credp = &cc; |
177 |
++#endif |
178 |
+ |
179 |
+ if(!_sendout_error && |
180 |
+ count_nonlocal(to) > 0 && !_sendbundle_setup_creds(&sb, FAL0)){ |
181 |
+diff --git a/src/mx/url.c b/src/mx/url.c |
182 |
+index 574e7c56..4bd55fb5 100644 |
183 |
+--- a/src/mx/url.c |
184 |
++++ b/src/mx/url.c |
185 |
+@@ -321,29 +321,33 @@ mx_url_parse(struct mx_url *urlp, enum cproto cproto, char const *data){ |
186 |
+ |
187 |
+ rv = FAL0; |
188 |
+ |
189 |
++#ifdef mx_HAVE_TLS |
190 |
++# define a_OUCH 0 |
191 |
++#else |
192 |
++# define a_OUCH 1 |
193 |
++#endif |
194 |
++ |
195 |
+ /* Network protocol */ |
196 |
+ #define a_PROTOX(X,Y,Z) \ |
197 |
+ urlp->url_portno = Y;\ |
198 |
+ su_mem_copy(urlp->url_proto, X "://\0", sizeof(X "://\0"));\ |
199 |
+ urlp->url_proto[sizeof(X) -1] = '\0';\ |
200 |
+ urlp->url_proto_len = sizeof(X) -1;\ |
201 |
+- do{ Z; }while(0) |
202 |
++ if(a_OUCH){ Z; } |
203 |
+ #define a_PRIVPROTOX(X,Y,Z) \ |
204 |
+ do{ a_PROTOX(X, Y, Z); }while(0) |
205 |
+-#define a__IF(X,Y,Z) \ |
206 |
++ |
207 |
++#define a__IF(T,X,Y,Z) \ |
208 |
+ if(!su_cs_cmp_case_n(data, X "://", sizeof(X "://") -1)){\ |
209 |
++ if(a_OUCH && T)\ |
210 |
++ goto jeproto;\ |
211 |
+ a_PROTOX(X, Y, Z);\ |
212 |
+ data += sizeof(X "://") -1;\ |
213 |
+ goto juser;\ |
214 |
+ } |
215 |
+-#define a_IF(X,Y) a__IF(X, Y, (void)0) |
216 |
+-#ifdef mx_HAVE_TLS |
217 |
+-# define a_IFS(X,Y) a__IF(X, Y, urlp->url_flags |= mx_URL_TLS_REQUIRED) |
218 |
+-# define a_IFs(X,Y) a__IF(X, Y, urlp->url_flags |= mx_URL_TLS_OPTIONAL) |
219 |
+-#else |
220 |
+-# define a_IFS(X,Y) goto jeproto; |
221 |
+-# define a_IFs(X,Y) a_IF(X, Y) |
222 |
+-#endif |
223 |
++#define a_IF(X,Y) a__IF(0, X, Y, (void)0) |
224 |
++#define a_IFS(X,Y) a__IF(1, X, Y, urlp->url_flags |= mx_URL_TLS_REQUIRED) |
225 |
++#define a_IFs(X,Y) a__IF(0, X, Y, urlp->url_flags |= mx_URL_TLS_OPTIONAL) |
226 |
+ |
227 |
+ switch(cproto){ |
228 |
+ case CPROTO_CERTINFO: |
229 |
+@@ -413,6 +417,7 @@ mx_url_parse(struct mx_url *urlp, enum cproto cproto, char const *data){ |
230 |
+ #endif |
231 |
+ } |
232 |
+ |
233 |
++#undef a_OUCH |
234 |
+ #undef a_PRIVPROTOX |
235 |
+ #undef a_PROTOX |
236 |
+ #undef a__IF |
237 |
|
238 |
diff --git a/mail-client/s-nail/s-nail-14.9.15.ebuild b/mail-client/s-nail/s-nail-14.9.15.ebuild |
239 |
new file mode 100644 |
240 |
index 00000000000..7ca0db136c2 |
241 |
--- /dev/null |
242 |
+++ b/mail-client/s-nail/s-nail-14.9.15.ebuild |
243 |
@@ -0,0 +1,94 @@ |
244 |
+# Copyright 1999-2019 Gentoo Authors |
245 |
+# Distributed under the terms of the GNU General Public License v2 |
246 |
+ |
247 |
+EAPI=7 |
248 |
+ |
249 |
+inherit toolchain-funcs |
250 |
+ |
251 |
+HOMEPAGE="https://www.sdaoden.eu/code.html" |
252 |
+DESCRIPTION="Enhanced mailx-compatible mail client based on Hierloom mailx (nail)" |
253 |
+LICENSE="BSD BSD-4 ISC RSA" |
254 |
+ |
255 |
+SRC_URI="https://ftp.sdaoden.eu/${P}.tar.xz" |
256 |
+SLOT="0" |
257 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
258 |
+IUSE="idn kerberos libressl net ssl" |
259 |
+ |
260 |
+RDEPEND=" |
261 |
+ sys-libs/ncurses:0= |
262 |
+ virtual/libiconv |
263 |
+ idn? ( net-dns/libidn2 ) |
264 |
+ net? ( |
265 |
+ ssl? ( |
266 |
+ !libressl? ( dev-libs/openssl:0 ) |
267 |
+ libressl? ( dev-libs/libressl ) |
268 |
+ ) |
269 |
+ kerberos? ( virtual/krb5 ) |
270 |
+ ) |
271 |
+ !mail-client/mailx |
272 |
+ !net-mail/mailutils |
273 |
+ !mail-client/nail |
274 |
+" |
275 |
+DEPEND="${RDEPEND}" |
276 |
+BDEPEND="virtual/awk" |
277 |
+ |
278 |
+PATCHES=( "${FILESDIR}/s-nail-14.9.15-havenet.patch" ) |
279 |
+ |
280 |
+src_configure() { |
281 |
+ local confopts=( |
282 |
+ CC=$(tc-getCC) |
283 |
+ EXTRA_CFLAGS=-std=c99 |
284 |
+ strip=/bin/true |
285 |
+ OPT_AUTOCC=no |
286 |
+ VAL_PREFIX="${EPREFIX}"/usr |
287 |
+ VAL_SYSCONFDIR="${EPREFIX}"/etc |
288 |
+ VAL_MTA="${EPREFIX}/usr/sbin/sendmail" |
289 |
+ VAL_MAIL='/var/spool/mail' |
290 |
+ VAL_PAGER=less |
291 |
+ $(usex idn VAL_IDNA=idn2 OPT_IDNA=no) |
292 |
+ VERBOSE=1 |
293 |
+ ) |
294 |
+ |
295 |
+ if use net; then |
296 |
+ confopts+=( OPT_TLS=$(usex ssl require no) |
297 |
+ OPT_GSSAPI=$(usex kerberos require no) |
298 |
+ ) |
299 |
+ else |
300 |
+ confopts+=( OPT_NET=no ) |
301 |
+ fi |
302 |
+ |
303 |
+ tc-is-cross-compiler && confopts+=( OPT_CROSS_BUILD=yes ) |
304 |
+ |
305 |
+ emake "${confopts[@]}" config |
306 |
+} |
307 |
+ |
308 |
+src_compile() { |
309 |
+ emake build |
310 |
+} |
311 |
+ |
312 |
+src_install () { |
313 |
+ # Use /usr/sbin/sendmail by default and provide an example |
314 |
+ cat <<- EOSMTP >> nail.rc |
315 |
+ |
316 |
+ # Use the local sendmail (/usr/sbin/sendmail) binary by default. |
317 |
+ # (Uncomment the following line to use a SMTP server) |
318 |
+ #set smtp=localhost |
319 |
+ |
320 |
+ # Ask for CC: list too. |
321 |
+ set askcc |
322 |
+ EOSMTP |
323 |
+ |
324 |
+ emake DESTDIR="${D}" install |
325 |
+ |
326 |
+ dodoc INSTALL NEWS README THANKS |
327 |
+ |
328 |
+ dodir /bin |
329 |
+ dosym ../usr/bin/mailx /bin/mail |
330 |
+ dosym s-nail /usr/bin/mailx |
331 |
+ dosym mailx /usr/bin/mail |
332 |
+ dosym mailx /usr/bin/Mail |
333 |
+ |
334 |
+ dosym s-nail.1 /usr/share/man/man1/mailx.1 |
335 |
+ dosym mailx.1 /usr/share/man/man1/mail.1 |
336 |
+ dosym mailx.1 /usr/share/man/man1/Mail.1 |
337 |
+} |