aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2010-03-18 05:06:18 +0800
committerdelphij <delphij@FreeBSD.org>2010-03-18 05:06:18 +0800
commit39fc33c3cca127827993df1fc4fb704218e6c859 (patch)
tree7173ddf30177c0401afe247504d7575d3e214f3b /textproc
parentbb64a388819808caa68e2b0405198408fd45cbeb (diff)
downloadfreebsd-ports-gnome-39fc33c3cca127827993df1fc4fb704218e6c859.tar.gz
freebsd-ports-gnome-39fc33c3cca127827993df1fc4fb704218e6c859.tar.zst
freebsd-ports-gnome-39fc33c3cca127827993df1fc4fb704218e6c859.zip
libxml2 knows too much about zlib internals. Beginning from zlib 1.2.2.3
the zlib authors has provided a 'gzdirect' function to detect whether the current gzFile descriptor is still providing a stream from uncompression, so use it instead of rolling own. The upcoming zlib 1.2.4 update will break the current libxml2 usage. Patch was the same as Mark Adler provided to libxml2 maintainers at: http://osdir.com/ml/svn-commits-list/2010-01/msg05723.html PR: ports/144828 Approved by: mezz (freebsd-gnome@)
Diffstat (limited to 'textproc')
-rw-r--r--textproc/libxml2/Makefile2
-rw-r--r--textproc/libxml2/files/patch-xmlIO.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile
index e80dfa2224e6..32b45e3ca7e9 100644
--- a/textproc/libxml2/Makefile
+++ b/textproc/libxml2/Makefile
@@ -12,7 +12,7 @@
PORTNAME= libxml2
PORTVERSION= 2.7.6
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES?= textproc gnome
MASTER_SITES= ftp://fr.rpmfind.net/pub/libxml/ \
ftp://gd.tuwien.ac.at/pub/libxml/ \
diff --git a/textproc/libxml2/files/patch-xmlIO.c b/textproc/libxml2/files/patch-xmlIO.c
new file mode 100644
index 000000000000..6f765aefc9f9
--- /dev/null
+++ b/textproc/libxml2/files/patch-xmlIO.c
@@ -0,0 +1,20 @@
+--- ./xmlIO.c.orig 2009-09-24 08:32:00.000000000 -0700
++++ ./xmlIO.c 2010-03-17 12:35:00.957293884 -0700
+@@ -2518,6 +2518,9 @@
+ #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 @@
+ gzrewind(context);
+ }
+ }
++#endif
+ }
+ #endif
+ }