[claws-mail/f15/master] Build against NM 0.9

Christopher Aillon caillon at fedoraproject.org
Sun Mar 27 18:46:04 UTC 2011


commit 0c57963bd434a8f90a8add82c764ff21ddf04839
Author: Christopher Aillon <caillon at redhat.com>
Date:   Sun Mar 27 11:45:28 2011 -0700

    Build against NM 0.9

 claws-mail-3.7.8-nm09.patch |   57 +++++++++++++++++++++++++++++++++++++++++++
 claws-mail.spec             |    7 ++++-
 2 files changed, 63 insertions(+), 1 deletions(-)
---
diff --git a/claws-mail-3.7.8-nm09.patch b/claws-mail-3.7.8-nm09.patch
new file mode 100644
index 0000000..255307e
--- /dev/null
+++ b/claws-mail-3.7.8-nm09.patch
@@ -0,0 +1,57 @@
+http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2381
+
+Index: src/main.c
+===================================================================
+RCS file: //claws/src/main.c,v
+retrieving revision 1.115.2.234
+retrieving revision 1.115.2.235
+diff -u -r1.115.2.234 -r1.115.2.235
+--- src/main.c	23 Feb 2011 10:20:07 -0000	1.115.2.234
++++ src/main.c	15 Mar 2011 18:29:44 -0000	1.115.2.235
+@@ -160,6 +160,10 @@
+ static gboolean went_offline_nm;
+ #endif
+ 
++#if !defined(NM_CHECK_VERSION)
++#define NM_CHECK_VERSION(x,y,z) 0
++#endif
++
+ #ifdef HAVE_DBUS_GLIB
+ static DBusGProxy *awn_proxy = NULL;
+ #endif
+@@ -1139,10 +1143,17 @@
+ 			"/org/freedesktop/NetworkManager",
+ 			"org.freedesktop.NetworkManager");
+ 		if (nm_proxy) {
++#if NM_CHECK_VERSION(0,8,992)
++			dbus_g_proxy_add_signal(nm_proxy, "StateChanged", G_TYPE_UINT, G_TYPE_INVALID);
++			dbus_g_proxy_connect_signal(nm_proxy, "StateChanged",
++				G_CALLBACK(networkmanager_state_change_cb),
++				NULL,NULL);
++#else
+ 			dbus_g_proxy_add_signal(nm_proxy, "StateChange", G_TYPE_UINT, G_TYPE_INVALID);
+ 			dbus_g_proxy_connect_signal(nm_proxy, "StateChange",
+ 				G_CALLBACK(networkmanager_state_change_cb),
+ 				NULL,NULL);
++#endif
+ 		}
+ #endif
+ 		install_dbus_status_handler();
+@@ -2738,7 +2749,14 @@
+ 		g_propagate_error(error, tmp_error);
+ 		return TRUE;
+ 	}
+-
+-	return (state == NM_STATE_CONNECTED || state == NM_STATE_UNKNOWN);
++#if NM_CHECK_VERSION(0,8,992)
++    	return (state == NM_STATE_CONNECTED_LOCAL ||
++		state == NM_STATE_CONNECTED_SITE ||
++		state == NM_STATE_CONNECTED_GLOBAL ||
++		state == NM_STATE_UNKNOWN);
++#else
++    	return (state == NM_STATE_CONNECTED ||
++		state == NM_STATE_UNKNOWN);
++#endif
+ }
+ #endif
+
diff --git a/claws-mail.spec b/claws-mail.spec
index f30e783..e17b8ad 100644
--- a/claws-mail.spec
+++ b/claws-mail.spec
@@ -1,6 +1,6 @@
 Name:           claws-mail
 Version:        3.7.8
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        The extended version of Sylpheed
 Group:          Applications/Internet
 License:        GPLv3+
@@ -9,6 +9,7 @@ Source0:        http://downloads.sourceforge.net/sylpheed-claws/%{name}-%{versio
 # bugfixes
 # 661766 claws-mail-3.7.8cvs14
 Patch100:       %{name}-3.7.8-cvs14.patch
+Patch101:       %{name}-3.7.8-nm09.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires:  flex, bison
 BuildRequires:  glib2-devel >= 2.6.2
@@ -132,6 +133,7 @@ mails, verify signatures or sign and encrypt your own mails.
 %setup -q
 
 %patch100 -p1 -b.cvs14
+%patch101 -p0 -b.nm09
 
 %build
 %configure --enable-ipv6 \
@@ -241,6 +243,9 @@ touch -r NEWS ${RPM_BUILD_ROOT}%{_includedir}/%{name}/config.h
 %{_libdir}/claws-mail/plugins/smime.deps
 
 %changelog
+* Sun Mar 27 2011 Christopher Aillon <caillon at redhat.com> - 3.7.8-7
+- Rebuild against NetworkManager 0.9
+
 * Tue Feb 22 2011 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
 - 3.7.8-6
 - fix for possible mouse wheel problems (#661766)


More information about the scm-commits mailing list