net-voip/telepathy-haze: Upstream patch to fix a crash, fix compat with latest pidgin...
authorPacho Ramos <pacho@gentoo.org>
Mon, 14 Mar 2016 19:36:04 +0000 (20:36 +0100)
committerPacho Ramos <pacho@gentoo.org>
Mon, 14 Mar 2016 19:36:38 +0000 (20:36 +0100)
Package-Manager: portage-2.2.28

net-voip/telepathy-haze/files/telepathy-haze-0.8.0-crash.patch [new file with mode: 0644]
net-voip/telepathy-haze/files/telepathy-haze-0.8.0-pidgin-2.10.12-compat.patch [new file with mode: 0644]
net-voip/telepathy-haze/telepathy-haze-0.8.0-r1.ebuild [new file with mode: 0644]

diff --git a/net-voip/telepathy-haze/files/telepathy-haze-0.8.0-crash.patch b/net-voip/telepathy-haze/files/telepathy-haze-0.8.0-crash.patch
new file mode 100644 (file)
index 0000000..2c480bb
--- /dev/null
@@ -0,0 +1,28 @@
+From 83589722731dde63118104f75c9ab89f66b21c21 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir@freedesktop.org>
+Date: Tue, 28 Apr 2015 19:13:39 +0200
+Subject: [PATCH] contact-list: Don't crash if a contact is already in the
+ roster
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47005
+---
+ src/contact-list.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/contact-list.c b/src/contact-list.c
+index fc46de8..710ed19 100644
+--- a/src/contact-list.c
++++ b/src/contact-list.c
+@@ -532,7 +532,8 @@ haze_contact_list_request_subscription (HazeContactList *self,
+   /* If the buddy already exists, then it should already be on the
+    * subscribe list.
+    */
+-  g_assert (purple_find_buddy (account, bname) == NULL);
++  if (purple_find_buddy (account, bname) != NULL)
++    return;
+   buddy = purple_buddy_new (account, bname, NULL);
+-- 
+2.1.0
+
diff --git a/net-voip/telepathy-haze/files/telepathy-haze-0.8.0-pidgin-2.10.12-compat.patch b/net-voip/telepathy-haze/files/telepathy-haze-0.8.0-pidgin-2.10.12-compat.patch
new file mode 100644 (file)
index 0000000..9785deb
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/src/media-stream.c
++++ b/src/media-stream.c
+@@ -23,6 +23,7 @@
+ #include "config.h"
+ #include "media-stream.h"
++#include <libpurple/version.h>
+ #include <libpurple/media/backend-iface.h>
+ #include <string.h>
+ #include <telepathy-glib/dbus.h>
+@@ -1076,7 +1077,11 @@ haze_media_stream_new_native_candidate (
+       if (proto == TP_MEDIA_STREAM_BASE_PROTO_UDP)
+         protocol = PURPLE_MEDIA_NETWORK_PROTOCOL_UDP;
+       else if (proto == TP_MEDIA_STREAM_BASE_PROTO_TCP)
++#if PURPLE_VERSION_CHECK (2, 10, 12)
++        protocol = PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE;
++#else
+         protocol = PURPLE_MEDIA_NETWORK_PROTOCOL_TCP;
++#endif
+       else
+         DEBUG ("Unknown network protocol");
diff --git a/net-voip/telepathy-haze/telepathy-haze-0.8.0-r1.ebuild b/net-voip/telepathy-haze/telepathy-haze-0.8.0-r1.ebuild
new file mode 100644 (file)
index 0000000..4ac17da
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1
+
+DESCRIPTION="Telepathy connection manager providing libpurple supported protocols"
+HOMEPAGE="http://developer.pidgin.im/wiki/TelepathyHaze"
+SRC_URI="http://telepathy.freedesktop.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+#IUSE="test"
+IUSE=""
+
+# Tests failing, see upstream: https://bugs.freedesktop.org/34577
+RESTRICT="test"
+
+RDEPEND="${PYTHON_DEPS}
+       >=net-im/pidgin-2.7
+       >=net-libs/telepathy-glib-0.15.1[${PYTHON_USEDEP}]
+       >=dev-libs/glib-2.30:2
+       >=dev-libs/dbus-glib-0.73
+"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+#      test? ( dev-python/twisted-words )"
+
+src_prepare() {
+       # contact-list: Don't crash if a contact is already in the roster
+       # (fixed in next version)
+       epatch "${FILESDIR}"/${P}-crash.patch
+
+       # Fix compat with newer pidgin versions, bug #572296
+       epatch "${FILESDIR}"/${P}-pidgin-2.10.12-compat.patch
+}