[arch-commits] Commit in libxml2/trunk (PKGBUILD zlib.patch)
Pierre Schmitz
pierre at archlinux.org
Sun Jan 24 13:19:40 UTC 2010
Date: Sunday, January 24, 2010 @ 08:19:39
Author: pierre
Revision: 65116
upgpkg: libxml2 2.7.6-2
fix crash with zlib
Added:
libxml2/trunk/zlib.patch
Modified:
libxml2/trunk/PKGBUILD
------------+
PKGBUILD | 8 +++++---
zlib.patch | 32 ++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-01-24 13:08:58 UTC (rev 65115)
+++ PKGBUILD 2010-01-24 13:19:39 UTC (rev 65116)
@@ -4,7 +4,7 @@
pkgname=libxml2
pkgver=2.7.6
-pkgrel=1
+pkgrel=2
pkgdesc="XML parsing library, version 2"
arch=(i686 x86_64)
license=('custom')
@@ -13,13 +13,15 @@
options=('!libtool')
url="http://www.xmlsoft.org/"
source=(ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz
- largefile64.patch)
+ largefile64.patch zlib.patch)
md5sums=('7740a8ec23878a2f50120e1faa2730f2'
- '5ad4915665608ebfa5b89f7908467a72')
+ '5ad4915665608ebfa5b89f7908467a72'
+ '0365d5397164b8739219e56e5ca069d1')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -Np1 -i "${srcdir}/largefile64.patch" || return 1
+ patch -p1 -i "${srcdir}/zlib.patch" || return 1
./configure --prefix=/usr --with-threads --with-history || return 1
make || return 1
make DESTDIR="${pkgdir}" install || return 1
Added: zlib.patch
===================================================================
--- zlib.patch (rev 0)
+++ zlib.patch 2010-01-24 13:19:39 UTC (rev 65116)
@@ -0,0 +1,32 @@
+From a7e79f28689c574e0bbef17f4cb3da00249181ff Mon Sep 17 00:00:00 2001
+From: Mark Adler <madler at alumni.caltech.edu>
+Date: Tue, 19 Jan 2010 15:28:48 +0000
+Subject: libxml violates the zlib interface and crashes
+
+* xmlIO.c: remove an abuse of zlib API and use a clean interface
+ available in zlib >= 1.2.3
+---
+diff --git a/xmlIO.c b/xmlIO.c
+index c03ac43..8fc00e3 100644
+--- a/xmlIO.c
++++ b/xmlIO.c
+@@ -2518,6 +2518,9 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
+ #ifdef HAVE_ZLIB_H
+ if ((xmlInputCallbackTable[i].opencallback == xmlGzfileOpen) &&
+ (strcmp(URI, "-") != 0)) {
++#if defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1230
++ ret->compressed = !gzdirect(context);
++#else
+ if (((z_stream *)context)->avail_in > 4) {
+ char *cptr, buff4[4];
+ cptr = (char *) ((z_stream *)context)->next_in;
+@@ -2529,6 +2532,7 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
+ gzrewind(context);
+ }
+ }
++#endif
+ }
+ #endif
+ }
+--
+cgit v0.8.3.1
More information about the arch-commits
mailing list