summaryrefslogtreecommitdiff
path: root/extra/pidgin
diff options
context:
space:
mode:
Diffstat (limited to 'extra/pidgin')
-rw-r--r--extra/pidgin/PKGBUILD26
-rw-r--r--extra/pidgin/nm09-more.patch49
-rw-r--r--extra/pidgin/nm09-pidgin.patch38
3 files changed, 106 insertions, 7 deletions
diff --git a/extra/pidgin/PKGBUILD b/extra/pidgin/PKGBUILD
index 814b4a97f..05883a1d8 100644
--- a/extra/pidgin/PKGBUILD
+++ b/extra/pidgin/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 123134 2011-05-08 21:15:31Z foutrelis $
+# $Id: PKGBUILD 124929 2011-05-25 09:33:46Z foutrelis $
# Maintainer: Evangelos Foutras <foutrelis@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
@@ -7,8 +7,8 @@
pkgname=('pidgin' 'libpurple' 'finch')
pkgver=2.7.11
-pkgrel=3
-arch=('i686' 'x86_64' 'mips64el')
+pkgrel=5
+arch=('i686' 'x86_64')
url="http://pidgin.im/"
license=('GPL')
makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
@@ -16,12 +16,22 @@ makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
'farsight2' 'avahi' 'tk' 'ca-certificates' 'intltool'
'networkmanager')
options=('!libtool')
-source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
-md5sums=('07c2a2535b4d7436b5ec7685fe063fec')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
+ nm09-pidgin.patch
+ nm09-more.patch)
+md5sums=('07c2a2535b4d7436b5ec7685fe063fec'
+ '744a21b4dbaf949dba7cd3b75b12b4fe'
+ 'a673659d86c7a65aa710f7c8c7feda82')
build() {
cd "$srcdir/$pkgname-$pkgver"
+ # Update for NetworkManager 0.9 connection states
+ # (http://developer.pidgin.im/ticket/13505)
+ # (http://developer.pidgin.im/ticket/13859)
+ patch -Np1 -i "$srcdir/nm09-pidgin.patch"
+ patch -Np1 -i "$srcdir/nm09-more.patch"
+
# Use Python 2
sed -i 's/env python$/\02/' */plugins/*.py \
libpurple/purple-{remote,notifications-example,url-handler}
@@ -51,7 +61,7 @@ package_pidgin(){
install=pidgin.install
cd "$srcdir/pidgin-$pkgver"
-
+
# For linking
make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
@@ -72,7 +82,7 @@ package_libpurple(){
'cyrus-sasl-plugins')
optdepends=('avahi: Bonjour protocol support'
'dbus-python: for purple-remote and purple-url-handler')
-
+
cd "$srcdir/pidgin-$pkgver"
for _dir in libpurple share/sounds share/ca-certs m4macros po; do
@@ -100,3 +110,5 @@ package_finch(){
rm "$pkgdir"/usr/share/man/man1/pidgin.1
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/extra/pidgin/nm09-more.patch b/extra/pidgin/nm09-more.patch
new file mode 100644
index 000000000..8c708df9a
--- /dev/null
+++ b/extra/pidgin/nm09-more.patch
@@ -0,0 +1,49 @@
+diff -up pidgin-2.7.11/libpurple/network.c.nm09more pidgin-2.7.11/libpurple/network.c
+--- pidgin-2.7.11/libpurple/network.c.nm09more 2011-04-26 12:01:27.700085246 -0500
++++ pidgin-2.7.11/libpurple/network.c 2011-05-24 13:13:28.185165657 -0500
+@@ -833,8 +833,20 @@ purple_network_is_available(void)
+ purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
+ }
+
+- if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
+- return TRUE;
++ switch (nm_state)
++ {
++ case NM_STATE_UNKNOWN:
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_CONNECTED_LOCAL:
++ case NM_STATE_CONNECTED_SITE:
++ case NM_STATE_CONNECTED_GLOBAL:
++#else
++ case NM_STATE_CONNECTED:
++#endif
++ return TRUE;
++ default:
++ break;
++ }
+
+ return FALSE;
+
+@@ -1170,9 +1182,14 @@ purple_network_init(void)
+ NM_DBUS_SERVICE,
+ NM_DBUS_PATH,
+ NM_DBUS_INTERFACE);
++ /* NM 0.6 signal */
+ dbus_g_proxy_add_signal(nm_proxy, "StateChange", G_TYPE_UINT, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal(nm_proxy, "StateChange",
+ G_CALLBACK(nm_state_change_cb), NULL, NULL);
++ /* NM 0.7 and later signal */
++ dbus_g_proxy_add_signal(nm_proxy, "StateChanged", G_TYPE_UINT, G_TYPE_INVALID);
++ dbus_g_proxy_connect_signal(nm_proxy, "StateChanged",
++ G_CALLBACK(nm_state_change_cb), NULL, NULL);
+
+ dbus_proxy = dbus_g_proxy_new_for_name(nm_conn,
+ DBUS_SERVICE_DBUS,
+@@ -1207,6 +1224,7 @@ purple_network_uninit(void)
+ #ifdef HAVE_NETWORKMANAGER
+ if (nm_proxy) {
+ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChange", G_CALLBACK(nm_state_change_cb), NULL);
++ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChanged", G_CALLBACK(nm_state_change_cb), NULL);
+ g_object_unref(G_OBJECT(nm_proxy));
+ }
+ if (dbus_proxy) {
diff --git a/extra/pidgin/nm09-pidgin.patch b/extra/pidgin/nm09-pidgin.patch
new file mode 100644
index 000000000..1c2471d1f
--- /dev/null
+++ b/extra/pidgin/nm09-pidgin.patch
@@ -0,0 +1,38 @@
+diff -up pidgin-2.7.10/libpurple/network.c.foo pidgin-2.7.10/libpurple/network.c
+--- pidgin-2.7.10/libpurple/network.c.foo 2011-03-10 02:21:43.920933267 -0600
++++ pidgin-2.7.10/libpurple/network.c 2011-03-10 02:23:11.466838793 -0600
+@@ -71,6 +71,10 @@
+ #include <dbus/dbus-glib.h>
+ #include <NetworkManager.h>
+
++#if !defined(NM_CHECK_VERSION)
++#define NM_CHECK_VERSION(x,y,z) 0
++#endif
++
+ static DBusGConnection *nm_conn = NULL;
+ static DBusGProxy *nm_proxy = NULL;
+ static DBusGProxy *dbus_proxy = NULL;
+@@ -863,7 +867,13 @@ nm_update_state(NMState state)
+
+ switch(state)
+ {
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_CONNECTED_LOCAL:
++ case NM_STATE_CONNECTED_SITE:
++ case NM_STATE_CONNECTED_GLOBAL:
++#else
+ case NM_STATE_CONNECTED:
++#endif
+ /* Call res_init in case DNS servers have changed */
+ res_init();
+ /* update STUN IP in case we it changed (theoretically we could
+@@ -880,6 +890,9 @@ nm_update_state(NMState state)
+ case NM_STATE_ASLEEP:
+ case NM_STATE_CONNECTING:
+ case NM_STATE_DISCONNECTED:
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_DISCONNECTING:
++#endif
+ if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)
+ break;
+ if (ui_ops != NULL && ui_ops->network_disconnected != NULL)