From 54262ba998355b073c968192f4a354f09389327d Mon Sep 17 00:00:00 2001 From: Milan Crha Date: May 21 2019 10:36:02 +0000 Subject: Add patch to adapt to evolution-data-server's libebook API changes --- diff --git a/folks-eds-libebook-api-changes.patch b/folks-eds-libebook-api-changes.patch new file mode 100644 index 0000000..4d57075 --- /dev/null +++ b/folks-eds-libebook-api-changes.patch @@ -0,0 +1,118 @@ +From 69baa2e62665f4163ff7367f2a8b12655350abdf Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Fri, 17 May 2019 09:43:01 +0200 +Subject: [PATCH] eds: Adapt to libebook API changes + +Closes https://gitlab.gnome.org/GNOME/folks/merge_requests/10 +--- + backends/eds/lib/edsf-persona-store.vala | 6 +++--- + meson.build | 2 +- + tests/eds/helper-create-many-contacts.vala | 2 +- + tests/eds/helper-delete-contacts.vala | 2 +- + tests/lib/eds/backend.vala | 6 +++--- + 5 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala +index 33a10f2b..2311277b 100644 +--- a/backends/eds/lib/edsf-persona-store.vala ++++ b/backends/eds/lib/edsf-persona-store.vala +@@ -610,7 +610,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore + /* _addressbook is guaranteed to be non-null before we ensure that + * prepare() has already been called. */ + yield ((!) this._addressbook).remove_contact ( +- ((Edsf.Persona) persona).contact, null); ++ ((Edsf.Persona) persona).contact, E.BookOperationFlags.NONE, null); + } + catch (GLib.Error e) + { +@@ -1258,7 +1258,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore + + /* Commit the new contact. _addressbook is asserted as being non-null + * above. */ +- yield ((!) this._addressbook).add_contact (contact, null, ++ yield ((!) this._addressbook).add_contact (contact, E.BookOperationFlags.NONE, null, + out added_uid); + + debug ("Finished sending new contact to EDS; received UID %s.", +@@ -1377,7 +1377,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore + + /* Commit the modification. _addressbook is asserted as being non-null + * above. */ +- yield ((!) this._addressbook).modify_contact (contact, null); ++ yield ((!) this._addressbook).modify_contact (contact, E.BookOperationFlags.NONE, null); + + timeout_id = Timeout.add_seconds (PersonaStore._property_change_timeout, () => + { +diff --git a/meson.build b/meson.build +index 1fd2e348..a42166fe 100644 +--- a/meson.build ++++ b/meson.build +@@ -65,7 +65,7 @@ inspect_tool_enabled = get_option('inspect_tool') + # Dependencies + #------------------------------------------------- + min_glib_version = '2.44' +-min_eds_version = '3.13.90' ++min_eds_version = '3.33.2' + + valac = meson.get_compiler('vala') + cc = meson.get_compiler('c') +diff --git a/tests/eds/helper-create-many-contacts.vala b/tests/eds/helper-create-many-contacts.vala +index b5d2ab4b..632c1cd6 100644 +--- a/tests/eds/helper-create-many-contacts.vala ++++ b/tests/eds/helper-create-many-contacts.vala +@@ -107,7 +107,7 @@ public class Main + SList uids; + try + { +- book_client.add_contacts_sync (contacts, out uids, null); ++ book_client.add_contacts_sync (contacts, E.BookOperationFlags.NONE, out uids, null); + } + catch (Error e) + { +diff --git a/tests/eds/helper-delete-contacts.vala b/tests/eds/helper-delete-contacts.vala +index 6853610a..74b84f21 100644 +--- a/tests/eds/helper-delete-contacts.vala ++++ b/tests/eds/helper-delete-contacts.vala +@@ -41,7 +41,7 @@ public class Main + SList uids; + book_client.get_contacts_uids_sync ( + "(contains \"x-evolution-any-field\" \"\")", out uids); +- book_client.remove_contacts_sync (uids); ++ book_client.remove_contacts_sync (uids, E.BookOperationFlags.NONE); + } + + private static string _uid = ""; +diff --git a/tests/lib/eds/backend.vala b/tests/lib/eds/backend.vala +index 22923ed5..e9fc587c 100644 +--- a/tests/lib/eds/backend.vala ++++ b/tests/lib/eds/backend.vala +@@ -71,7 +71,7 @@ public class EdsTest.Backend + { + yield this._addressbook.get_contact (uid, null, out contact); + this._set_contact_fields (contact, updated_data); +- yield this._addressbook.modify_contact (contact, null); ++ yield this._addressbook.modify_contact (contact, E.BookOperationFlags.NONE, null); + } + catch (GLib.Error e) + { +@@ -86,7 +86,7 @@ public class EdsTest.Backend + try + { + yield this._addressbook.get_contact (uid, null, out contact); +- yield this._addressbook.remove_contact (contact, null); ++ yield this._addressbook.remove_contact (contact, E.BookOperationFlags.NONE, null); + } + catch (GLib.Error e) + { +@@ -211,7 +211,7 @@ public class EdsTest.Backend + { + GLib.SList uids; + +- yield this._addressbook.add_contacts (contacts, null, out uids); ++ yield this._addressbook.add_contacts (contacts, E.BookOperationFlags.NONE, null, out uids); + + foreach (unowned string uid in uids) + this._e_contacts += uid; +-- +2.18.1 + diff --git a/folks.spec b/folks.spec index f345e57..90b35c4 100644 --- a/folks.spec +++ b/folks.spec @@ -3,12 +3,13 @@ Name: folks Epoch: 1 Version: 0.12.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GObject contact aggregation library License: LGPLv2+ URL: http://telepathy.freedesktop.org/wiki/Folks Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.12/%{name}-%{version}.tar.xz +Patch01: folks-eds-libebook-api-changes.patch BuildRequires: gcc BuildRequires: meson @@ -60,7 +61,7 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep -%autosetup +%autosetup -p1 %build %meson @@ -130,6 +131,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/folks-inspect %{_datadir}/vala/vapi/%{name}* %changelog +* Tue May 21 2019 Milan Crha - 1:0.12.1-2 +- Add patch to adapt to evolution-data-server's libebook API changes + * Tue Apr 30 2019 Phil Wyett - 1:0.12.1-1 - Update to 0.12.1 - Convert to meson build