From 9bba9f1c380bc99a5509db86d12243fa64f2da08 Mon Sep 17 00:00:00 2001 From: Artur Frysiak Date: Sun, 28 Feb 2010 22:15:08 +0000 Subject: [PATCH] - from libxml2 Changed files: libxml2-amfix.patch -> 1.1 libxml2-zlib.patch -> 1.1 --- libxml2-amfix.patch | 73 +++++++++++++++++++++++++++++++++++++++++++++ libxml2-zlib.patch | 32 ++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 libxml2-amfix.patch create mode 100644 libxml2-zlib.patch diff --git a/libxml2-amfix.patch b/libxml2-amfix.patch new file mode 100644 index 0000000..d9f7ed6 --- /dev/null +++ b/libxml2-amfix.patch @@ -0,0 +1,73 @@ +diff -Nur libxml2-2.6.17.orig/Makefile.am libxml2-2.6.17/Makefile.am +--- libxml2-2.6.17.orig/Makefile.am 2005-01-11 10:17:08.000000000 +0100 ++++ libxml2-2.6.17/Makefile.am 2005-01-18 12:10:48.763861240 +0100 +@@ -4,7 +4,7 @@ + + DIST_SUBDIRS = include . doc example python xstc + +-INCLUDES = -I$(top_builddir)/include -I@srcdir@/include @THREAD_CFLAGS@ @Z_CFLAGS@ ++INCLUDES = -I$(top_builddir)/include -I$(srcdir)/include $(THREAD_CFLAGS) $(Z_CFLAGS) + + noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \ + testThreads testC14N testAutomata testRegexp \ +@@ -16,7 +16,7 @@ + bin_SCRIPTS=xml2-config + + lib_LTLIBRARIES = libxml2.la +-libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ ++libxml2_la_LIBADD = $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) + + if USE_VERSION_SCRIPT + LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms +@@ -24,10 +24,10 @@ + LIBXML2_VERSION_SCRIPT = + endif + +-libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ \ ++libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \ + $(LIBXML2_VERSION_SCRIPT) \ +- -version-info @LIBXML_VERSION_INFO@ \ +- @MODULE_PLATFORM_LIBS@ ++ -version-info $(LIBXML_VERSION_INFO) \ ++ $(MODULE_PLATFORM_LIBS) + + if WITH_TRIO_SOURCES + libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \ +@@ -41,7 +41,7 @@ + endif + + DEPS = $(top_builddir)/libxml2.la +-LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@ ++LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) + + + man_MANS = xml2-config.1 libxml.3 +@@ -52,7 +52,7 @@ + xmllint_SOURCES=xmllint.c + xmllint_LDFLAGS = + xmllint_DEPENDENCIES = $(DEPS) +-xmllint_LDADD= @RDL_LIBS@ $(LDADDS) ++xmllint_LDADD= $(RDL_LIBS) libxml2.la + + testSAX_SOURCES=testSAX.c + testSAX_LDFLAGS = +@@ -1031,8 +1031,6 @@ + + CLEANFILES=xml2Conf.sh + +-confexecdir=$(libdir) +-confexec_DATA = xml2Conf.sh + CVS_EXTRA_DIST= + EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \ + libxml.m4 Copyright check-xml-test-suite.py gentest.py \ +diff -Nur libxml2-2.6.17.orig/include/libxml/Makefile.am libxml2-2.6.17/include/libxml/Makefile.am +--- libxml2-2.6.17.orig/include/libxml/Makefile.am 2005-01-04 15:55:45.000000000 +0100 ++++ libxml2-2.6.17/include/libxml/Makefile.am 2005-01-18 12:08:45.978527448 +0100 +@@ -50,7 +50,4 @@ + pattern.h \ + xmlsave.h + +-install-exec-hook: +- $(mkinstalldirs) $(DESTDIR)$(xmlincdir) +- + EXTRA_DIST = xmlversion.h.in diff --git a/libxml2-zlib.patch b/libxml2-zlib.patch new file mode 100644 index 0000000..4bf486d --- /dev/null +++ b/libxml2-zlib.patch @@ -0,0 +1,32 @@ +From a7e79f28689c574e0bbef17f4cb3da00249181ff Mon Sep 17 00:00:00 2001 +From: Mark Adler +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 -- 2.43.0