diff options
author | Mart Raudsepp <leio@gentoo.org> | 2009-01-11 19:46:59 +0000 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2009-01-11 19:46:59 +0000 |
commit | 7dc7beb0a0bc43d25e109b925b8dd52959983d73 (patch) | |
tree | 675c5d23fbc97a698ce22e627c1206e02e4ea9bc /dev-libs/libxml2 | |
parent | include freebsd 7 support and make shared libs naming really the same as on l... (diff) | |
download | historical-7dc7beb0a0bc43d25e109b925b8dd52959983d73.tar.gz historical-7dc7beb0a0bc43d25e109b925b8dd52959983d73.tar.bz2 historical-7dc7beb0a0bc43d25e109b925b8dd52959983d73.zip |
Add a patch to allow a fix for bug 249703 - xml_parse_into_struct php function breakage. Also a few more patches from upstream while at it.
Package-Manager: portage-2.2_rc20/cvs/Linux 2.6.28-gentoo x86_64
Diffstat (limited to 'dev-libs/libxml2')
-rw-r--r-- | dev-libs/libxml2/ChangeLog | 14 | ||||
-rw-r--r-- | dev-libs/libxml2/Manifest | 6 | ||||
-rw-r--r-- | dev-libs/libxml2/files/libxml2-2.7.2-old-sax-parser-behaviour-option.patch | 109 | ||||
-rw-r--r-- | dev-libs/libxml2/files/libxml2-2.7.2-xmlAddChildList-pointer.patch | 50 | ||||
-rw-r--r-- | dev-libs/libxml2/files/libxml2-2.7.2-xmlTextWriterFullEndElement-indent.patch | 26 | ||||
-rw-r--r-- | dev-libs/libxml2/libxml2-2.7.2-r2.ebuild | 131 |
6 files changed, 333 insertions, 3 deletions
diff --git a/dev-libs/libxml2/ChangeLog b/dev-libs/libxml2/ChangeLog index 2b3f34ac7bee..be305884c49e 100644 --- a/dev-libs/libxml2/ChangeLog +++ b/dev-libs/libxml2/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for dev-libs/libxml2 -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.244 2008/12/23 04:56:02 robbat2 Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.245 2009/01/11 19:46:59 leio Exp $ + +*libxml2-2.7.2-r2 (11 Jan 2009) + + 11 Jan 2009; Mart Raudsepp <leio@gentoo.org> + +files/libxml2-2.7.2-old-sax-parser-behaviour-option.patch, + +files/libxml2-2.7.2-xmlAddChildList-pointer.patch, + +files/libxml2-2.7.2-xmlTextWriterFullEndElement-indent.patch, + +libxml2-2.7.2-r2.ebuild: + Add a patch to allow a fix for bug 249703 - xml_parse_into_struct php + function breakage. Also a few more patches from upstream while at it. 23 Dec 2008; Robin H. Johnson <robbat2@gentoo.org> +files/libxml2-2.6.32-CVE-2008-422x.patch, +libxml2-2.6.32-r1.ebuild: diff --git a/dev-libs/libxml2/Manifest b/dev-libs/libxml2/Manifest index 1007a9fcd8e7..dbd9cb15b9ce 100644 --- a/dev-libs/libxml2/Manifest +++ b/dev-libs/libxml2/Manifest @@ -1,6 +1,9 @@ AUX libxml2-2.6.30-CVE-2007-6284.patch 1666 RMD160 5622efd6e110cd9775061c6cb9a581a695221620 SHA1 d7621f294418b2e0a0de4511ac44104a5c0d1004 SHA256 355a7f82b1233fcf08c0071ecb82c314117768863b47f308a95ba7ed5f0760ad AUX libxml2-2.6.32-CVE-2008-422x.patch 3516 RMD160 fecb65ef5f146fa5a8b012332980bf09bbe93185 SHA1 ff26b80473e3459215296f09ca91165aca5ed47d SHA256 0b32ae59c07fd02a0907227615a92a93556d549fd919498e7cd95c28b9cc5895 AUX libxml2-2.7.2-CVE-2008-422x.patch 2983 RMD160 7453758b6b37d9f892d495fe9671551cdcc0cc3e SHA1 d8e6e917b8012f770d5f5a9e28a0651c45ad025f SHA256 5f836f30669410d496dc8ceee60307724b2a536a99ed710e94a3c5562634f8b6 +AUX libxml2-2.7.2-old-sax-parser-behaviour-option.patch 4109 RMD160 0ea5e04ea498561f9cd20d6fb319632a9c609695 SHA1 c0e164de5ef3d01fac1e06193a9566df777af59f SHA256 e4be8adbb81fe71b684c43751b4da2034a8850b4fbad2513db7a1f8732810690 +AUX libxml2-2.7.2-xmlAddChildList-pointer.patch 1523 RMD160 868436455c98d74666e6baf068b7c9d1b01cc16c SHA1 cc365e2e056fe0e07c9f61d8189d5fdcd0cef3df SHA256 131c9f3d5e5f970e14168d0086f31237d5aa166ef3021084457248094e3fc635 +AUX libxml2-2.7.2-xmlTextWriterFullEndElement-indent.patch 925 RMD160 b58a61553e6752ce7e94d40626ab584bdff934df SHA1 eaa3e9bad2d74169a46548e24c4d194d2d334f22 SHA256 d2d37dfb9448817fff4508a82a8cb2ebfb826ea2174982f3cf07725057cb9411 DIST libxml2-2.6.30.tar.gz 4726657 RMD160 8adcca2a60b4e90de898d9710a3a45069b73bbfe SHA1 519701df3a10770980e993336fe19ef7d95b5bba SHA256 877762a0f44785487d747ed7bd3db364ade75943e6d8e9c49fa6340c3833735e DIST libxml2-2.6.31.tar.gz 4734599 RMD160 de231ec47f14ace35c29cf59d650a5611fd6128a SHA1 97233a210425bad96b35e52aa3e0010ac11bbcc9 SHA256 3e7982341bbb1f11d5df344177955769e16b4d271f1f5c271740b3d1fad9bac6 DIST libxml2-2.6.32.tar.gz 4722227 RMD160 edb9c9a813ecb12eb214d1f75d927acb3814831c SHA1 1c465c0ef9d21bb4a7df02d4edfad7dfe1e263df SHA256 1b4428b879afcaae3c2013b21283baad040661fbd502e893e83adc3d15c85d53 @@ -15,6 +18,7 @@ EBUILD libxml2-2.6.32-r1.ebuild 3692 RMD160 10e12637f2a17109aeabba3cec677cde25c7 EBUILD libxml2-2.6.32.ebuild 3541 RMD160 6ce2b42e27b5767d40a4066c9dd9158149cd8aa5 SHA1 43b1080dfdf1e48766c03b8ed95face54695ee21 SHA256 61aec4d21f89f8351fb8f5ff6fbafdb5f483775a0ff5283bc31d703aee5178d1 EBUILD libxml2-2.7.1.ebuild 3539 RMD160 cdd320999fb9bb11acccc1dd3d320866aeba8ec4 SHA1 59e30edc8ddbb7ad6156ff52435ac43e3aab60c1 SHA256 c97933916b898ebd561e28405702eb5b1cb4067e7e8e5ddddb18b81908f06c51 EBUILD libxml2-2.7.2-r1.ebuild 3645 RMD160 bac4fb2270814132946ceb794215b9842a47e9eb SHA1 b89076f64b8ebfc1c16e3308f6fdc6dd4763ff28 SHA256 ebf2ef0905899e2a1062a0d5fb49e12e67204e24dfe55a6b1b9fdeddfd0f46c0 +EBUILD libxml2-2.7.2-r2.ebuild 3975 RMD160 71834ad581cce1d8030912c588a1c0e8c36484fa SHA1 f802bfd36352a53b6de2e0d72c8f2718aa2833d2 SHA256 72c32e33f0a62f809ca8cb936089df8340d7c3a87837d0bd2c5b9d71a4f875e0 EBUILD libxml2-2.7.2.ebuild 3539 RMD160 8d0d63f6e3132e56d7c7435a16e0d9046bb4c9a1 SHA1 df4650e26c67fda6792673b71ddade6a674484be SHA256 cee7aa96fa568623d1291dcf7cb0f8ce280a7552ae5a381d510ae2236a6d63dd -MISC ChangeLog 31954 RMD160 2092b7e9fe4561e002e3d8b08a16851ad163e6a9 SHA1 8fc15791bc9728492c12674b68cb6be4045a3526 SHA256 6e1d29575bbeda5f2f9d8e710b858f81d46cfdef6bb4c4e8091f54f725a12adb +MISC ChangeLog 32385 RMD160 bc6c18be18931dede992d0b19aec0739e15a7346 SHA1 079ed8fad58b8285ae599552c8049ca3e74ba7b4 SHA256 2fbc10c630cf8ae04cecaad91fba1466de49ca011d10e2172f010b18c0989a32 MISC metadata.xml 158 RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e SHA1 38f78e9790bcd4382b4a49aa226aa6dda1d3a3d7 SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1 diff --git a/dev-libs/libxml2/files/libxml2-2.7.2-old-sax-parser-behaviour-option.patch b/dev-libs/libxml2/files/libxml2-2.7.2-old-sax-parser-behaviour-option.patch new file mode 100644 index 000000000000..e7f601e3e991 --- /dev/null +++ b/dev-libs/libxml2/files/libxml2-2.7.2-old-sax-parser-behaviour-option.patch @@ -0,0 +1,109 @@ +Upstream SVN trunk revision 3807 + +This solves huge PHP problems in combination with a PHP patch using this +new xmlParserOption per gentoo bug #249703: + + +Mon Jan 05 18:28:41 CET 2009 Rob Richards + +* include/libxml/parser.h parser.c: add XML_PARSE_OLDSAX parser + option to enable pre 2.7 SAX behavior. + +diff --git a/include/libxml/parser.h b/include/libxml/parser.h +index 24d5cf9..01de128 100644 +--- a/include/libxml/parser.h ++++ b/include/libxml/parser.h +@@ -1096,7 +1096,8 @@ typedef enum { + crash if you try to modify the tree) */ + XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */ + XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */ +- XML_PARSE_HUGE = 1<<19 /* relax any hardcoded limit from the parser */ ++ XML_PARSE_HUGE = 1<<19, /* relax any hardcoded limit from the parser */ ++ XML_PARSE_OLDSAX = 1<<20 /* parse using SAX2 interface from before 2.7.0 */ + } xmlParserOption; + + XMLPUBFUN void XMLCALL +diff --git a/parser.c b/parser.c +index c52d360..9db664f 100644 +--- a/parser.c ++++ b/parser.c +@@ -7047,9 +7047,11 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { + /* + * Predefined entites override any extra definition + */ +- ent = xmlGetPredefinedEntity(name); +- if (ent != NULL) +- return(ent); ++ if ((ctxt->options & XML_PARSE_OLDSAX) == 0) { ++ ent = xmlGetPredefinedEntity(name); ++ if (ent != NULL) ++ return(ent); ++ } + + /* + * Increate the number of entity references parsed +@@ -7063,6 +7065,9 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { + if (ctxt->sax != NULL) { + if (ctxt->sax->getEntity != NULL) + ent = ctxt->sax->getEntity(ctxt->userData, name); ++ if ((ctxt->wellFormed == 1 ) && (ent == NULL) && ++ (ctxt->options & XML_PARSE_OLDSAX)) ++ ent = xmlGetPredefinedEntity(name); + if ((ctxt->wellFormed == 1 ) && (ent == NULL) && + (ctxt->userData==ctxt)) { + ent = xmlSAX2GetEntity(ctxt, name); +@@ -7135,6 +7140,7 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) { + */ + else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) && + (ent != NULL) && (ent->content != NULL) && ++ (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) && + (xmlStrchr(ent->content, '<'))) { + xmlFatalErrMsgStr(ctxt, XML_ERR_LT_IN_ATTRIBUTE, + "'<' in entity '%s' is not allowed in attributes values\n", name); +@@ -7231,11 +7237,13 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { + /* + * Predefined entites override any extra definition + */ +- ent = xmlGetPredefinedEntity(name); +- if (ent != NULL) { +- xmlFree(name); +- *str = ptr; +- return(ent); ++ if ((ctxt->options & XML_PARSE_OLDSAX) == 0) { ++ ent = xmlGetPredefinedEntity(name); ++ if (ent != NULL) { ++ xmlFree(name); ++ *str = ptr; ++ return(ent); ++ } + } + + /* +@@ -7250,6 +7258,8 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { + if (ctxt->sax != NULL) { + if (ctxt->sax->getEntity != NULL) + ent = ctxt->sax->getEntity(ctxt->userData, name); ++ if ((ent == NULL) && (ctxt->options & XML_PARSE_OLDSAX)) ++ ent = xmlGetPredefinedEntity(name); + if ((ent == NULL) && (ctxt->userData==ctxt)) { + ent = xmlSAX2GetEntity(ctxt, name); + } +@@ -7318,6 +7328,7 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { + */ + else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) && + (ent != NULL) && (ent->content != NULL) && ++ (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) && + (xmlStrchr(ent->content, '<'))) { + xmlFatalErrMsgStr(ctxt, XML_ERR_LT_IN_ATTRIBUTE, + "'<' in entity '%s' is not allowed in attributes values\n", +@@ -14211,6 +14222,10 @@ xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encodi + ctxt->options |= XML_PARSE_HUGE; + options -= XML_PARSE_HUGE; + } ++ if (options & XML_PARSE_OLDSAX) { ++ ctxt->options |= XML_PARSE_OLDSAX; ++ options -= XML_PARSE_OLDSAX; ++ } + ctxt->linenumbers = 1; + return (options); + } diff --git a/dev-libs/libxml2/files/libxml2-2.7.2-xmlAddChildList-pointer.patch b/dev-libs/libxml2/files/libxml2-2.7.2-xmlAddChildList-pointer.patch new file mode 100644 index 000000000000..a7f40d857b97 --- /dev/null +++ b/dev-libs/libxml2/files/libxml2-2.7.2-xmlAddChildList-pointer.patch @@ -0,0 +1,50 @@ +Upstream SVN trunk revision 3806 + +Wed Dec 31 23:11:37 CET 2008 Rob Richards + +* tree.c: set doc on last child tree in xmlAddChildList for + bug #546772. Fix problem adding an attribute via with xmlAddChild + reported by Kris Breuker. + +diff --git a/tree.c b/tree.c +index fe89dc4..8e393da 100644 +--- a/tree.c ++++ b/tree.c +@@ -3216,7 +3216,10 @@ xmlAddChildList(xmlNodePtr parent, xmlNodePtr cur) { + cur = cur->next; + } + cur->parent = parent; +- cur->doc = parent->doc; /* the parent may not be linked to a doc ! */ ++ /* the parent may not be linked to a doc ! */ ++ if (cur->doc != parent->doc) { ++ xmlSetTreeDoc(cur, parent->doc); ++ } + parent->last = cur; + + return(cur); +@@ -3309,9 +3312,7 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { + if (cur->type == XML_ATTRIBUTE_NODE) { + if (parent->type != XML_ELEMENT_NODE) + return(NULL); +- if (parent->properties == NULL) { +- parent->properties = (xmlAttrPtr) cur; +- } else { ++ if (parent->properties != NULL) { + /* check if an attribute with the same name exists */ + xmlAttrPtr lastattr; + +@@ -3326,8 +3327,13 @@ xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) { + } + if (lastattr == (xmlAttrPtr) cur) + return(cur); ++ ++ } ++ if (parent->properties == NULL) { ++ parent->properties = (xmlAttrPtr) cur; ++ } else { + /* find the end */ +- lastattr = parent->properties; ++ xmlAttrPtr lastattr = parent->properties; + while (lastattr->next != NULL) { + lastattr = lastattr->next; + } diff --git a/dev-libs/libxml2/files/libxml2-2.7.2-xmlTextWriterFullEndElement-indent.patch b/dev-libs/libxml2/files/libxml2-2.7.2-xmlTextWriterFullEndElement-indent.patch new file mode 100644 index 000000000000..0525c86ea7f9 --- /dev/null +++ b/dev-libs/libxml2/files/libxml2-2.7.2-xmlTextWriterFullEndElement-indent.patch @@ -0,0 +1,26 @@ +Upstream SVN trunk revision 3805 +Sun Dec 27 14:16:13 CET 2008 Rob Richards + +xmlwriter.c: fix indenting in xmlTextWriterFullEndElement for bug #554353. + +diff --git a/xmlwriter.c b/xmlwriter.c +index 69d4b85..b88de3a 100644 +--- a/xmlwriter.c ++++ b/xmlwriter.c +@@ -1240,8 +1240,16 @@ xmlTextWriterFullEndElement(xmlTextWriterPtr writer) + if (count < 0) + return -1; + sum += count; ++ if (writer->indent) ++ writer->doindent = 0; + /* fallthrough */ + case XML_TEXTWRITER_TEXT: ++ if ((writer->indent) && (writer->doindent)) { ++ count = xmlTextWriterWriteIndent(writer); ++ sum += count; ++ writer->doindent = 1; ++ } else ++ writer->doindent = 1; + count = xmlOutputBufferWriteString(writer->out, "</"); + if (count < 0) + return -1; diff --git a/dev-libs/libxml2/libxml2-2.7.2-r2.ebuild b/dev-libs/libxml2/libxml2-2.7.2-r2.ebuild new file mode 100644 index 000000000000..879ceb21dee6 --- /dev/null +++ b/dev-libs/libxml2/libxml2-2.7.2-r2.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.7.2-r2.ebuild,v 1.1 2009/01/11 19:46:59 leio Exp $ + +inherit libtool flag-o-matic eutils + +DESCRIPTION="Version 2 of the library to manipulate XML files" +HOMEPAGE="http://www.xmlsoft.org/" + +LICENSE="MIT" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="debug doc examples ipv6 python readline test" + +XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite" +XSTS_NAME_1="xmlschema2002-01-16" +XSTS_NAME_2="xmlschema2004-01-14" +XSTS_TARBALL_1="xsts-2002-01-16.tar.gz" +XSTS_TARBALL_2="xsts-2004-01-14.tar.gz" + +SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz + test? ( + ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} + ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} )" + +RDEPEND="sys-libs/zlib + python? ( dev-lang/python ) + readline? ( sys-libs/readline )" + +DEPEND="${RDEPEND} + hppa? ( >=sys-devel/binutils-2.15.92.0.2 )" + +src_unpack() { + unpack ${P}.tar.gz + cd "${S}" + + # Fix for CVE-2008-4225 and CVE-2008-4226, bug 245960 + epatch "${FILESDIR}/${P}-CVE-2008-422x.patch" + + # Few small patches from SVN (revisions 3805 and 3806) + epatch "${FILESDIR}/${P}-xmlTextWriterFullEndElement-indent.patch" + epatch "${FILESDIR}/${P}-xmlAddChildList-pointer.patch" + + # Fix possibility for PHP's xml_parse_into_struct function, bug 249703 + epatch "${FILESDIR}/${P}-old-sax-parser-behaviour-option.patch" + + if use test; then + cp "${DISTDIR}/${XSTS_TARBALL_1}" \ + "${DISTDIR}/${XSTS_TARBALL_2}" \ + "${S}"/xstc/ \ + || die "Failed to install test tarballs" + fi + + epunt_cxx +} + +src_compile() { + # USE zlib support breaks gnome2 + # (libgnomeprint for instance fails to compile with + # fresh install, and existing) - <azarah@gentoo.org> (22 Dec 2002). + + # The meaning of the 'debug' USE flag does not apply to the --with-debug + # switch (enabling the libxml2 debug module). See bug #100898. + + # --with-mem-debug causes unusual segmentation faults (bug #105120). + + local myconf="--with-zlib \ + $(use_with debug run-debug) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with readline history) \ + $(use_enable ipv6)" + + # Please do not remove, as else we get references to PORTAGE_TMPDIR + # in /usr/lib/python?.?/site-packages/libxml2mod.la among things. + elibtoolize + + # filter seemingly problematic CFLAGS (#26320) + filter-flags -fprefetch-loop-arrays -funroll-loops + + econf $myconf || die "Configuration failed" + + # Patching the Makefiles to respect get_libdir + # Fixes BUG #86766, please keep this. + # Danny van Dyk <kugelfang@gentoo.org> 2005/03/26 + for x in $(find "${S}" -name "Makefile") ; do + sed \ + -e "s|^\(PYTHON_SITE_PACKAGES\ =\ \/usr\/\).*\(\/python.*\)|\1$(get_libdir)\2|g" \ + -i ${x} \ + || die "sed failed" + done + + emake || die "Compilation failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "Installation failed" + + dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* + + if ! use doc; then + rm -rf "${D}"/usr/share/gtk-doc + rm -rf "${D}"/usr/share/doc/${P}/html + fi + + if ! use examples; then + rm -rf "${D}/usr/share/doc/${P}/examples" + rm -rf "${D}/usr/share/doc/${PN}-python-${PV}/examples" + fi +} + +pkg_postinst() { + # We don't want to do the xmlcatalog during stage1, as xmlcatalog will not + # be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887. + if [[ "${ROOT}" != "/" ]] + then + elog "Skipping XML catalog creation for stage building (bug #208887)." + else + # need an XML catalog, so no-one writes to a non-existent one + CATALOG="${ROOT}etc/xml/catalog" + + # we dont want to clobber an existing catalog though, + # only ensure that one is there + # <obz@gentoo.org> + if [ ! -e ${CATALOG} ]; then + [ -d "${ROOT}etc/xml" ] || mkdir -p "${ROOT}etc/xml" + /usr/bin/xmlcatalog --create > ${CATALOG} + einfo "Created XML catalog in ${CATALOG}" + fi + fi +} |