summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/gnome-contacts-evolution-compat.patch
blob: c0472ba4e15bc9b75eb58f3112568ab2e1b428ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From 45cb9a2d7e8cffd17bab05e29ee38f0463743a9c Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Fri, 17 Oct 2025 11:10:09 +0200
Subject: [PATCH] vcard-export: Adapt to evolution-data-server 3.59.1 EVCard
 API changes

The e_vcard_to_string() newly does not have any argument, the vCard
is saved in a version it is stored in the structure. To export in
a specific version, one can use e_vcard_convert_to_string().

Upstream-Status: Merged in version 50.alpha
---
 meson.build                                    |  3 +++
 src/io/contacts-io-vcard-export-operation.vala | 10 ++++++++++
 2 files changed, 13 insertions(+)

diff --git a/meson.build b/meson.build
index e2a70a98..b90cb36d 100644
--- a/meson.build
+++ b/meson.build
@@ -52,6 +52,9 @@ libadwaita_dep = dependency('libadwaita-1', version: '>= 1.8.alpha')
 # E-D-S
 libebook = dependency('libebook-1.2', version: '>=' + min_eds_version)
 libedataserver = dependency('libedataserver-1.2', version: '>=' + min_eds_version)
+if libebook.version().version_compare('>=3.59.1')
+  add_project_arguments('-D', 'HAVE_EDS_3_59_1', language: 'vala')
+endif
 # Camera
 libportal_dep = dependency('libportal-gtk4', version: '>= 0.7')
 gstreamer_dep = dependency('gstreamer-1.0')
diff --git a/src/io/contacts-io-vcard-export-operation.vala b/src/io/contacts-io-vcard-export-operation.vala
index 74ed6572..a692a67d 100644
--- a/src/io/contacts-io-vcard-export-operation.vala
+++ b/src/io/contacts-io-vcard-export-operation.vala
@@ -16,7 +16,9 @@ public class Contacts.Io.VCardExportOperation : ExportOperation {
 
   // We _could_ parameterize this with our own enum, but there's no need for
   // that at the moment.
+#if !HAVE_EDS_3_59_1
   private E.VCardFormat vcard_format = E.VCardFormat.@30;
+#endif
 
   // This should always be on false, except for debugging/troubleshooting
   // purposes. It forces E-D-S personas to use our manual serialization instead
@@ -53,7 +55,11 @@ public class Contacts.Io.VCardExportOperation : ExportOperation {
     // that's an E.VCard already
     if (persona is Edsf.Persona && !avoid_eds) {
       unowned var contact = ((Edsf.Persona) persona).contact;
+#if HAVE_EDS_3_59_1
+      return contact.to_string ();
+#else
       return contact.to_string (this.vcard_format);
+#endif
     }
 
     var vcard = new E.VCard ();
@@ -104,7 +110,11 @@ public class Contacts.Io.VCardExportOperation : ExportOperation {
       vcard_set_webservice_details (vcard, (WebServiceDetails) persona);
 */
 
+#if HAVE_EDS_3_59_1
+    return vcard.to_string ();
+#else
     return vcard.to_string (this.vcard_format);
+#endif
   }
 
   private void vcard_set_avatar_details (E.VCard vcard,
-- 
GitLab