Gentoo Archives: gentoo-commits

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: gnome-extra/evolution-mapi/, gnome-extra/evolution-data-server/files/, ...
Date: Thu, 02 Jun 2011 15:49:17
Message-Id: 94bb515df1bc8f94de6e02909ec210997fc7d264.nirbheek@gentoo
1 commit: 94bb515df1bc8f94de6e02909ec210997fc7d264
2 Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
3 AuthorDate: Sun May 29 04:40:28 2011 +0000
4 Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 2 15:03:02 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=94bb515d
7
8 evolution & friends: 3.0.1 → 3.0.2 + out-of-tree linking fix for eds
9
10 * mail-client/evolution: 3.0.1 → 3.0.2, add a few patches from git
11 gnome-3-0 branch, update the default browser message for GNOME3
12 (both in 3.0.2 and 9999).
13
14 * gnome-extra/evolution-exchange: 3.0.1 → 3.0.2, remove obsolete patch.
15
16 * gnome-extra/evolution-mapi: 3.0.1 → 3.0.2, drop all keywords until
17 libmapi-0.9 can be compiled on Gentoo without the use of black magick
18 (e.g. see bug 355935, and that's just the tip of the iceberg).
19
20 * gnome-extra/evolution-data-server: 3.0.1 → 3.0.2.1, plus fix the
21 out-of-tree linking issue. A long explanation follows.
22
23 evolution-data-server tries to link to system libraries rather than to
24 in-tree ones on make install (see https://bugzilla.gnome.org/show_bug.cgi?id=641239)
25 making it impossible to e.g. cleanly upgrade from gnome2 to gnome3. After
26 spending hours banging my head against the abomination known as libtool,
27 I see no clean and simple way of fixing this: no matter what I tried,
28 the chain of.la dependencies resolved into an -L/usr/lib64 somewhere in
29 front of -lcamel-1.2 or -lsome-other-in-tree-lib.
30
31 Therefore, as an alternative to rewriting eds's build system, I propose
32 adding a perl script (fix_relink_command.pl) that runs before
33 gnome2_src_install and fixes up all the relink_command lines in the .la files
34 in the build tree to make libtool preferentially relink to in-tree libraries.
35
36 I have tested it, and works well, allowing a clean upgrade from
37 evolution-data-server-2.32.2-r1 to 3.0.2.1.
38
39 Why perl? Because the kind of text mangling that needs to be performed is
40 really not a good fit for tools like sed, so a shell script with equivalent
41 functionality would be longer, less readable, and probably not portable
42 to non-GNU systems.
43
44 Signed-off-by: Nirbheek Chauhan <nirbheek <AT> gentoo.org>
45
46 ---
47 ...ebuild => evolution-data-server-3.0.2.1.ebuild} | 10 ++-
48 .../files/fix_relink_command.pl | 108 ++++++++++++++++++++
49 ....0.1.ebuild => evolution-exchange-3.0.2.ebuild} | 0
50 ...evolution-exchange-2.91.6-xntlm-as-needed.patch | 11 --
51 ...pi-3.0.1.ebuild => evolution-mapi-3.0.2.ebuild} | 3 +-
52 ...olution-3.0.1.ebuild => evolution-3.0.2.ebuild} | 25 +++--
53 mail-client/evolution/evolution-9999.ebuild | 18 ++--
54 ...Always-update-signature-in-composer-on-ac.patch | 25 +++++
55 ...refresh_folders_exec-reports-progress-inc.patch | 41 ++++++++
56 ...Crash-using-saved-search-with-an-empty-ex.patch | 37 +++++++
57 10 files changed, 249 insertions(+), 29 deletions(-)
58
59 diff --git a/gnome-extra/evolution-data-server/evolution-data-server-3.0.1.ebuild b/gnome-extra/evolution-data-server/evolution-data-server-3.0.2.1.ebuild
60 similarity index 88%
61 rename from gnome-extra/evolution-data-server/evolution-data-server-3.0.1.ebuild
62 rename to gnome-extra/evolution-data-server/evolution-data-server-3.0.2.1.ebuild
63 index 0266646..a0f7224 100644
64 --- a/gnome-extra/evolution-data-server/evolution-data-server-3.0.1.ebuild
65 +++ b/gnome-extra/evolution-data-server/evolution-data-server-3.0.2.1.ebuild
66 @@ -46,6 +46,7 @@ RDEPEND=">=dev-libs/glib-2.28:2
67 weather? ( >=dev-libs/libgweather-2.90.0:2 )
68 "
69 DEPEND="${RDEPEND}
70 + dev-lang/perl
71 dev-util/gperf
72 >=dev-util/pkgconfig-0.9
73 >=dev-util/intltool-0.35.5
74 @@ -78,8 +79,6 @@ pkg_setup() {
75 }
76
77 src_prepare() {
78 - # WTF: libebook-1.2 links against system libcamel-1.2
79 - # libedata-book-1.2 links against system libebackend-1.2
80 gnome2_src_prepare
81
82 # Adjust to gentoo's /etc/service
83 @@ -107,6 +106,13 @@ src_prepare() {
84 }
85
86 src_install() {
87 + # Prevent this evolution-data-server from linking to libs in the installed
88 + # evolution-data-server libraries by adding -L arguments for build dirs to
89 + # every .la file's relink_command field, forcing libtool to look there
90 + # first during relinking. This will mangle the .la files installed by
91 + # make install, but we don't care because we will be punting them anyway.
92 + perl "${FILESDIR}/fix_relink_command.pl" . ||
93 + die "fix_relink_command.pl failed"
94 gnome2_src_install
95
96 if use ldap; then
97
98 diff --git a/gnome-extra/evolution-data-server/files/fix_relink_command.pl b/gnome-extra/evolution-data-server/files/fix_relink_command.pl
99 new file mode 100755
100 index 0000000..12106c3
101 --- /dev/null
102 +++ b/gnome-extra/evolution-data-server/files/fix_relink_command.pl
103 @@ -0,0 +1,108 @@
104 +#!/usr/bin/perl
105 +# Fix the relink_command field of .la files in the specified directory tree
106 +# to add "-L$dir/.libs" for every .la file that is specified in a relative
107 +# $dir; place these new -L directives before the first relative .la file.
108 +#
109 +# E.g. :
110 +# relink_command="(cd /tmp/foo/libfoo; /bin/sh /tmp/foo/libtool --silent --tag CC --mode=relink gcc -O2 foo.lo bar/libbar.la ../baz/libbaz.la /usr/lib/libfrob.la -lm)"
111 +# will become
112 +# relink_command="(cd /tmp/foo/libfoo; /bin/sh /tmp/foo/libtool --silent --tag CC --mode=relink gcc -O2 foo.lo -Lbar/.libs -L../baz/.libs bar/libbar.la ../baz/libbaz.la /usr/lib/libfrob.la -lm)"
113 +#
114 +# Such a procedure should ensure that during relinking, libraries in the
115 +# local build tree will be looked at before libraries installed systemwide.
116 +#
117 +# Limitations: it is assumed that relink_command is one line. It is assumed
118 +# that any spaces in paths are escaped using '\'.
119 +#
120 +# Copyright (c) 2011 Alexandre Rostovtsev <tetromino@×××××.com>
121 +#
122 +# This program is free software; you can redistribute it and/or modify it
123 +# under the same terms as Perl itself.
124 +use strict;
125 +use warnings;
126 +
127 +use Cwd qw(realpath);
128 +use File::Basename;
129 +use File::Find;
130 +
131 +my %processed = ();
132 +sub process_la_file {
133 + my $filename = $_; # relative to cwd
134 + my $pretty_filename = $File::Find::name; # relative to initial cwd
135 + if (-d $filename) { return; }
136 +
137 + # don't process a single .la file multiple times (e.g. if symlinked)
138 + my $realpath = realpath($filename);
139 + if ($processed{$realpath}) {
140 + print "$pretty_filename ($realpath) was already processed\n";
141 + return;
142 + } else {
143 + $processed{$realpath}++;
144 + }
145 +
146 + # preserve the .la file's mtime in order to avoid triggering make rules
147 + my $mtime = (stat $filename)[9];
148 + open(my $fh, '<', $filename) or die $!;
149 + my $text;
150 + my $changes; # whether the file has been changed
151 + while (<$fh>) {
152 + if (/relink_command=/) {
153 + my ($start, $added, $end);
154 + my $ignore = 0; # number of words to not check for similariy to
155 + # an .la filename, following and including the
156 + # current word
157 + # split by unescaped spaces
158 + for my $word (split /(?<!\\) /) {
159 + if ($word =~ /^-/) {
160 + # ignore command-line options; ignore filename after -o
161 + $ignore++;
162 + $ignore++ if $word eq '-o' ;
163 + }
164 + if ($word =~ m:^[^/].*\.la\W*$: and not $ignore) {
165 + $added .= "-L" . dirname($word) . "/.libs ";
166 + $end .= "$word ";
167 + $changes++;
168 + } else {
169 + if ($end) {
170 + $end .= "$word ";
171 + } else {
172 + $start .= "$word ";
173 + }
174 + }
175 + $ignore-- if $ignore > 0;
176 + }
177 + $_ = "$start$added$end";
178 + print "Added '$added' to relink_command in $pretty_filename\n" if $changes;
179 + }
180 + $text .= $_;
181 + }
182 + close $fh;
183 + if ($changes) {
184 + open($fh, '>', $filename) or die $!;
185 + print $fh $text;
186 + close $fh;
187 + # Perl's utime does not support sub-second time :/
188 + # And Time::HiRes doesn't help. As a workaround, round up the number of
189 + # seconds in order to avoid triggering make rules.
190 + utime $mtime + 1, $mtime + 1, $filename;
191 + }
192 +}
193 +
194 +if (not @ARGV or $ARGV[0] eq '-h' or $ARGV[0] eq '--help') {
195 + warn <<endhelp;
196 +Usage: fix_relink_command.pl [LAFILENAMES or DIRECTORIES]
197 +
198 +Adds extra -L\$dir/.libs arguments to the relink_command field of .la files
199 +in order to ensure that during relinking, libraries in the local build tree
200 +will be looked at before ones installed systemwide.
201 +
202 +If a filename is given, will process that .la file. If a directory is given,
203 +will recursively process all .la files in it (but will not recurse into
204 +symlinked or hidden directories).
205 +endhelp
206 + exit;
207 +}
208 +
209 +find({ wanted => \&process_la_file,
210 + preprocess => sub {grep { if (-d $_) { /^[^.]/ } else { /\.la$/ } } sort @_}
211 + }, @ARGV);
212
213 diff --git a/gnome-extra/evolution-exchange/evolution-exchange-3.0.1.ebuild b/gnome-extra/evolution-exchange/evolution-exchange-3.0.2.ebuild
214 similarity index 100%
215 rename from gnome-extra/evolution-exchange/evolution-exchange-3.0.1.ebuild
216 rename to gnome-extra/evolution-exchange/evolution-exchange-3.0.2.ebuild
217
218 diff --git a/gnome-extra/evolution-exchange/files/evolution-exchange-2.91.6-xntlm-as-needed.patch b/gnome-extra/evolution-exchange/files/evolution-exchange-2.91.6-xntlm-as-needed.patch
219 deleted file mode 100644
220 index 511c4d3..0000000
221 --- a/gnome-extra/evolution-exchange/files/evolution-exchange-2.91.6-xntlm-as-needed.patch
222 +++ /dev/null
223 @@ -1,11 +0,0 @@
224 ---- server/lib/Makefile.am
225 -+++ server/lib/Makefile.am
226 -@@ -71,6 +71,8 @@
227 - $(EVOLUTION_DATA_SERVER_CFLAGS)
228 -
229 - libexchange_la_LIBADD = \
230 -+ -L$(top_srcdir)/server/xntlm \
231 -+ -lxntlm \
232 - $(EVOLUTION_DATA_SERVER_LIBS) \
233 - $(GNOME_PLATFORM_LIBS) \
234 - $(SOUP_LIBS) \
235
236 diff --git a/gnome-extra/evolution-mapi/evolution-mapi-3.0.1.ebuild b/gnome-extra/evolution-mapi/evolution-mapi-3.0.2.ebuild
237 similarity index 89%
238 rename from gnome-extra/evolution-mapi/evolution-mapi-3.0.1.ebuild
239 rename to gnome-extra/evolution-mapi/evolution-mapi-3.0.2.ebuild
240 index 20a3771..5398e9d 100644
241 --- a/gnome-extra/evolution-mapi/evolution-mapi-3.0.1.ebuild
242 +++ b/gnome-extra/evolution-mapi/evolution-mapi-3.0.2.ebuild
243 @@ -20,7 +20,8 @@ IUSE="doc"
244 if [[ ${PV} = 9999 ]]; then
245 KEYWORDS=""
246 else
247 - KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
248 + # XXX: re-enable keywords when libmapi can be emerged without black magick
249 + KEYWORDS="" #"~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
250 fi
251
252 RDEPEND="
253
254 diff --git a/mail-client/evolution/evolution-3.0.1.ebuild b/mail-client/evolution/evolution-3.0.2.ebuild
255 similarity index 85%
256 rename from mail-client/evolution/evolution-3.0.1.ebuild
257 rename to mail-client/evolution/evolution-3.0.2.ebuild
258 index be50867..7fa7af0 100644
259 --- a/mail-client/evolution/evolution-3.0.1.ebuild
260 +++ b/mail-client/evolution/evolution-3.0.2.ebuild
261 @@ -7,7 +7,7 @@ GCONF_DEBUG="no"
262 GNOME2_LA_PUNT="yes"
263 PYTHON_DEPEND="python? 2:2.4"
264
265 -inherit autotools flag-o-matic gnome2 python
266 +inherit autotools eutils flag-o-matic gnome2 python
267 if [[ ${PV} = 9999 ]]; then
268 inherit gnome2-live
269 fi
270 @@ -144,6 +144,11 @@ pkg_setup() {
271 }
272
273 src_prepare() {
274 + # XXX: useful upstream fixes, will be included in next release
275 + epatch "${FILESDIR}/0001-Bug-651039-Always-update-signature-in-composer-on-ac.patch"
276 + epatch "${FILESDIR}/0002-Bug-651062-refresh_folders_exec-reports-progress-inc.patch"
277 + epatch "${FILESDIR}/0003-Bug-651135-Crash-using-saved-search-with-an-empty-ex.patch"
278 +
279 # Use NSS/NSPR only if 'ssl' is enabled.
280 if use ssl ; then
281 sed -e 's|mozilla-nss|nss|' \
282 @@ -166,13 +171,17 @@ src_prepare() {
283 pkg_postinst() {
284 gnome2_pkg_postinst
285
286 - # FIXME: This has changed with GNOME 3, revisit
287 - #elog "To change the default browser if you are not using GNOME, do:"
288 - #elog "gconftool-2 --set /desktop/gnome/url-handlers/http/command -t string 'firefox %s'"
289 - #elog "gconftool-2 --set /desktop/gnome/url-handlers/https/command -t string 'firefox %s'"
290 - #elog ""
291 - #elog "Replace 'firefox %s' with which ever browser you use."
292 - #elog ""
293 + elog "To change the default browser if you are not using GNOME, edit"
294 + elog "~/.local/share/applications/mimeapps.list so it includes the"
295 + elog "following content:"
296 + elog ""
297 + elog "[Default Applications]"
298 + elog "x-scheme-handler/http=firefox.desktop"
299 + elog "x-scheme-handler/https=firefox.desktop"
300 + elog ""
301 + elog "(replace firefox.desktop with the name of the appropriate .desktop"
302 + elog "file from /usr/share/applications if you use a different browser)."
303 + elog ""
304 elog "Junk filters are now a run-time choice. You will get a choice of"
305 elog "bogofilter or spamassassin based on which you have installed"
306 elog ""
307
308 diff --git a/mail-client/evolution/evolution-9999.ebuild b/mail-client/evolution/evolution-9999.ebuild
309 index be50867..04f6f5e 100644
310 --- a/mail-client/evolution/evolution-9999.ebuild
311 +++ b/mail-client/evolution/evolution-9999.ebuild
312 @@ -166,13 +166,17 @@ src_prepare() {
313 pkg_postinst() {
314 gnome2_pkg_postinst
315
316 - # FIXME: This has changed with GNOME 3, revisit
317 - #elog "To change the default browser if you are not using GNOME, do:"
318 - #elog "gconftool-2 --set /desktop/gnome/url-handlers/http/command -t string 'firefox %s'"
319 - #elog "gconftool-2 --set /desktop/gnome/url-handlers/https/command -t string 'firefox %s'"
320 - #elog ""
321 - #elog "Replace 'firefox %s' with which ever browser you use."
322 - #elog ""
323 + elog "To change the default browser if you are not using GNOME, edit"
324 + elog "~/.local/share/applications/mimeapps.list so it includes the"
325 + elog "following content:"
326 + elog ""
327 + elog "[Default Applications]"
328 + elog "x-scheme-handler/http=firefox.desktop"
329 + elog "x-scheme-handler/https=firefox.desktop"
330 + elog ""
331 + elog "(replace firefox.desktop with the name of the appropriate .desktop"
332 + elog "file from /usr/share/applications if you use a different browser)."
333 + elog ""
334 elog "Junk filters are now a run-time choice. You will get a choice of"
335 elog "bogofilter or spamassassin based on which you have installed"
336 elog ""
337
338 diff --git a/mail-client/evolution/files/0001-Bug-651039-Always-update-signature-in-composer-on-ac.patch b/mail-client/evolution/files/0001-Bug-651039-Always-update-signature-in-composer-on-ac.patch
339 new file mode 100644
340 index 0000000..7f80812
341 --- /dev/null
342 +++ b/mail-client/evolution/files/0001-Bug-651039-Always-update-signature-in-composer-on-ac.patch
343 @@ -0,0 +1,25 @@
344 +From 843e35c48ada910eb1fefb202bcb849d1047c359 Mon Sep 17 00:00:00 2001
345 +From: Milan Crha <mcrha@××××××.com>
346 +Date: Wed, 25 May 2011 11:20:26 +0200
347 +Subject: [PATCH 1/3] Bug #651039 - Always update signature in composer on
348 + account change
349 +
350 +---
351 + composer/e-msg-composer.c | 1 +
352 + 1 files changed, 1 insertions(+), 0 deletions(-)
353 +
354 +diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
355 +index 0bc9ca9..c8f1993 100644
356 +--- a/composer/e-msg-composer.c
357 ++++ b/composer/e-msg-composer.c
358 +@@ -1714,6 +1714,7 @@ msg_composer_account_changed_cb (EMsgComposer *composer)
359 + uid = account->id->sig_uid;
360 + signature = uid ? e_get_signature_by_uid (uid) : NULL;
361 + e_composer_header_table_set_signature (table, signature);
362 ++ e_msg_composer_show_sig_file (composer);
363 + }
364 +
365 + static void
366 +--
367 +1.7.5.rc3
368 +
369
370 diff --git a/mail-client/evolution/files/0002-Bug-651062-refresh_folders_exec-reports-progress-inc.patch b/mail-client/evolution/files/0002-Bug-651062-refresh_folders_exec-reports-progress-inc.patch
371 new file mode 100644
372 index 0000000..4579cda
373 --- /dev/null
374 +++ b/mail-client/evolution/files/0002-Bug-651062-refresh_folders_exec-reports-progress-inc.patch
375 @@ -0,0 +1,41 @@
376 +From fbd3aca29cc12c8a58d15237e3e44f83fe1b8229 Mon Sep 17 00:00:00 2001
377 +From: Matthew Barnes <mbarnes@××××××.com>
378 +Date: Thu, 26 May 2011 07:03:15 -0400
379 +Subject: [PATCH 2/3] Bug 651062 - refresh_folders_exec() reports progress
380 + incorrectly.
381 +
382 +(cherry picked from commit 6ddc2340d03b6fe3745e97ca10336408833c7294)
383 +---
384 + mail/mail-send-recv.c | 7 ++++++-
385 + 1 files changed, 6 insertions(+), 1 deletions(-)
386 +
387 +diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
388 +index a4e2e2e..79018f3 100644
389 +--- a/mail/mail-send-recv.c
390 ++++ b/mail/mail-send-recv.c
391 +@@ -924,6 +924,8 @@ refresh_folders_exec (struct _refresh_folders_msg *m,
392 +
393 + get_folders (m->store, m->folders, m->finfo);
394 +
395 ++ camel_operation_push_message (cancellable, _("Updating..."));
396 ++
397 + for (i=0;i<m->folders->len;i++) {
398 + folder = e_mail_session_uri_to_folder_sync (
399 + m->info->session,
400 +@@ -944,9 +946,12 @@ refresh_folders_exec (struct _refresh_folders_msg *m,
401 + break;
402 +
403 + if (m->info->state != SEND_CANCELLED)
404 +- g_signal_emit_by_name (m->info->cancellable, "status", _("Updating..."), 100 * i / m->folders->len);
405 ++ camel_operation_progress (
406 ++ cancellable, 100 * i / m->folders->len);
407 + }
408 +
409 ++ camel_operation_pop_message (cancellable);
410 ++
411 + if (cancellable)
412 + g_signal_handler_disconnect (m->info->cancellable, handler_id);
413 + }
414 +--
415 +1.7.5.rc3
416 +
417
418 diff --git a/mail-client/evolution/files/0003-Bug-651135-Crash-using-saved-search-with-an-empty-ex.patch b/mail-client/evolution/files/0003-Bug-651135-Crash-using-saved-search-with-an-empty-ex.patch
419 new file mode 100644
420 index 0000000..bcec4dd
421 --- /dev/null
422 +++ b/mail-client/evolution/files/0003-Bug-651135-Crash-using-saved-search-with-an-empty-ex.patch
423 @@ -0,0 +1,37 @@
424 +From af08ff1bebc895b4de15d1822d96c64d092f2bb5 Mon Sep 17 00:00:00 2001
425 +From: Milan Crha <mcrha@××××××.com>
426 +Date: Thu, 26 May 2011 13:48:22 +0200
427 +Subject: [PATCH 3/3] Bug #651135 - Crash using saved search with an empty
428 + expression
429 +
430 +---
431 + addressbook/gui/widgets/e-addressbook-model.c | 6 ++++++
432 + 1 files changed, 6 insertions(+), 0 deletions(-)
433 +
434 +diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
435 +index 8e62e40..17eb2d3 100644
436 +--- a/addressbook/gui/widgets/e-addressbook-model.c
437 ++++ b/addressbook/gui/widgets/e-addressbook-model.c
438 +@@ -904,6 +904,9 @@ e_addressbook_model_get_query (EAddressbookModel *model)
439 + {
440 + g_return_val_if_fail (E_IS_ADDRESSBOOK_MODEL (model), NULL);
441 +
442 ++ if (!model->priv->query)
443 ++ return NULL;
444 ++
445 + return e_book_query_to_string (model->priv->query);
446 + }
447 +
448 +@@ -920,6 +923,9 @@ e_addressbook_model_set_query (EAddressbookModel *model,
449 + else
450 + book_query = e_book_query_from_string (query);
451 +
452 ++ if (!book_query)
453 ++ return;
454 ++
455 + if (model->priv->query != NULL) {
456 + gchar *old_query, *new_query;
457 +
458 +--
459 +1.7.5.rc3
460 +