summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2013-07-11 03:23:35 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2013-07-11 03:23:35 +0000
commit71f4ff443a1091ec75cf7cf4a1fe62ee484880fa (patch)
tree076f6cbfc99e9b483e3d7f40b80b41d0ee528ee4 /dev-libs/libxml2
parentVersion bump. (diff)
downloadgentoo-2-71f4ff443a1091ec75cf7cf4a1fe62ee484880fa.tar.gz
gentoo-2-71f4ff443a1091ec75cf7cf4a1fe62ee484880fa.tar.bz2
gentoo-2-71f4ff443a1091ec75cf7cf4a1fe62ee484880fa.zip
Version bump. Fixes denial-of-service vulnerability (bug #476438, CVE-2013-2877, thanks to Agostino Sarubbo). Drop old versions, except for 2.8.0-r3 which for some reason was the only revision keyworded stable on m68k.
(Portage version: 2.2.0_alpha188/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)
Diffstat (limited to 'dev-libs/libxml2')
-rw-r--r--dev-libs/libxml2/ChangeLog15
-rw-r--r--dev-libs/libxml2/files/libxml2-2.9.1-compression-detection.patch126
-rw-r--r--dev-libs/libxml2/files/libxml2-2.9.1-missing-break.patch25
-rw-r--r--dev-libs/libxml2/files/libxml2-2.9.1-non-ascii-cr-lf.patch168
-rw-r--r--dev-libs/libxml2/files/libxml2-2.9.1-python-2.6.patch32
-rw-r--r--dev-libs/libxml2/files/libxml2-2.9.1-python3.patch50
-rw-r--r--dev-libs/libxml2/libxml2-2.8.0-r3.ebuild6
-rw-r--r--dev-libs/libxml2/libxml2-2.8.0-r4.ebuild197
-rw-r--r--dev-libs/libxml2/libxml2-2.9.1.ebuild (renamed from dev-libs/libxml2/libxml2-2.9.0-r1.ebuild)33
9 files changed, 432 insertions, 220 deletions
diff --git a/dev-libs/libxml2/ChangeLog b/dev-libs/libxml2/ChangeLog
index cb237a4ead6d..46b79b42eb13 100644
--- a/dev-libs/libxml2/ChangeLog
+++ b/dev-libs/libxml2/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for dev-libs/libxml2
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.386 2013/06/09 22:57:04 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.387 2013/07/11 03:23:35 tetromino Exp $
+
+*libxml2-2.9.1 (11 Jul 2013)
+
+ 11 Jul 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
+ libxml2-2.8.0-r3.ebuild, -libxml2-2.8.0-r4.ebuild, -libxml2-2.9.0-r1.ebuild,
+ +libxml2-2.9.1.ebuild, +files/libxml2-2.9.1-compression-detection.patch,
+ +files/libxml2-2.9.1-missing-break.patch,
+ +files/libxml2-2.9.1-non-ascii-cr-lf.patch,
+ +files/libxml2-2.9.1-python-2.6.patch, +files/libxml2-2.9.1-python3.patch:
+ Version bump. Fixes denial-of-service vulnerability (bug #476438,
+ CVE-2013-2877, thanks to Agostino Sarubbo). Drop old versions, except for
+ 2.8.0-r3 which for some reason was the only revision keyworded stable on
+ m68k.
09 Jun 2013; Mike Frysinger <vapier@gentoo.org> metadata.xml:
Add upstream CPE tag (security info) from ChromiumOS.
diff --git a/dev-libs/libxml2/files/libxml2-2.9.1-compression-detection.patch b/dev-libs/libxml2/files/libxml2-2.9.1-compression-detection.patch
new file mode 100644
index 000000000000..16ea5c192703
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.9.1-compression-detection.patch
@@ -0,0 +1,126 @@
+From 63588f476f2dc89d4c6ef70a474d7230fbf4d45e Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Fri, 10 May 2013 14:01:46 +0800
+Subject: [PATCH] Fix a regression in xmlGetDocCompressMode()
+
+The switch to xzlib had for consequence that the compression
+level of the input was not gathered anymore in ctxt->input->buf,
+then the parser compression flags was left to -1 and propagated
+to the resulting document.
+Fix the I/O layer to get compression detection in xzlib,
+then carry it in the input buffer and the resulting document
+
+ This should fix
+ https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3456
+---
+ parser.c | 4 ++++
+ xmlIO.c | 17 +++++++++++++++++
+ xzlib.c | 25 +++++++++++++++++++++++++
+ xzlib.h | 1 +
+ 4 files changed, 47 insertions(+)
+
+diff --git a/parser.c b/parser.c
+index 1d478c3..4a442bb 100644
+--- a/parser.c
++++ b/parser.c
+@@ -10681,6 +10681,10 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
+ ctxt->sax->startDocument(ctxt->userData);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
++ if ((ctxt->myDoc != NULL) && (ctxt->input != NULL) &&
++ (ctxt->input->buf != NULL) && (ctxt->input->buf->compressed >= 0)) {
++ ctxt->myDoc->compression = ctxt->input->buf->compressed;
++ }
+
+ /*
+ * The Misc part of the Prolog
+diff --git a/xmlIO.c b/xmlIO.c
+index 847cb7e..fc4e111 100644
+--- a/xmlIO.c
++++ b/xmlIO.c
+@@ -2669,6 +2669,12 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
+ #endif
+ }
+ #endif
++#ifdef HAVE_LZMA_H
++ if ((xmlInputCallbackTable[i].opencallback == xmlXzfileOpen) &&
++ (strcmp(URI, "-") != 0)) {
++ ret->compressed = __libxml2_xzcompressed(context);
++ }
++#endif
+ }
+ else
+ xmlInputCallbackTable[i].closecallback (context);
+@@ -3325,6 +3331,17 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
+ if (res < 0) {
+ return(-1);
+ }
++
++ /*
++ * try to establish compressed status of input if not done already
++ */
++ if (in->compressed == -1) {
++#ifdef HAVE_LZMA_H
++ if (in->readcallback == xmlXzfileRead)
++ in->compressed = __libxml2_xzcompressed(in->context);
++#endif
++ }
++
+ len = res;
+ if (in->encoder != NULL) {
+ unsigned int use;
+diff --git a/xzlib.c b/xzlib.c
+index 928bd17..150e803 100644
+--- a/xzlib.c
++++ b/xzlib.c
+@@ -182,12 +182,37 @@ xz_open(const char *path, int fd, const char *mode ATTRIBUTE_UNUSED)
+ return (xzFile) state;
+ }
+
++static int
++xz_compressed(xzFile f) {
++ xz_statep state;
++
++ if (f == NULL)
++ return(-1);
++ state = (xz_statep) f;
++ if (state->init <= 0)
++ return(-1);
++
++ switch (state->how) {
++ case COPY:
++ return(0);
++ case GZIP:
++ case LZMA:
++ return(1);
++ }
++ return(-1);
++}
++
+ xzFile
+ __libxml2_xzopen(const char *path, const char *mode)
+ {
+ return xz_open(path, -1, mode);
+ }
+
++int
++__libxml2_xzcompressed(xzFile f) {
++ return xz_compressed(f);
++}
++
+ xzFile
+ __libxml2_xzdopen(int fd, const char *mode)
+ {
+diff --git a/xzlib.h b/xzlib.h
+index 43c75e1..29ba55e 100644
+--- a/xzlib.h
++++ b/xzlib.h
+@@ -15,4 +15,5 @@ xzFile __libxml2_xzopen(const char *path, const char *mode);
+ xzFile __libxml2_xzdopen(int fd, const char *mode);
+ int __libxml2_xzread(xzFile file, void *buf, unsigned len);
+ int __libxml2_xzclose(xzFile file);
++int __libxml2_xzcompressed(xzFile f);
+ #endif /* LIBXML2_XZLIB_H */
+--
+1.8.3.2
+
diff --git a/dev-libs/libxml2/files/libxml2-2.9.1-missing-break.patch b/dev-libs/libxml2/files/libxml2-2.9.1-missing-break.patch
new file mode 100644
index 000000000000..57665323892d
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.9.1-missing-break.patch
@@ -0,0 +1,25 @@
+From 10ec19ab0a49936ca8ca0d6962d24d3f889960a5 Mon Sep 17 00:00:00 2001
+From: dcb <dcb314@hotmail.com>
+Date: Thu, 2 May 2013 16:11:46 +0800
+Subject: [PATCH] Fix missing break on last() function for attributes
+
+pointed out by cppcheck
+---
+ python/libxml.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/python/libxml.c b/python/libxml.c
+index 03cfb9f..3338b83 100644
+--- a/python/libxml.c
++++ b/python/libxml.c
+@@ -2683,6 +2683,7 @@ libxml_last(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->last;
++ break;
+ }
+ default:
+ res = NULL;
+--
+1.8.3.2
+
diff --git a/dev-libs/libxml2/files/libxml2-2.9.1-non-ascii-cr-lf.patch b/dev-libs/libxml2/files/libxml2-2.9.1-non-ascii-cr-lf.patch
new file mode 100644
index 000000000000..51a92adaf9bc
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.9.1-non-ascii-cr-lf.patch
@@ -0,0 +1,168 @@
+From dcc19503193c71596278a252064a8ce66331b3cd Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Wed, 22 May 2013 22:56:45 +0200
+Subject: [PATCH] Fix a parsing bug on non-ascii element and CR/LF usage
+
+https://bugzilla.gnome.org/show_bug.cgi?id=698550
+
+Somehow the behaviour of the internal parser routine changed
+slightly when encountering CR/LF, which led to a bug when
+parsing document with non-ascii Names
+---
+ parser.c | 6 +++++-
+ result/japancrlf.xml | 4 ++++
+ result/japancrlf.xml.rde | 7 +++++++
+ result/japancrlf.xml.rdr | 7 +++++++
+ result/japancrlf.xml.sax | 11 +++++++++++
+ result/japancrlf.xml.sax2 | 11 +++++++++++
+ result/noent/japancrlf.xml | 4 ++++
+ test/japancrlf.xml | 6 ++++++
+ 8 files changed, 55 insertions(+), 1 deletion(-)
+ create mode 100644 result/japancrlf.xml
+ create mode 100644 result/japancrlf.xml.rde
+ create mode 100644 result/japancrlf.xml.rdr
+ create mode 100644 result/japancrlf.xml.sax
+ create mode 100644 result/japancrlf.xml.sax2
+ create mode 100644 result/noent/japancrlf.xml
+ create mode 100644 test/japancrlf.xml
+
+diff --git a/parser.c b/parser.c
+index 4a442bb..4739add 100644
+--- a/parser.c
++++ b/parser.c
+@@ -3404,6 +3404,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
+ int len = 0, l;
+ int c;
+ int count = 0;
++ const xmlChar *end; /* needed because CUR_CHAR() can move cur on \r\n */
+
+ #ifdef DEBUG
+ nbParseNCNameComplex++;
+@@ -3413,6 +3414,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
+ * Handler for more complex cases
+ */
+ GROW;
++ end = ctxt->input->cur;
+ c = CUR_CHAR(l);
+ if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
+ (!xmlIsNameStartChar(ctxt, c) || (c == ':'))) {
+@@ -3434,12 +3436,14 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
+ }
+ len += l;
+ NEXTL(l);
++ end = ctxt->input->cur;
+ c = CUR_CHAR(l);
+ if (c == 0) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
++ end = ctxt->input->cur;
+ c = CUR_CHAR(l);
+ }
+ }
+@@ -3448,7 +3452,7 @@ xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NCName");
+ return(NULL);
+ }
+- return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
++ return(xmlDictLookup(ctxt->dict, end - len, len));
+ }
+
+ /**
+diff --git a/result/japancrlf.xml b/result/japancrlf.xml
+new file mode 100644
+index 0000000..60b307c
+--- /dev/null
++++ b/result/japancrlf.xml
+@@ -0,0 +1,4 @@
++<?xml version="1.0"?>
++<入力メッセージ xmlns="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826">
++ <c8c:Ele xmlns:c8c="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826"/>
++</入力メッセージ>
+diff --git a/result/japancrlf.xml.rde b/result/japancrlf.xml.rde
+new file mode 100644
+index 0000000..0bc5af7
+--- /dev/null
++++ b/result/japancrlf.xml.rde
+@@ -0,0 +1,7 @@
++0 1 入力メッセージ 0 0
++1 14 #text 0 1
++
++1 1 c8c:Ele 1 0
++1 14 #text 0 1
++
++0 15 入力メッセージ 0 0
+diff --git a/result/japancrlf.xml.rdr b/result/japancrlf.xml.rdr
+new file mode 100644
+index 0000000..0bc5af7
+--- /dev/null
++++ b/result/japancrlf.xml.rdr
+@@ -0,0 +1,7 @@
++0 1 入力メッセージ 0 0
++1 14 #text 0 1
++
++1 1 c8c:Ele 1 0
++1 14 #text 0 1
++
++0 15 入力メッセージ 0 0
+diff --git a/result/japancrlf.xml.sax b/result/japancrlf.xml.sax
+new file mode 100644
+index 0000000..c3bbdc6
+--- /dev/null
++++ b/result/japancrlf.xml.sax
+@@ -0,0 +1,11 @@
++SAX.setDocumentLocator()
++SAX.startDocument()
++SAX.startElement(入力メッセージ, xmlns='http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826')
++SAX.characters(
++ , 2)
++SAX.startElement(c8c:Ele, xmlns:c8c='http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826')
++SAX.endElement(c8c:Ele)
++SAX.characters(
++, 1)
++SAX.endElement(入力メッセージ)
++SAX.endDocument()
+diff --git a/result/japancrlf.xml.sax2 b/result/japancrlf.xml.sax2
+new file mode 100644
+index 0000000..878eae4
+--- /dev/null
++++ b/result/japancrlf.xml.sax2
+@@ -0,0 +1,11 @@
++SAX.setDocumentLocator()
++SAX.startDocument()
++SAX.startElementNs(入力メッセージ, NULL, 'http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826', 1, xmlns='http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826', 0, 0)
++SAX.characters(
++ , 2)
++SAX.startElementNs(Ele, c8c, 'http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826', 1, xmlns:c8c='http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826', 0, 0)
++SAX.endElementNs(Ele, c8c, 'http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826')
++SAX.characters(
++, 1)
++SAX.endElementNs(入力メッセージ, NULL, 'http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826')
++SAX.endDocument()
+diff --git a/result/noent/japancrlf.xml b/result/noent/japancrlf.xml
+new file mode 100644
+index 0000000..60b307c
+--- /dev/null
++++ b/result/noent/japancrlf.xml
+@@ -0,0 +1,4 @@
++<?xml version="1.0"?>
++<入力メッセージ xmlns="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826">
++ <c8c:Ele xmlns:c8c="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826"/>
++</入力メッセージ>
+diff --git a/test/japancrlf.xml b/test/japancrlf.xml
+new file mode 100644
+index 0000000..480cb2d
+--- /dev/null
++++ b/test/japancrlf.xml
+@@ -0,0 +1,6 @@
++<入力メッセージ
++ xmlns="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826">
++ <c8c:Ele
++ xmlns:c8c="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826"
++ />
++</入力メッセージ>
+\ No newline at end of file
+--
+1.8.3.2
+
diff --git a/dev-libs/libxml2/files/libxml2-2.9.1-python-2.6.patch b/dev-libs/libxml2/files/libxml2-2.9.1-python-2.6.patch
new file mode 100644
index 000000000000..c79709db2824
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.9.1-python-2.6.patch
@@ -0,0 +1,32 @@
+From 722923bc9b788f028e4221c77138fc66735a3113 Mon Sep 17 00:00:00 2001
+From: Petr Sumbera <petr.sumbera@oracle.com>
+Date: Fri, 3 May 2013 22:25:38 +0800
+Subject: [PATCH] Fix for compilation with python 2.6.8
+
+Remap PyCapsule to PyCObject based on the macro being available
+instead of using the python version
+---
+ python/libxml_wrap.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/python/libxml_wrap.h b/python/libxml_wrap.h
+index a9b9739..53a0618 100644
+--- a/python/libxml_wrap.h
++++ b/python/libxml_wrap.h
+@@ -34,11 +34,11 @@
+ #define PyBytes_AsString PyString_AsString
+ #define PyBytes_AS_STRING PyString_AS_STRING
+ #define PyBytes_GET_SIZE PyString_GET_SIZE
+-
++#endif
++#ifndef PyCapsule_New
+ #define PyCapsule_New PyCObject_FromVoidPtrAndDesc
+ #define PyCapsule_CheckExact PyCObject_Check
+ #define PyCapsule_GetPointer(o, n) PyCObject_GetDesc((o))
+-
+ #endif
+ #endif
+
+--
+1.8.3.2
+
diff --git a/dev-libs/libxml2/files/libxml2-2.9.1-python3.patch b/dev-libs/libxml2/files/libxml2-2.9.1-python3.patch
new file mode 100644
index 000000000000..5c4e83da0c10
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.9.1-python3.patch
@@ -0,0 +1,50 @@
+From 927faac6113b625a9a3423eef8f144fc7d9a8547 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Wed, 10 Jul 2013 23:00:54 -0400
+Subject: [PATCH] python: fix drv_libxml2.py for python3 compatibility
+
+https://bugzilla.gnome.org/show_bug.cgi?id=703979
+---
+ python/drv_libxml2.py | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/python/drv_libxml2.py b/python/drv_libxml2.py
+index e43fb1d..c9075e6 100644
+--- a/python/drv_libxml2.py
++++ b/python/drv_libxml2.py
+@@ -34,12 +34,20 @@ TODO
+
+ """
+
+-__author__ = u"Stéphane Bidoul <sbi@skynet.be>"
++__author__ = "Stéphane Bidoul <sbi@skynet.be>"
+ __version__ = "0.3"
+
++import sys
+ import codecs
+-from types import StringType, UnicodeType
+-StringTypes = (StringType,UnicodeType)
++
++if sys.version < "3":
++ __author__ = codecs.unicode_escape_decode(__author__)[0]
++
++ from types import StringType, UnicodeType
++ StringTypes = (StringType,UnicodeType)
++
++else:
++ StringTypes = (str)
+
+ from xml.sax._exceptions import *
+ from xml.sax import xmlreader, saxutils
+@@ -65,7 +73,7 @@ def _d(s):
+
+ try:
+ import libxml2
+-except ImportError, e:
++except ImportError as e:
+ raise SAXReaderNotAvailable("libxml2 not available: " \
+ "import error was: %s" % e)
+
+--
+1.8.3.2
+
diff --git a/dev-libs/libxml2/libxml2-2.8.0-r3.ebuild b/dev-libs/libxml2/libxml2-2.8.0-r3.ebuild
index 1c1003031077..4904067c975d 100644
--- a/dev-libs/libxml2/libxml2-2.8.0-r3.ebuild
+++ b/dev-libs/libxml2/libxml2-2.8.0-r3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.8.0-r3.ebuild,v 1.9 2012/12/15 17:42:56 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.8.0-r3.ebuild,v 1.10 2013/07/11 03:23:35 tetromino Exp $
EAPI="4"
PYTHON_DEPEND="python? 2"
@@ -16,7 +16,7 @@ HOMEPAGE="http://www.xmlsoft.org/"
LICENSE="MIT"
SLOT="2"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+KEYWORDS="m68k"
IUSE="debug doc examples icu ipv6 lzma python readline static-libs test"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
diff --git a/dev-libs/libxml2/libxml2-2.8.0-r4.ebuild b/dev-libs/libxml2/libxml2-2.8.0-r4.ebuild
deleted file mode 100644
index a13d8a632b71..000000000000
--- a/dev-libs/libxml2/libxml2-2.8.0-r4.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.8.0-r4.ebuild,v 1.1 2012/12/18 07:48:21 tetromino Exp $
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_5,2_6,2_7} )
-PYTHON_REQ_USE="xml"
-
-inherit libtool flag-o-matic eutils python-r1 autotools prefix
-
-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 ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="debug examples icu ipv6 lzma python readline static-libs 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"
-XMLCONF_TARBALL="xmlts20080827.tar.gz"
-
-SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
- test? (
- ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
- ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
- http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )
- http://dev.gentoo.org/~tetromino/distfiles/${PN}/${P}-namespace-node-patches.tar.bz2"
-
-RDEPEND="sys-libs/zlib:=
- icu? ( dev-libs/icu:= )
- lzma? ( app-arch/xz-utils:= )
- python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:= )"
-
-DEPEND="${RDEPEND}
- dev-util/gtk-doc-am
- hppa? ( >=sys-devel/binutils-2.15.92.0.2 )"
-
-S="${WORKDIR}/${PN}-${PV%_rc*}"
-
-src_unpack() {
- # ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
- # as they are needed as tarballs in ${S}/xstc instead and not unpacked
- unpack ${P/_rc/-rc}.tar.gz
- unpack "${P}-namespace-node-patches.tar.bz2"
- cd "${S}"
-
- if use test; then
- cp "${DISTDIR}/${XSTS_TARBALL_1}" \
- "${DISTDIR}/${XSTS_TARBALL_2}" \
- "${S}"/xstc/ \
- || die "Failed to install test tarballs"
- unpack ${XMLCONF_TARBALL}
- fi
-}
-
-src_prepare() {
- # Patches needed for prefix support
- epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
- epatch "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch
-
- eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
-
- epunt_cxx
-
- epatch "${FILESDIR}/${PN}-2.7.8-disable_static_modules.patch"
-
- # Prevent linking to out-of-build-tree libxml2, bug #417539
- epatch "${FILESDIR}/${PN}-2.8.0-icu-linking.patch"
-
- # Namespace nodes require special treatment, bug #434344
- epatch ../patch/*.patch
-
- # Buffer underflow in xmlParseAttValueComplex, bug #444836; fixed in 2.9.1
- epatch "${FILESDIR}/${PN}-2.8.0-xmlParseAttValueComplex-underflow.patch"
-
- # Please do not remove, as else we get references to PORTAGE_TMPDIR
- # in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
- # We now need to run eautoreconf at the end to prevent maintainer mode.
-# elibtoolize
-
- # Python bindings are built/tested/installed manually.
- epatch "${FILESDIR}/${PN}-2.9.0-manual-python.patch"
-
- eautoreconf
-}
-
-src_configure() {
- # filter seemingly problematic CFLAGS (#26320)
- filter-flags -fprefetch-loop-arrays -funroll-loops
-
- # 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).
- econf \
- -with-html-subdir=${PF}/html \
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \
- $(use_with debug run-debug) \
- $(use_with icu) \
- $(use_with lzma) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with readline history) \
- $(use_enable ipv6) \
- $(use_enable static-libs static)
-}
-
-src_compile() {
- default
- if use python; then
- python_copy_sources
- python_foreach_impl libxml2_py_emake
- fi
-}
-
-src_test() {
- default
- use python && python_foreach_impl libxml2_py_emake test
-}
-
-src_install() {
- emake DESTDIR="${D}" \
- EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install
-
- # on windows, xmllint is installed by interix libxml2 in parent prefix.
- # this is the version to use. the native winnt version does not support
- # symlinks, which makes repoman fail if the portage tree is linked in
- # from another location (which is my default). -- mduft
- if [[ ${CHOST} == *-winnt* ]]; then
- rm -rf "${ED}"/usr/bin/xmllint
- rm -rf "${ED}"/usr/bin/xmlcatalog
- fi
-
- if use python; then
- python_foreach_impl libxml2_py_emake DESTDIR="${D}" \
- docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
- exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
- install
- python_foreach_impl python_optimize
- fi
-
- rm -rf "${ED}"/usr/share/doc/${P}
- dodoc AUTHORS ChangeLog Copyright NEWS README* TODO*
-
- if ! use python; then
- rm -rf "${ED}"/usr/share/doc/${PF}/python
- rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV}
- fi
-
- if ! use examples; then
- rm -rf "${ED}/usr/share/doc/${PF}/examples"
- rm -rf "${ED}/usr/share/doc/${PF}/python/examples"
- fi
-
- prune_libtool_files --modules
-}
-
-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="${EROOT}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 "${EROOT}etc/xml" ]] || mkdir -p "${EROOT}etc/xml"
- "${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}"
- einfo "Created XML catalog in ${CATALOG}"
- fi
- fi
-}
-
-libxml2_py_emake() {
- pushd "${BUILD_DIR}/python" > /dev/null || die
- emake \
- PYTHON="${PYTHON}" \
- PYTHON_INCLUDES="${EPREFIX}/usr/include/${EPYTHON}" \
- PYTHON_LIBS="$(python-config --ldflags)" \
- PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \
- pythondir="$(python_get_sitedir)" \
- PYTHON_VERSION=${EPYTHON/python} "$@"
- popd > /dev/null
-}
diff --git a/dev-libs/libxml2/libxml2-2.9.0-r1.ebuild b/dev-libs/libxml2/libxml2-2.9.1.ebuild
index 59046c3957fb..a9a9f4c1006a 100644
--- a/dev-libs/libxml2/libxml2-2.9.0-r1.ebuild
+++ b/dev-libs/libxml2/libxml2-2.9.1.ebuild
@@ -1,19 +1,19 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.9.0-r1.ebuild,v 1.1 2012/12/18 07:48:21 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.9.1.ebuild,v 1.1 2013/07/11 03:23:35 tetromino Exp $
EAPI="5"
-PYTHON_COMPAT=( python{2_5,2_6,2_7} )
+PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} )
PYTHON_REQ_USE="xml"
-inherit libtool flag-o-matic eutils python-r1 autotools prefix
+inherit libtool flag-o-matic eutils python-r1 autotools prefix versionator
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 ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="debug examples icu ipv6 lzma python readline static-libs test"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
@@ -63,20 +63,16 @@ src_prepare() {
eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
- epunt_cxx
+# epunt_cxx # if we don't eautoreconf
- epatch "${FILESDIR}/${PN}-2.9.0-disable_static_modules.patch"
+ # Important patches from 2.9.2
+ epatch "${FILESDIR}/${P}-missing-break.patch" \
+ "${FILESDIR}/${P}-python-2.6.patch" \
+ "${FILESDIR}/${P}-compression-detection.patch" \
+ "${FILESDIR}/${P}-non-ascii-cr-lf.patch"
- # Important patches from 2.9.1
- epatch "${FILESDIR}/${P}-rand_seed.patch" \
- "${FILESDIR}/${P}-thread-portability.patch" \
- "${FILESDIR}/${P}-streaming-validation.patch" \
- "${FILESDIR}/${P}-nsclean.patch" \
- "${FILESDIR}/${P}-large-file-parse.patch" \
- "${FILESDIR}/${P}-thread-alloc.patch"
-
- # Buffer underflow in xmlParseAttValueComplex, bug #444836; fixed in 2.9.1
- epatch "${FILESDIR}/${PN}-2.8.0-xmlParseAttValueComplex-underflow.patch"
+ # https://bugzilla.gnome.org/show_bug.cgi?id=703979
+ epatch "${FILESDIR}/${PN}-2.9.1-python3.patch"
# Please do not remove, as else we get references to PORTAGE_TMPDIR
# in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
@@ -191,7 +187,6 @@ libxml2_py_emake() {
PYTHON_INCLUDES="${EPREFIX}/usr/include/${EPYTHON}" \
PYTHON_LIBS="$(python-config --ldflags)" \
PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \
- pythondir="$(python_get_sitedir)" \
- PYTHON_VERSION=${EPYTHON/python} "$@"
+ pythondir="$(python_get_sitedir)" "$@"
popd > /dev/null
}