]> git.sur5r.net Git - glabels/commitdiff
Fix building against e-d-s >= 3.6
authorJakob Haufe <sur5r@sur5r.net>
Sat, 7 Sep 2013 17:13:05 +0000 (19:13 +0200)
committerJakob Haufe <sur5r@sur5r.net>
Sat, 7 Sep 2013 22:20:20 +0000 (00:20 +0200)
Cherry-pick 6b7d7e831e5542b6ea3c15802fa882a42399fc15 from upstream to
make glabels compile agaings evolution-data-server >= 3.6.0.
Also bump B-D on libebook1.2-dev accordingly.

debian/control
debian/patches/0004-unbreak-with-evolution-data-server-3.6.0.patch [new file with mode: 0644]

index 18f22c58f674ea2e913362e5bd8198afca945425..659a96d6b576dad32df976ab29b8633620a561c3 100644 (file)
@@ -15,7 +15,7 @@ Build-Depends: autotools-dev,
                librsvg2-dev (>= 2.32.0),
                libcairo2-dev (>= 1.10.0),
                libpango1.0-dev (>= 1.28.1),
-               libebook1.2-dev (>= 2.30.3),
+               libebook1.2-dev (>= 3.6.0),
                barcode (>= 0.98),
                libqrencode-dev (>= 3.1.0),
                libiec16022-dev (>= 0.2.4)
diff --git a/debian/patches/0004-unbreak-with-evolution-data-server-3.6.0.patch b/debian/patches/0004-unbreak-with-evolution-data-server-3.6.0.patch
new file mode 100644 (file)
index 0000000..d0ad5cc
--- /dev/null
@@ -0,0 +1,83 @@
+From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
+Date: Mon, 1 Apr 2013 10:53:59 +0200
+Subject: unbreak with evolution-data-server >= 3.6.0
+
+https://bugzilla.gnome.org/show_bug.cgi?id=685130
+---
+ src/merge-evolution.c | 31 ++++++++++++++++++++++++++++---
+ src/merge-vcard.c     |  2 +-
+ 2 files changed, 29 insertions(+), 4 deletions(-)
+
+diff --git a/src/merge-evolution.c b/src/merge-evolution.c
+index bd14483..c3c2639 100644
+--- a/src/merge-evolution.c
++++ b/src/merge-evolution.c
+@@ -29,7 +29,7 @@
+ #include "merge-evolution.h"
+-#include <libebook/e-book.h>
++#include <libebook/libebook.h>
+ #include <glib/gi18n.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -297,6 +297,31 @@ static gint sort_contact_by_file_as(gconstpointer *a, gconstpointer *b)
+ /*--------------------------------------------------------------------------*/
+ /* Open merge source.                                                       */
+ /*--------------------------------------------------------------------------*/
++static EBook *
++gl_open_system_addressbook (GError **error)
++{
++   ESourceRegistry *registry;
++   EBook *book = NULL;
++   ESource *source;
++
++   registry = e_source_registry_new_sync (NULL, error);
++   if (!registry)
++       return NULL;
++
++   source = e_source_registry_ref_builtin_address_book (registry);
++   if (!source) {
++       g_object_unref (registry);
++       return NULL;
++   }
++
++   book = e_book_new (source, error);
++
++   g_object_unref (source);
++   g_object_unref (registry);
++
++   return book;
++}
++
+ static void
+ gl_merge_evolution_open (glMerge *merge)
+ {
+@@ -317,12 +342,12 @@ gl_merge_evolution_open (glMerge *merge)
+                 return;
+         }
+-        merge_evolution->priv->book = e_book_new_system_addressbook(&error);
++        merge_evolution->priv->book = gl_open_system_addressbook(&error);
+         if (!merge_evolution->priv->book) {
+                 g_warning ("Couldn't open addressbook.");
+                 if (error)
+                 {
+-                        g_warning ("e_book_new_system_addressbook: %s", error->message);
++                        g_warning ("gl_open_system_addressbook: %s", error->message);
+                         g_error_free (error);
+                 }
+                 e_book_query_unref(query);
+diff --git a/src/merge-vcard.c b/src/merge-vcard.c
+index da1deff..6554015 100644
+--- a/src/merge-vcard.c
++++ b/src/merge-vcard.c
+@@ -27,7 +27,7 @@
+ #include "merge-vcard.h"
+-#include <libebook/e-contact.h>
++#include <libebook/libebook.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>