also backport an upstream fix for build against latest libxml2

This commit is contained in:
Adam Williamson 2012-08-15 13:15:33 -07:00
parent c4d09a38f6
commit 5c67ec72e5
2 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,57 @@
From ff88d1f11176233438cace72da46a54c479495ab Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Mon, 13 Aug 2012 15:41:10 +0000
Subject: Bug 681321 - Support both old and new-buf libxml2 APIs
libxml2 changed the API for xmlOutputBuffer incompatibly.
See https://mail.gnome.org/archives/desktop-devel-list/2012-August/msg00004.html
---
diff --git a/modules/cal-config-caldav/e-caldav-chooser.c b/modules/cal-config-caldav/e-caldav-chooser.c
index 55143f0..fa5c9b7 100644
--- a/modules/cal-config-caldav/e-caldav-chooser.c
+++ b/modules/cal-config-caldav/e-caldav-chooser.c
@@ -111,6 +111,19 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (
E_TYPE_SOURCE_AUTHENTICATOR,
e_caldav_chooser_authenticator_init))
+static gconstpointer
+compat_libxml_output_buffer_get_content (xmlOutputBufferPtr buf,
+ gsize *out_len)
+{
+#ifdef LIBXML2_NEW_BUFFER
+ *out_len = xmlOutputBufferGetSize (buf);
+ return xmlOutputBufferGetContent (buf);
+#else
+ *out_len = buf->buffer->use;
+ return buf->buffer->content;
+#endif
+}
+
static void
context_cancel_message (GCancellable *cancellable,
Context *context)
@@ -203,6 +216,8 @@ caldav_chooser_new_propfind (SoupSession *session,
xmlNodePtr node;
xmlNsPtr ns;
xmlOutputBufferPtr output;
+ gconstpointer content;
+ gsize length;
gpointer key;
va_list va;
@@ -268,9 +283,11 @@ caldav_chooser_new_propfind (SoupSession *session,
xmlNodeDumpOutput (output, doc, root, 0, 1, NULL);
xmlOutputBufferFlush (output);
+ content = compat_libxml_output_buffer_get_content (output, &length);
+
soup_message_set_request (
message, "application/xml", SOUP_MEMORY_COPY,
- (gchar *) output->buffer->content, output->buffer->use);
+ content, length);
xmlOutputBufferClose (output);
--
cgit v0.9.0.2

View File

@ -53,6 +53,9 @@ Patch02: evolution-2.30.1-help-contents.patch
# commit ad93908, will be in Evo 3.5.90 - adamw # commit ad93908, will be in Evo 3.5.90 - adamw
Patch03: evolution-3.5.5-bgo678408.patch Patch03: evolution-3.5.5-bgo678408.patch
# Upstream ff88d1f11: fix build with new libxml2
Patch04: evolution-3.5.5-libxml2.patch
## Dependencies ### ## Dependencies ###
Requires: gnome-icon-theme >= %{gnome_icon_theme_version} Requires: gnome-icon-theme >= %{gnome_icon_theme_version}
@ -194,6 +197,7 @@ This package contains the plugin to import Microsoft Personal Storage Table
%patch01 -p1 -b .ldaphack %patch01 -p1 -b .ldaphack
%patch02 -p1 -b .help-contents %patch02 -p1 -b .help-contents
%patch03 -p1 -b .bgo678408 %patch03 -p1 -b .bgo678408
%patch04 -p1 -b .libxml2
mkdir -p krb5-fakeprefix/include mkdir -p krb5-fakeprefix/include
mkdir -p krb5-fakeprefix/lib mkdir -p krb5-fakeprefix/lib
@ -531,7 +535,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Wed Aug 15 2012 Adam Williamson <awilliam@redhat.com> - 3.5.5-2 * Wed Aug 15 2012 Adam Williamson <awilliam@redhat.com> - 3.5.5-2
- backport the fix for BGO #678408 - backport the fix for BGO #678408 and #681321 (libxml2 build)
* Mon Aug 06 2012 Milan Crha <mcrha@redhat.com> - 3.5.5-1 * Mon Aug 06 2012 Milan Crha <mcrha@redhat.com> - 3.5.5-1
- Update to 3.5.5 - Update to 3.5.5