[perl-XML-LibXML/f17] Fix serialization on 64-bit big endian platforms

Petr Pisar ppisar at fedoraproject.org
Fri Aug 3 11:31:38 UTC 2012


commit 82fb5bd8aece71d25421b2dfdcd1b171937ef9d6
Author: Petr Písař <ppisar at redhat.com>
Date:   Fri Aug 3 13:11:20 2012 +0200

    Fix serialization on 64-bit big endian platforms

 XML-LibXML-1.90-64bit_big_endian.patch |   32 ++++++++++++++++++++++++++++++++
 perl-XML-LibXML.spec                   |    9 ++++++++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/XML-LibXML-1.90-64bit_big_endian.patch b/XML-LibXML-1.90-64bit_big_endian.patch
new file mode 100644
index 0000000..d23f2bb
--- /dev/null
+++ b/XML-LibXML-1.90-64bit_big_endian.patch
@@ -0,0 +1,32 @@
+Fix serialization on 64-bit bid endian platforms
+
+Ported to 1.90 from upstream commit:
+
+# HG changeset patch
+# User Shlomi Fish <shlomif at shlomifish.org>
+# Date 1338446967 -10800
+# Node ID 35fba7a70067f4f9393e26d9d478e761fe65b47d
+# Parent  0da8582cfa03ef4a4516374796acaf3c6d9d8c96
+Fix functionality on 64-bit big-endian platforms.
+
+https://rt.cpan.org/Ticket/Display.html?id=77340 .
+
+diff -r 0da8582cfa03ef4a4516374796acaf3c6d9d8c96 -r 35fba7a70067f4f9393e26d9d478e761fe65b47d LibXML.xs
+--- a/LibXML.xs	Thu May 31 09:04:34 2012 +0300
++++ b/LibXML.xs	Thu May 31 09:49:27 2012 +0300
+@@ -2930,13 +2930,13 @@
+        XML::LibXML::Document::serialize_html = 1
+     PREINIT:
+         xmlChar *result=NULL;
+-        STRLEN len = 0;
++        int len = 0;
+         PREINIT_SAVED_ERROR
+     CODE:
+         PERL_UNUSED_VAR(ix);
+         xs_warn( "use no formated toString!" );
+         INIT_ERROR_HANDLER;
+-        htmlDocDumpMemory(self, &result, (int*)&len);
++        htmlDocDumpMemory(self, &result, &len);
+         CLEANUP_ERROR_HANDLER;
+         REPORT_ERROR(0);
+ 
diff --git a/perl-XML-LibXML.spec b/perl-XML-LibXML.spec
index 4db8471..66f0354 100644
--- a/perl-XML-LibXML.spec
+++ b/perl-XML-LibXML.spec
@@ -4,7 +4,7 @@ Name:           perl-XML-LibXML
 # it might not be needed anymore
 # this module is maintained, the other is not
 Version:        1.90
-Release:        1%{?dist}
+Release:        2%{?dist}
 Epoch:          1
 Summary:        Perl interface to the libxml2 library
 
@@ -14,6 +14,9 @@ URL:            http://search.cpan.org/dist/XML-LibXML/
 
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 Source0:        http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/XML-LibXML-%{version}.tar.gz 
+# Fix serialization on 64-bit big endian platrorms, in 1.99, CPAN RT #77340,
+# RHBZ #845534
+Patch0:         XML-LibXML-1.90-64bit_big_endian.patch
 BuildRequires:  perl(XML::NamespaceSupport)
 BuildRequires:  perl(XML::SAX)
 BuildRequires:  perl(ExtUtils::MakeMaker), perl(Test::More)
@@ -31,6 +34,7 @@ validating XML parser and the high performance DOM implementation.
 
 %prep
 %setup -q -n XML-LibXML-%{version}
+%patch0 -p1
 
 for i in Changes; do
   /usr/bin/iconv -f iso8859-1 -t utf-8 $i > $i.conv && /bin/mv -f $i.conv $i
@@ -75,6 +79,9 @@ fi
 %{_mandir}/man3/*.3*
 
 %changelog
+* Fri Aug 03 2012 Petr Pisar <ppisar at redhat.com> - 1:1.90-2
+- Fix serialization on 64-bit big endian platforms (bug #845534)
+
 * Wed Jan 10 2012 Marcela Mašláňová <mmaslano at redhat.com> - 1:1.90-1
 - update to 1.90
 


More information about the scm-commits mailing list