Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-client/balsa/files/, mail-client/balsa/
Date: Sun, 15 Jul 2018 15:20:19
Message-Id: 1531667948.650afd4647ec44b71457fa836c555f30ede718e9.leio@gentoo
1 commit: 650afd4647ec44b71457fa836c555f30ede718e9
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 15 15:06:35 2018 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 15 15:19:08 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=650afd46
7
8 mail-client/balsa: bump to 2.5.6, includes EFAIL security fixes
9
10 *html2text is actually a runtime dependency in the webkit-gtk code paths,
11 not buildtime for all USE.
12 * Add glib-compile-resources deps (libxml2).
13 * New gnutls dep.
14 * libesmtp usage removed.
15 * Custom icon cache in /usr/share/balsa, needing gtk-update-icon-cache
16 during compile phase.
17 * src_prepare modifications are all obsolete (upstream bugs fixed).
18 * Include patches to hopefully keep USE=webkit working with older webkit-gtk.
19
20 Closes: https://bugs.gentoo.org/660322
21 Package-Manager: Portage-2.3.40, Repoman-2.3.9
22
23 mail-client/balsa/Manifest | 1 +
24 mail-client/balsa/balsa-2.5.6.ebuild | 71 ++++++++++
25 .../files/balsa-2.5.6-fix-older-webkit1.patch | 156 +++++++++++++++++++++
26 .../files/balsa-2.5.6-fix-older-webkit2.patch | 53 +++++++
27 4 files changed, 281 insertions(+)
28
29 diff --git a/mail-client/balsa/Manifest b/mail-client/balsa/Manifest
30 index 69e6da98843..59ff6ac5c97 100644
31 --- a/mail-client/balsa/Manifest
32 +++ b/mail-client/balsa/Manifest
33 @@ -1,2 +1,3 @@
34 DIST balsa-2.5.2.tar.bz2 4049163 BLAKE2B 7435c7831d528b3ab6d2783211023e3686e94b266ed0804ecb2d9605add6c3826b029c679d137bb3e176b112b11bc68a7e9fd828bc18c2e5c5636b8ef8ec85e4 SHA512 f7a9127d87869d57acebaf33f9e3e4b82c5a5ba90aa5304ce40ba48a1a7f01eaf602555f8e97bce70b0baeb2ac8b5ac12941eaa8b85be1886bf22f7767dd75ba
35 DIST balsa-2.5.3.tar.bz2 4333815 BLAKE2B ba8715108cf1122152c069130911275175d5c45ca12e85f1165cb7e86680015d6effd1ea5aaaebd5b154f67fc13002bd26ad0f0d7942253b2483896dd28a50fd SHA512 34e69be050f6c502fa6651029b7d93bf9b7842bbe8489669924563c086def4dbe72109ba5244e0cacf3ef69d3d9d8c5679f870acf564b5551920fa77012e1ff8
36 +DIST balsa-2.5.6.tar.bz2 4468877 BLAKE2B 1e7f678c69121fe3472bbba8dc3d2a62680e1969934580a8a85725e84676531f1efb8432380c2d537ca584001c5cecd5c76cd033a1c1e68a292fc765bbc15f8d SHA512 a9c8094ac48b9b1a0971fe45a4658b728f93ad170ad7884c9554420a4696a7b6f5b3661bde8ab070f6a5c14a80f67551745e1d40905881429ae1d8e5874e9a68
37
38 diff --git a/mail-client/balsa/balsa-2.5.6.ebuild b/mail-client/balsa/balsa-2.5.6.ebuild
39 new file mode 100644
40 index 00000000000..670125794ee
41 --- /dev/null
42 +++ b/mail-client/balsa/balsa-2.5.6.ebuild
43 @@ -0,0 +1,71 @@
44 +# Copyright 1999-2018 Gentoo Foundation
45 +# Distributed under the terms of the GNU General Public License v2
46 +
47 +EAPI=6
48 +inherit gnome2
49 +
50 +DESCRIPTION="Email client for GNOME"
51 +HOMEPAGE="http://pawsa.fedorapeople.org/balsa/"
52 +SRC_URI="http://pawsa.fedorapeople.org/${PN}/${P}.tar.bz2"
53 +
54 +LICENSE="GPL-2"
55 +SLOT="0"
56 +KEYWORDS="~amd64 ~ppc ~sparc ~x86"
57 +
58 +IUSE="crypt gnome gnome-keyring kerberos ldap libnotify libressl rubrica sqlite webkit xface"
59 +
60 +# TODO: internal spell checking via enchant-2 instead of gtkspell/gspell?
61 +RDEPEND="
62 + >=app-text/gspell-1.2:0=
63 + >=dev-libs/glib-2.40.0:2
64 + net-libs/gnutls:=
65 + >=x11-libs/gtk+-3.10.0:3
66 + dev-libs/gmime:2.6
67 + net-mail/mailbase
68 + media-libs/libcanberra:=[gtk3]
69 + x11-themes/hicolor-icon-theme
70 + x11-themes/adwaita-icon-theme
71 + crypt? ( >=app-crypt/gpgme-1.5.0:= )
72 + gnome? ( >=x11-libs/gtksourceview-3.2.0:3.0 )
73 + gnome-keyring? ( app-crypt/libsecret )
74 + sqlite? ( >=dev-db/sqlite-2.8:= )
75 + libnotify? ( >=x11-libs/libnotify-0.7:= )
76 + !libressl? ( dev-libs/openssl:0= )
77 + libressl? ( dev-libs/libressl:0= )
78 + kerberos? ( app-crypt/mit-krb5 )
79 + ldap? ( net-nds/openldap )
80 + rubrica? ( dev-libs/libxml2:2 )
81 + webkit? (
82 + net-libs/webkit-gtk:4
83 + dev-python/html2text
84 + )
85 + xface? ( >=media-libs/compface-1.5.1:= )
86 +"
87 +DEPEND="${RDEPEND}
88 + dev-util/gtk-update-icon-cache
89 + app-text/yelp-tools
90 + dev-util/intltool
91 + virtual/pkgconfig
92 + sys-devel/gettext
93 + dev-libs/libxml2:2
94 +"
95 +
96 +PATCHES=( "$FILESDIR"/${P}-fix-older-webkit{1,2}.patch )
97 +DOCS="AUTHORS ChangeLog HACKING NEWS README TODO docs/*"
98 +
99 +src_configure() {
100 + gnome2_src_configure \
101 + --with-canberra \
102 + --with-spell-checker=gspell \
103 + $(usex crypt --with-gpgme=gpgme-config --without-gpgme) \
104 + $(use_with gnome) \
105 + $(use_with gnome gtksourceview) \
106 + $(use_with gnome-keyring libsecret) \
107 + $(use_with kerberos gss) \
108 + $(use_with ldap) \
109 + $(use_with libnotify) \
110 + $(use_with rubrica) \
111 + $(use_with sqlite) \
112 + $(use_with xface compface) \
113 + $(usex webkit --with-html-widget=webkit2 --with-html-widget=no)
114 +}
115
116 diff --git a/mail-client/balsa/files/balsa-2.5.6-fix-older-webkit1.patch b/mail-client/balsa/files/balsa-2.5.6-fix-older-webkit1.patch
117 new file mode 100644
118 index 00000000000..227e2ac04b4
119 --- /dev/null
120 +++ b/mail-client/balsa/files/balsa-2.5.6-fix-older-webkit1.patch
121 @@ -0,0 +1,156 @@
122 +From ea37ea940dfbcc4e6bcf8327194857a7b306a278 Mon Sep 17 00:00:00 2001
123 +From: Peter Bloomfield
124 +Date: Sat, 7 Jul 2018 14:44:26 -0400
125 +Subject: [PATCH] Use g_debug() instead of conditional compilation
126 +
127 +* libbalsa/html.c (lbh_navigation_policy_decision),
128 + (lbh_new_window_policy_decision), (lbh_response_policy_decision),
129 + (lbh_resource_notify_response_cb), (lbh_web_process_crashed_cb),
130 + (lbh_cid_cb), (libbalsa_html_new): Use g_debug() instead of
131 + conditionally compiled printing.
132 +---
133 + libbalsa/html.c | 52 ++++++++++++++++++++++++-------------------------
134 + 2 files changed, 25 insertions(+), 27 deletions(-)
135 +
136 +diff --git a/libbalsa/html.c b/libbalsa/html.c
137 +index 17f62789e..1e5e2f500 100644
138 +--- a/libbalsa/html.c
139 ++++ b/libbalsa/html.c
140 +@@ -44,6 +44,11 @@
141 + #include <string.h>
142 + #include <glib/gi18n.h>
143 +
144 ++#ifdef G_LOG_DOMAIN
145 ++# undef G_LOG_DOMAIN
146 ++#endif
147 ++#define G_LOG_DOMAIN "html"
148 ++
149 + #ifdef HAVE_HTML_WIDGET
150 +
151 + /*
152 +@@ -141,13 +146,6 @@ html2text(gchar ** text, gsize len)
153 + * Experimental support for WebKit2.
154 + */
155 +
156 +-#define DEBUG_WEBKIT2 FALSE
157 +-#if DEBUG_WEBKIT2
158 +-#define d(x) x
159 +-#else
160 +-#define d(x)
161 +-#endif
162 +-
163 + /* WebKitContextMenuItem uses GtkAction, which is deprecated.
164 + * We don't use it, but it breaks the git-tree build, so we just mangle
165 + * it: */
166 +@@ -280,10 +278,10 @@ lbh_navigation_policy_decision(WebKitPolicyDecision * decision,
167 +
168 + switch (navigation_type) {
169 + case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED:
170 +- d(g_print("%s clicked %s\n", __func__, uri));
171 ++ g_debug("%s clicked %s", __func__, uri);
172 + (*info->clicked_cb) (uri);
173 + default:
174 +- d(g_print("%s uri %s, type %d, ignored\n", __func__, uri, navigation_type));
175 ++ g_debug("%s uri %s, type %d, ignored", __func__, uri, navigation_type);
176 + webkit_policy_decision_ignore(decision);
177 + }
178 + }
179 +@@ -305,13 +303,13 @@ lbh_new_window_policy_decision(WebKitPolicyDecision * decision,
180 + (navigation_action)) {
181 + case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED:
182 + request = webkit_navigation_action_get_request(navigation_action);
183 +- d(g_print("%s clicked %s\n", __func__,
184 +- webkit_uri_request_get_uri(request)));
185 ++ g_debug("%s clicked %s", __func__,
186 ++ webkit_uri_request_get_uri(request));
187 + (*info->clicked_cb) (webkit_uri_request_get_uri(request));
188 + default:
189 +- d(g_print("%s type %d, ignored\n", __func__,
190 +- webkit_navigation_action_get_navigation_type
191 +- (navigation_action)));
192 ++ g_debug("%s type %d, ignored", __func__,
193 ++ webkit_navigation_action_get_navigation_type
194 ++ (navigation_action));
195 +
196 + webkit_policy_decision_ignore(decision);
197 + }
198 +@@ -321,10 +319,10 @@ static void
199 + lbh_response_policy_decision(WebKitPolicyDecision * decision,
200 + gpointer data)
201 + {
202 +- d(g_print("%s uri %s, ignored\n", __func__,
203 +- webkit_uri_request_get_uri
204 +- (webkit_response_policy_decision_get_request
205 +- (WEBKIT_RESPONSE_POLICY_DECISION(decision)))));
206 ++ g_debug("%s uri %s, ignored", __func__,
207 ++ webkit_uri_request_get_uri
208 ++ (webkit_response_policy_decision_get_request
209 ++ (WEBKIT_RESPONSE_POLICY_DECISION(decision))));
210 + webkit_policy_decision_ignore(decision);
211 + }
212 +
213 +@@ -453,20 +451,20 @@ lbh_resource_notify_response_cb(WebKitWebResource * resource,
214 +
215 + response = webkit_web_resource_get_response(resource);
216 + mime_type = webkit_uri_response_get_mime_type(response);
217 +- d(g_print("%s mime-type %s\n", __func__, mime_type));
218 ++ g_debug("%s mime-type %s", __func__, mime_type);
219 + if (g_ascii_strncasecmp(mime_type, "image/", 6) != 0)
220 + return;
221 +
222 + if (info->info_bar) {
223 +- d(g_print("%s %s destroy info_bar\n", __func__,
224 +- webkit_web_resource_get_uri(resource)));
225 ++ g_debug("%s %s destroy info_bar", __func__,
226 ++ webkit_web_resource_get_uri(resource));
227 + /* web_view is loading an image from its cache, so we do not
228 + * need to ask the user for permission to download */
229 + gtk_widget_destroy(info->info_bar);
230 + info->info_bar = NULL;
231 + } else {
232 +- d(g_print("%s %s null info_bar\n", __func__,
233 +- webkit_web_resource_get_uri(resource)));
234 ++ g_debug("%s %s null info_bar", __func__,
235 ++ webkit_web_resource_get_uri(resource));
236 + }
237 + }
238 +
239 +@@ -493,7 +491,7 @@ static gboolean
240 + lbh_web_process_crashed_cb(WebKitWebView * web_view,
241 + gpointer data)
242 + {
243 +- d(g_print("%s\n", __func__));
244 ++ g_debug("%s", __func__);
245 + return FALSE;
246 + }
247 +
248 +@@ -509,7 +507,7 @@ lbh_cid_cb(WebKitURISchemeRequest * request,
249 + LibBalsaMessageBody *body;
250 +
251 + path = webkit_uri_scheme_request_get_path(request);
252 +- d(g_print("%s path %s\n", __func__, path));
253 ++ g_debug("%s path %s", __func__, path);
254 +
255 + if ((body =
256 + libbalsa_message_get_part_by_id(info->body->message, path))) {
257 +@@ -616,7 +614,7 @@ libbalsa_html_new(LibBalsaMessageBody * body,
258 + webkit_web_context_register_uri_scheme(context, "cid", lbh_cid_cb,
259 + &info, NULL);
260 + have_registered_cid = TRUE;
261 +- d(g_print("%s registered cid: scheme\n", __func__));
262 ++ g_debug("%s registered cid: scheme", __func__);
263 + }
264 +
265 + settings = webkit_web_view_get_settings(web_view);
266 +@@ -647,7 +645,7 @@ libbalsa_html_new(LibBalsaMessageBody * body,
267 + if (g_regex_match_simple(src_regex, text, G_REGEX_CASELESS, 0)) {
268 + info->info_bar = lbh_info_bar(info);
269 + gtk_box_pack_start(GTK_BOX(vbox), info->info_bar, FALSE, FALSE, 0);
270 +- d(g_print("%s shows info_bar\n", __func__));
271 ++ g_debug("%s shows info_bar", __func__);
272 + }
273 +
274 + webkit_web_view_load_html(web_view, text, NULL);
275 +--
276 +2.17.1
277 +
278
279 diff --git a/mail-client/balsa/files/balsa-2.5.6-fix-older-webkit2.patch b/mail-client/balsa/files/balsa-2.5.6-fix-older-webkit2.patch
280 new file mode 100644
281 index 00000000000..d7b5eb74ba1
282 --- /dev/null
283 +++ b/mail-client/balsa/files/balsa-2.5.6-fix-older-webkit2.patch
284 @@ -0,0 +1,53 @@
285 +From 3423ca9bf48e675007b7fb1bd61b50aa97d14890 Mon Sep 17 00:00:00 2001
286 +From: =?UTF-8?q?Albrecht=20Dre=C3=9F?=
287 +Date: Sat, 7 Jul 2018 16:36:49 -0400
288 +Subject: [PATCH] html: Fix HTML rendering with webkit2gtk-4.0 < 2.20
289 +MIME-Version: 1.0
290 +Content-Type: text/plain; charset=UTF-8
291 +Content-Transfer-Encoding: 8bit
292 +
293 +* README: document use of G_MESSAGES_DEBUG=…
294 +* libbalsa/html.c (lbh_navigation_policy_decision):
295 + allow the rendering of “about:blank”.
296 +---
297 + libbalsa/html.c | 12 ++++++++----
298 + 1 file changed, 8 insertions(+), 4 deletions(-)
299 +
300 +leio: trimmed out the G_MESSAGES_DEBUG doc changes
301 +diff --git a/libbalsa/html.c b/libbalsa/html.c
302 +index 1e5e2f500..307194e0a 100644
303 +--- a/libbalsa/html.c
304 ++++ b/libbalsa/html.c
305 +@@ -44,13 +44,13 @@
306 + #include <string.h>
307 + #include <glib/gi18n.h>
308 +
309 ++#ifdef HAVE_HTML_WIDGET
310 ++
311 + #ifdef G_LOG_DOMAIN
312 + # undef G_LOG_DOMAIN
313 + #endif
314 + #define G_LOG_DOMAIN "html"
315 +
316 +-#ifdef HAVE_HTML_WIDGET
317 +-
318 + /*
319 + * Used by all HTML widgets
320 + *
321 +@@ -281,8 +281,12 @@ lbh_navigation_policy_decision(WebKitPolicyDecision * decision,
322 + g_debug("%s clicked %s", __func__, uri);
323 + (*info->clicked_cb) (uri);
324 + default:
325 +- g_debug("%s uri %s, type %d, ignored", __func__, uri, navigation_type);
326 +- webkit_policy_decision_ignore(decision);
327 ++ if (g_ascii_strcasecmp(uri, "about:blank") != 0) {
328 ++ g_debug("%s uri %s, type %d, ignored", __func__, uri, navigation_type);
329 ++ webkit_policy_decision_ignore(decision);
330 ++ } else {
331 ++ g_debug("%s uri %s, type %d loaded", __func__, uri, navigation_type);
332 ++ }
333 + }
334 + }
335 +
336 +--
337 +2.17.1