summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2020-12-19 13:50:50 +0200
committerMart Raudsepp <leio@gentoo.org>2020-12-19 13:53:13 +0200
commit3a4227497860654f320ebfd6925846e6a21608d4 (patch)
tree9b6bfadd625234a2d529fdbc237bbe29abef435d /gnome-extra/gnome-contacts
parentgui-libs/libhandy: ebuild touchups (diff)
downloadgentoo-3a4227497860654f320ebfd6925846e6a21608d4.tar.gz
gentoo-3a4227497860654f320ebfd6925846e6a21608d4.tar.bz2
gentoo-3a4227497860654f320ebfd6925846e6a21608d4.zip
gnome-extra/gnome-contacts: fix build with USE=telepathy
Also require at least vala-0.40, as compilation fails with 0.36. gnome-contacts-3.38 adds a meson check for >=vala-0.40.10 too. Closes: https://bugs.gentoo.org/732540 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'gnome-extra/gnome-contacts')
-rw-r--r--gnome-extra/gnome-contacts/files/3.36.2-fix-telepathy.patch71
-rw-r--r--gnome-extra/gnome-contacts/gnome-contacts-3.36.2.ebuild5
2 files changed, 76 insertions, 0 deletions
diff --git a/gnome-extra/gnome-contacts/files/3.36.2-fix-telepathy.patch b/gnome-extra/gnome-contacts/files/3.36.2-fix-telepathy.patch
new file mode 100644
index 000000000000..07d4e7783634
--- /dev/null
+++ b/gnome-extra/gnome-contacts/files/3.36.2-fix-telepathy.patch
@@ -0,0 +1,71 @@
+From cbcb28f91f2c5dab9300ded79dc8e246a7ae0f36 Mon Sep 17 00:00:00 2001
+From: Niels De Graef <nielsdegraef@gmail.com>
+Date: Sat, 7 Nov 2020 12:01:59 +0100
+Subject: [PATCH] Fix build when -Dtelepathy=true
+
+---
+ src/contacts-contact-list.vala | 2 +-
+ src/contacts-contact-sheet.vala | 4 +++-
+ src/contacts-utils.vala | 4 ++--
+ 3 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/contacts-contact-list.vala b/src/contacts-contact-list.vala
+index aa3cd33..b371644 100644
+--- a/src/contacts-contact-list.vala
++++ b/src/contacts-contact-list.vala
+@@ -243,7 +243,7 @@ public class Contacts.ContactList : ListBox {
+ selection_changed (individual);
+ #if HAVE_TELEPATHY
+ if (individual != null)
+- Contact.fetch_contact_info (individual);
++ Utils.fetch_contact_info (individual);
+ #endif
+ }
+
+diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
+index b6c2249..669e771 100644
+--- a/src/contacts-contact-sheet.vala
++++ b/src/contacts-contact-sheet.vala
+@@ -27,6 +27,7 @@ using Gee;
+ public class Contacts.ContactSheet : Grid {
+ private int last_row = 0;
+ private Individual individual;
++ private unowned Store store;
+ public bool narrow { get; set; default = true; }
+
+ private const string[] SORTED_PROPERTIES = {
+@@ -43,6 +44,7 @@ public class Contacts.ContactSheet : Grid {
+ public ContactSheet (Individual individual, Store store) {
+ Object (row_spacing: 12, column_spacing: 12);
+ this.individual = individual;
++ this.store = store;
+
+ this.individual.notify.connect (update);
+ this.individual.personas_changed.connect (update);
+@@ -242,7 +244,7 @@ public class Contacts.ContactSheet : Grid {
+ var type = im_persona.presence_type;
+ if (type != PresenceType.UNSET && type != PresenceType.ERROR &&
+ type != PresenceType.OFFLINE && type != PresenceType.UNKNOWN) {
+- Utils.start_chat (this.contact, protocol, id.value);
++ Utils.start_chat (this.individual, protocol, id.value);
+ }
+ }
+ });
+diff --git a/src/contacts-utils.vala b/src/contacts-utils.vala
+index 879c4a9..8f3b8c1 100644
+--- a/src/contacts-utils.vala
++++ b/src/contacts-utils.vala
+@@ -80,8 +80,8 @@ namespace Contacts.Utils {
+ }
+
+ #if HAVE_TELEPATHY
+- public void start_chat (Contact contact, string protocol, string id) {
+- var im_persona = contact.find_im_persona (protocol, id);
++ public void start_chat (Individual individual, string protocol, string id) {
++ var im_persona = Utils.find_im_persona (individual, protocol, id);
+ var account = (im_persona.store as Tpf.PersonaStore).account;
+ var request_dict = new HashTable<string, Value?>(str_hash, str_equal);
+ request_dict.insert (TelepathyGLib.PROP_CHANNEL_CHANNEL_TYPE,
+--
+2.27.0
+
diff --git a/gnome-extra/gnome-contacts/gnome-contacts-3.36.2.ebuild b/gnome-extra/gnome-contacts/gnome-contacts-3.36.2.ebuild
index 669b2a1ab433..372d51f30729 100644
--- a/gnome-extra/gnome-contacts/gnome-contacts-3.36.2.ebuild
+++ b/gnome-extra/gnome-contacts/gnome-contacts-3.36.2.ebuild
@@ -2,6 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+VALA_MIN_API_VERSION="0.40"
VALA_MAX_API_VERSION="0.48"
inherit gnome.org gnome2-utils meson vala xdg
@@ -48,6 +49,10 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}"/${PV}-fix-telepathy.patch
+)
+
src_prepare() {
xdg_src_prepare
vala_src_prepare