rpms/pidgin/devel pidgin-2.5.7-glib2-compat.patch, NONE, 1.1 pidgin.spec, 1.74, 1.75

Warren Togami 砥上勇 wtogami at fedoraproject.org
Mon Jun 22 17:32:47 UTC 2009


Author: wtogami

Update of /cvs/pkgs/rpms/pidgin/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11215

Modified Files:
	pidgin.spec 
Added Files:
	pidgin-2.5.7-glib2-compat.patch 
Log Message:
glib2 compat with RHEL-4


pidgin-2.5.7-glib2-compat.patch:

--- NEW FILE pidgin-2.5.7-glib2-compat.patch ---
-----------------------------------------------------------------
Revision: e2bd07369c221038b091b908c8e07f0ae6179cd9
Ancestor: 73090755eac02937743e2c600c5fc83051f2eeac
Author: nosnilmot at pidgin.im
Date: 2009-06-21T17:30:13
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/yahoo/yahoo.c

ChangeLog: 

g_strv_length() is only available in glib2 2.6 and newer

============================================================
--- libpurple/protocols/yahoo/yahoo.c	9f36b37701756957da8074a7c6c19e73d00c6b03
+++ libpurple/protocols/yahoo/yahoo.c	ce8711a2c689ed8580964a51ad66ca548ef6faf0
@@ -1656,11 +1656,16 @@ static void yahoo_auth16_stage2(PurpleUt
 	}
 	else if (len > 0 && ret_data && *ret_data) {
 		gchar **split_data = g_strsplit(ret_data, "\r\n", -1);
-		int totalelements = g_strv_length(split_data);
+		int totalelements = 0;
 		int response_no = -1;
 		char *crumb = NULL;
 		char *crypt = NULL;
 
+#if GLIB_CHECK_VERSION(2,6,0)
+		totalelements = g_strv_length(split_data);
+#else
+		while (split_data[++totalelements] != NULL);	
+#endif
 		if (totalelements >= 5) {
 			response_no = strtol(split_data[1], NULL, 10);
 			crumb = g_strdup(split_data[2] + strlen("crumb="));
@@ -1738,10 +1743,15 @@ static void yahoo_auth16_stage1_cb(Purpl
 	}
 	else if (len > 0 && ret_data && *ret_data) {
 		gchar **split_data = g_strsplit(ret_data, "\r\n", -1);
-		int totalelements = g_strv_length(split_data);
+		int totalelements = 0;
 		int response_no = -1;
 		char *token = NULL;
 
+#if GLIB_CHECK_VERSION(2,6,0)
+		totalelements = g_strv_length(split_data);
+#else
+		while (split_data[++totalelements] != NULL);	
+#endif
 		if(totalelements >= 5) {
 			response_no = strtol(split_data[1], NULL, 10);
 			token = g_strdup(split_data[2] + strlen("ymsgr="));


Index: pidgin.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pidgin/devel/pidgin.spec,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -p -r1.74 -r1.75
--- pidgin.spec	21 Jun 2009 03:30:27 -0000	1.74
+++ pidgin.spec	22 Jun 2009 17:32:17 -0000	1.75
@@ -68,7 +68,7 @@
 
 Name:		pidgin
 Version:	2.5.7
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:        GPLv2+ and GPLv2 and MIT
 # GPLv2+ - libpurple, gnt, finch, pidgin, most prpls
 # GPLv2 - silc & novell prpls
@@ -103,6 +103,7 @@ Patch0: pidgin-NOT-UPSTREAM-2.5.3-reread
 Patch1: pidgin-NOT-UPSTREAM-2.5.2-rhel4-sound-migration.patch
 
 ## Patches 100+: To be Included in Future Upstream
+Patch100: pidgin-2.5.7-glib2-compat.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
 Summary:	A Gtk+ based multiprotocol instant messaging client
@@ -349,6 +350,7 @@ echo "FEDORA=%{fedora} RHEL=%{rhel}"
 %endif
 
 ## Patches 100+: To be Included in Future Upstream
+%patch100 -p0 -b .glibcompat
 
 # Our preferences
 cp %{SOURCE1} prefs.xml
@@ -585,6 +587,9 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Mon Jun 22 2009 Warren Togami <wtogami at redhat.com> 2.5.7-2
+- glib2 compat with RHEL-4
+
 * Sat Jun 20 2009 Warren Togami <wtogami at redhat.com> 2.5.7-1
 - 2.5.7 with Yahoo Protocol 16 support
 




More information about the fedora-extras-commits mailing list