forked from pool/pidgin-sipe
Accepting request 99481 from GNOME:Apps
Fix build (forwarded request 99479 from vuntz) OBS-URL: https://build.opensuse.org/request/show/99481 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pidgin-sipe?expand=0&rev=26
This commit is contained in:
parent
28437daeff
commit
53c9555c5f
174
pidgin-sipe-no-deprecated.patch
Normal file
174
pidgin-sipe-no-deprecated.patch
Normal file
@ -0,0 +1,174 @@
|
||||
Patch is based on this commit:
|
||||
|
||||
From 7f339a653af14431afcac5a4435967ec24970616 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Becker <chemobejk@gmail.com>
|
||||
Date: Mon, 9 Jan 2012 11:20:22 +0200
|
||||
Subject: [PATCH] build: replace deprecated glib2 functions
|
||||
|
||||
In glib2 2.31 the following functions
|
||||
|
||||
g_strcasecmp()
|
||||
g_strncasecmp()
|
||||
|
||||
are marked with the GCC attribute "deprecated". In the upcoming GCC
|
||||
4.7.0 -Wdeprecated-declarations is enabled by default and therefore the
|
||||
build fails, e.g. for Fedora 17.
|
||||
|
||||
Replaced all occurences with g_ascii_str(n)casecmp().
|
||||
Added -Wdeprecated-declarations to the list of quality check flags.
|
||||
|
||||
Index: pidgin-sipe-1.12.0/src/core/sip-transport.c
|
||||
===================================================================
|
||||
--- pidgin-sipe-1.12.0.orig/src/core/sip-transport.c
|
||||
+++ pidgin-sipe-1.12.0/src/core/sip-transport.c
|
||||
@@ -308,12 +308,12 @@ static void fill_auth(const gchar *hdr,
|
||||
return;
|
||||
}
|
||||
|
||||
- if (!g_strncasecmp(hdr, "NTLM", 4)) {
|
||||
+ if (!g_ascii_strncasecmp(hdr, "NTLM", 4)) {
|
||||
SIPE_DEBUG_INFO_NOFORMAT("fill_auth: type NTLM");
|
||||
auth->type = AUTH_TYPE_NTLM;
|
||||
hdr += 5;
|
||||
auth->nc = 1;
|
||||
- } else if (!g_strncasecmp(hdr, "Kerberos", 8)) {
|
||||
+ } else if (!g_ascii_strncasecmp(hdr, "Kerberos", 8)) {
|
||||
SIPE_DEBUG_INFO_NOFORMAT("fill_auth: type Kerberos");
|
||||
auth->type = AUTH_TYPE_KERBEROS;
|
||||
hdr += 9;
|
||||
@@ -566,7 +566,7 @@ static struct transaction *transactions_
|
||||
key = g_strdup_printf("<%s><%s>", call_id, cseq);
|
||||
while (transactions) {
|
||||
struct transaction *trans = transactions->data;
|
||||
- if (!g_strcasecmp(trans->key, key)) {
|
||||
+ if (!g_ascii_strcasecmp(trans->key, key)) {
|
||||
g_free(key);
|
||||
return trans;
|
||||
}
|
||||
@@ -1113,7 +1113,7 @@ static gboolean process_register_respons
|
||||
{
|
||||
gchar *redirect = parse_from(sipmsg_find_header(msg, "Contact"));
|
||||
|
||||
- if (redirect && (g_strncasecmp("sip:", redirect, 4) == 0)) {
|
||||
+ if (redirect && (g_ascii_strncasecmp("sip:", redirect, 4) == 0)) {
|
||||
gchar **parts = g_strsplit(redirect + 4, ";", 0);
|
||||
gchar **tmp;
|
||||
gchar *hostname;
|
||||
@@ -1129,8 +1129,8 @@ static gboolean process_register_respons
|
||||
while (parts[i]) {
|
||||
tmp = g_strsplit(parts[i], "=", 0);
|
||||
if (tmp[1]) {
|
||||
- if (g_strcasecmp("transport", tmp[0]) == 0) {
|
||||
- if (g_strcasecmp("tcp", tmp[1]) == 0) {
|
||||
+ if (g_ascii_strcasecmp("transport", tmp[0]) == 0) {
|
||||
+ if (g_ascii_strcasecmp("tcp", tmp[1]) == 0) {
|
||||
transport = SIPE_TRANSPORT_TCP;
|
||||
}
|
||||
}
|
||||
Index: pidgin-sipe-1.12.0/src/core/sipe-chat.c
|
||||
===================================================================
|
||||
--- pidgin-sipe-1.12.0.orig/src/core/sipe-chat.c
|
||||
+++ pidgin-sipe-1.12.0/src/core/sipe-chat.c
|
||||
@@ -419,10 +419,10 @@ process_info_response(struct sipe_core_p
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- if (allow && !g_strcasecmp(allow, "true")) {
|
||||
+ if (allow && !g_ascii_strcasecmp(allow, "true")) {
|
||||
SIPE_DEBUG_INFO("process_info_response: %s has voted PRO", with);
|
||||
dialog->election_vote = 1;
|
||||
- } else if (allow && !g_strcasecmp(allow, "false")) {
|
||||
+ } else if (allow && !g_ascii_strcasecmp(allow, "false")) {
|
||||
SIPE_DEBUG_INFO("process_info_response: %s has voted CONTRA", with);
|
||||
dialog->election_vote = -1;
|
||||
}
|
||||
Index: pidgin-sipe-1.12.0/src/core/sipe-conf.c
|
||||
===================================================================
|
||||
--- pidgin-sipe-1.12.0.orig/src/core/sipe-conf.c
|
||||
+++ pidgin-sipe-1.12.0/src/core/sipe-conf.c
|
||||
@@ -1033,7 +1033,7 @@ sipe_process_conference(struct sipe_core
|
||||
if (!sipe_backend_chat_find(session->chat_session->backend, user_uri)) {
|
||||
sipe_backend_chat_add(session->chat_session->backend,
|
||||
user_uri,
|
||||
- !just_joined && g_strcasecmp(user_uri, self));
|
||||
+ !just_joined && g_ascii_strcasecmp(user_uri, self));
|
||||
}
|
||||
if (is_operator) {
|
||||
sipe_backend_chat_operator(session->chat_session->backend,
|
||||
Index: pidgin-sipe-1.12.0/src/core/sipe-incoming.c
|
||||
===================================================================
|
||||
--- pidgin-sipe-1.12.0.orig/src/core/sipe-incoming.c
|
||||
+++ pidgin-sipe-1.12.0/src/core/sipe-incoming.c
|
||||
@@ -94,7 +94,7 @@ void process_incoming_bye(struct sipe_co
|
||||
if (session->chat_session &&
|
||||
(session->chat_session->type == SIPE_CHAT_TYPE_MULTIPARTY) &&
|
||||
session->chat_session->id &&
|
||||
- !g_strcasecmp(from, session->chat_session->id))
|
||||
+ !g_ascii_strcasecmp(from, session->chat_session->id))
|
||||
sipe_chat_set_roster_manager(session, NULL);
|
||||
|
||||
sipe_im_cancel_unconfirmed(sipe_private, session, callid, from);
|
||||
@@ -104,7 +104,7 @@ void process_incoming_bye(struct sipe_co
|
||||
sipe_dialog_free(dialog);
|
||||
if (session->chat_session) {
|
||||
if ((session->chat_session->type == SIPE_CHAT_TYPE_CONFERENCE) &&
|
||||
- !g_strcasecmp(from, session->im_mcu_uri)) {
|
||||
+ !g_ascii_strcasecmp(from, session->im_mcu_uri)) {
|
||||
SIPE_DEBUG_INFO("process_incoming_bye: disconnected from conference %s",
|
||||
session->im_mcu_uri);
|
||||
sipe_conf_immcu_closed(sipe_private, session);
|
||||
@@ -417,7 +417,7 @@ void process_incoming_invite(struct sipe
|
||||
is_multiparty = TRUE;
|
||||
}
|
||||
}
|
||||
- if (trig_invite && !g_strcasecmp(trig_invite, "TRUE")) {
|
||||
+ if (trig_invite && !g_ascii_strcasecmp(trig_invite, "TRUE")) {
|
||||
is_multiparty = TRUE;
|
||||
}
|
||||
|
||||
@@ -479,8 +479,8 @@ void process_incoming_invite(struct sipe
|
||||
struct sipendpoint *end_point = entry->data;
|
||||
entry = entry->next;
|
||||
|
||||
- if (!g_strcasecmp(from, end_point->contact) ||
|
||||
- !g_strcasecmp(to, end_point->contact))
|
||||
+ if (!g_ascii_strcasecmp(from, end_point->contact) ||
|
||||
+ !g_ascii_strcasecmp(to, end_point->contact))
|
||||
continue;
|
||||
|
||||
dialog = sipe_dialog_find(session, end_point->contact);
|
||||
Index: pidgin-sipe-1.12.0/src/core/sipmsg.c
|
||||
===================================================================
|
||||
--- pidgin-sipe-1.12.0.orig/src/core/sipmsg.c
|
||||
+++ pidgin-sipe-1.12.0/src/core/sipmsg.c
|
||||
@@ -237,7 +237,7 @@ void sipmsg_strip_headers(struct sipmsg
|
||||
|
||||
elem = entry->data;
|
||||
while (keepers[i]) {
|
||||
- if (!g_strcasecmp(elem->name, keepers[i])) {
|
||||
+ if (!g_ascii_strcasecmp(elem->name, keepers[i])) {
|
||||
keeper = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -450,7 +450,7 @@ gchar *sipmsg_find_auth_header(struct si
|
||||
if (elem && elem->name &&
|
||||
(sipe_strcase_equal(elem->name,"WWW-Authenticate") ||
|
||||
sipe_strcase_equal(elem->name,"Authentication-Info")) ) {
|
||||
- if (!g_strncasecmp((gchar *)elem->value, name, name_len)) {
|
||||
+ if (!g_ascii_strncasecmp((gchar *)elem->value, name, name_len)) {
|
||||
/* SIPE_DEBUG_INFO("elem->value: %s", elem->value); */
|
||||
return elem->value;
|
||||
}
|
||||
Index: pidgin-sipe-1.12.0/src/core/sipe.c
|
||||
===================================================================
|
||||
--- pidgin-sipe-1.12.0.orig/src/core/sipe.c
|
||||
+++ pidgin-sipe-1.12.0/src/core/sipe.c
|
||||
@@ -5171,7 +5171,7 @@ static gboolean process_search_contact_r
|
||||
|
||||
if ((mrow = sipe_xml_child(searchResults, "Body/directorySearch/moreAvailable")) != NULL) {
|
||||
char *data = sipe_xml_data(mrow);
|
||||
- more = (g_strcasecmp(data, "true") == 0);
|
||||
+ more = (g_ascii_strcasecmp(data, "true") == 0);
|
||||
g_free(data);
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 9 13:07:06 UTC 2012 - vuntz@opensuse.org
|
||||
|
||||
- Add pidgin-sipe-no-deprecated.patch: do not use deprecated glib
|
||||
API, to fix build on Factory.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 2 10:00:33 UTC 2011 - vuntz@opensuse.org
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package pidgin-sipe
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -20,14 +20,16 @@
|
||||
|
||||
Name: pidgin-sipe
|
||||
Version: 1.12.0
|
||||
Release: 1
|
||||
Release: 0
|
||||
# FIXME: enable telepathy plugin when it'll be available (not in 1.11.0)
|
||||
# FIXME: enable kopete plugin when it'll be available (not in 1.11.0)
|
||||
License: GPL-2.0+
|
||||
Summary: Pidgin protocol plugin to connect to MS Office Communicator
|
||||
Url: http://sipe.sourceforge.net/
|
||||
License: GPL-2.0+
|
||||
Group: Productivity/Networking/Instant Messenger
|
||||
Url: http://sipe.sourceforge.net/
|
||||
Source: http://downloads.sourceforge.net/project/sipe/sipe/pidgin-sipe-1.12.0/%{name}-%{version}.tar.bz2
|
||||
# PATCH-FIX-UPSTREAM pidgin-sipe-no-deprecated.patch vuntz@opensuse.org -- Do not use deprecated glib API, based on patch from git
|
||||
Patch0: pidgin-sipe-no-deprecated.patch
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: glib2-devel >= 2.12.0
|
||||
%if 0%{?suse_version} > 1110
|
||||
@ -68,7 +70,6 @@ Communicator client with Pidgin.
|
||||
This package provides the icon set for Pidgin.
|
||||
|
||||
%package -n libpurple-plugin-sipe
|
||||
License: GPL-2.0+
|
||||
Summary: Libpurple third-party plugin for Microsoft LCS/OCS
|
||||
Group: Productivity/Networking/Instant Messenger
|
||||
Enhances: libpurple
|
||||
@ -85,7 +86,6 @@ It implements the extended version of SIP/SIMPLE used by various products:
|
||||
|
||||
%package -n telepathy-plugin-sipe
|
||||
|
||||
License: GPL-2.0+
|
||||
Summary: Microsoft LCS/OCS connection manager for Telepathy
|
||||
Group: Productivity/Networking/Instant Messenger
|
||||
|
||||
@ -102,6 +102,7 @@ various products:
|
||||
%prep
|
||||
%setup -q
|
||||
translation-update-upstream
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%{?env_options}
|
||||
|
Loading…
Reference in New Issue
Block a user