summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2011-02-11 17:30:19 +0000
committerPacho Ramos <pacho@gentoo.org>2011-02-11 17:30:19 +0000
commit16075f2471e05b91112f26ffca3445451e3ce716 (patch)
treea90bdae206a66711b0230dcf12e1c0ce49332826 /dev-libs/libxml2
parentStable for HPPA (bug #353854). (diff)
downloadgentoo-2-16075f2471e05b91112f26ffca3445451e3ce716.tar.gz
gentoo-2-16075f2471e05b91112f26ffca3445451e3ce716.tar.bz2
gentoo-2-16075f2471e05b91112f26ffca3445451e3ce716.zip
Version bump including security fixes, bump to eapi3, remove old.
(Portage version: 2.1.9.39/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/libxml2')
-rw-r--r--dev-libs/libxml2/ChangeLog13
-rw-r--r--dev-libs/libxml2/files/libxml2-2.7.8-reactivate-script.patch21
-rw-r--r--dev-libs/libxml2/files/libxml2-2.7.8-xpath-freeing.patch32
-rw-r--r--dev-libs/libxml2/files/libxml2-2.7.8-xpath-freeing2.patch28
-rw-r--r--dev-libs/libxml2/files/libxml2-2.7.8-xpath-memory.patch29
-rw-r--r--dev-libs/libxml2/libxml2-2.7.8.ebuild (renamed from dev-libs/libxml2/libxml2-2.7.6.ebuild)131
6 files changed, 217 insertions, 37 deletions
diff --git a/dev-libs/libxml2/ChangeLog b/dev-libs/libxml2/ChangeLog
index a0ee88a4190c..a453920012e3 100644
--- a/dev-libs/libxml2/ChangeLog
+++ b/dev-libs/libxml2/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-libs/libxml2
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.295 2010/12/31 23:49:15 arfrever Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.296 2011/02/11 17:30:19 pacho Exp $
+
+*libxml2-2.7.8 (11 Feb 2011)
+
+ 11 Feb 2011; Pacho Ramos <pacho@gentoo.org> -libxml2-2.7.6.ebuild,
+ +libxml2-2.7.8.ebuild, +files/libxml2-2.7.8-reactivate-script.patch,
+ +files/libxml2-2.7.8-xpath-freeing.patch,
+ +files/libxml2-2.7.8-xpath-freeing2.patch,
+ +files/libxml2-2.7.8-xpath-memory.patch:
+ Version bump including security fixes, bump to eapi3, remove old.
31 Dec 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
libxml2-2.7.7.ebuild:
diff --git a/dev-libs/libxml2/files/libxml2-2.7.8-reactivate-script.patch b/dev-libs/libxml2/files/libxml2-2.7.8-reactivate-script.patch
new file mode 100644
index 000000000000..a0b62bca9851
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.7.8-reactivate-script.patch
@@ -0,0 +1,21 @@
+From 00819877651b87842ed878898ba17dba489820f0 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Thu, 04 Nov 2010 20:53:14 +0000
+Subject: Reactivate the shared library versionning script
+
+---
+diff --git a/configure.in b/configure.in
+index 59d0629..a1d2c89 100644
+--- a/configure.in
++++ b/configure.in
+@@ -84,7 +84,7 @@ else
+ esac
+ fi
+ AC_SUBST(VERSION_SCRIPT_FLAGS)
+-AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -z "$VERSION_SCRIPT_FLAGS"])
++AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"])
+
+ dnl
+ dnl We process the AC_ARG_WITH first so that later we can modify
+--
+cgit v0.8.3.1
diff --git a/dev-libs/libxml2/files/libxml2-2.7.8-xpath-freeing.patch b/dev-libs/libxml2/files/libxml2-2.7.8-xpath-freeing.patch
new file mode 100644
index 000000000000..3509a48daf57
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.7.8-xpath-freeing.patch
@@ -0,0 +1,32 @@
+From df83c17e5a2646bd923f75e5e507bc80d73c9722 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Wed, 17 Nov 2010 13:12:14 +0000
+Subject: Fix a potential freeing error in XPath
+
+---
+diff --git a/xpath.c b/xpath.c
+index 81e33f6..1447be5 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -11763,11 +11763,15 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt,
+
+ if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) {
+ xmlXPathObjectPtr tmp;
+- /* pop the result */
++ /* pop the result if any */
+ tmp = valuePop(ctxt);
+- xmlXPathReleaseObject(xpctxt, tmp);
+- /* then pop off contextObj, which will be freed later */
+- valuePop(ctxt);
++ if (tmp != contextObj)
++ /*
++ * Free up the result
++ * then pop off contextObj, which will be freed later
++ */
++ xmlXPathReleaseObject(xpctxt, tmp);
++ valuePop(ctxt);
+ goto evaluation_error;
+ }
+
+--
+cgit v0.8.3.1
diff --git a/dev-libs/libxml2/files/libxml2-2.7.8-xpath-freeing2.patch b/dev-libs/libxml2/files/libxml2-2.7.8-xpath-freeing2.patch
new file mode 100644
index 000000000000..17059418b2cc
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.7.8-xpath-freeing2.patch
@@ -0,0 +1,28 @@
+From fec31bcd452e77c10579467ca87a785b41115de6 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Thu, 18 Nov 2010 10:07:24 +0000
+Subject: Small fix for previous commit
+
+---
+diff --git a/xpath.c b/xpath.c
+index 1447be5..8b56189 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -11765,13 +11765,14 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr tmp;
+ /* pop the result if any */
+ tmp = valuePop(ctxt);
+- if (tmp != contextObj)
++ if (tmp != contextObj) {
+ /*
+ * Free up the result
+ * then pop off contextObj, which will be freed later
+ */
+ xmlXPathReleaseObject(xpctxt, tmp);
+ valuePop(ctxt);
++ }
+ goto evaluation_error;
+ }
+
+--
+cgit v0.8.3.1
diff --git a/dev-libs/libxml2/files/libxml2-2.7.8-xpath-memory.patch b/dev-libs/libxml2/files/libxml2-2.7.8-xpath-memory.patch
new file mode 100644
index 000000000000..f94350d277f5
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.7.8-xpath-memory.patch
@@ -0,0 +1,29 @@
+From 0cbeb50ee03ce582a0c979c70d8fbf030e270c37 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Mon, 15 Nov 2010 11:06:29 +0000
+Subject: Fix a potential memory access error
+
+in case of a previus allocation error
+---
+diff --git a/xpath.c b/xpath.c
+index 4d6826d..81e33f6 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -3575,13 +3575,13 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
+ } else if (cur->nodeNr == cur->nodeMax) {
+ xmlNodePtr *temp;
+
+- cur->nodeMax *= 2;
+- temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax *
++ temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * 2 *
+ sizeof(xmlNodePtr));
+ if (temp == NULL) {
+ xmlXPathErrMemory(NULL, "growing nodeset\n");
+ return;
+ }
++ cur->nodeMax *= 2;
+ cur->nodeTab = temp;
+ }
+ if (val->type == XML_NAMESPACE_DECL) {
+--
+cgit v0.8.3.1
diff --git a/dev-libs/libxml2/libxml2-2.7.6.ebuild b/dev-libs/libxml2/libxml2-2.7.8.ebuild
index 74857c8ea5be..df3402309614 100644
--- a/dev-libs/libxml2/libxml2-2.7.6.ebuild
+++ b/dev-libs/libxml2/libxml2-2.7.8.ebuild
@@ -1,18 +1,20 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.7.6.ebuild,v 1.9 2010/08/09 04:09:07 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.7.8.ebuild,v 1.1 2011/02/11 17:30:19 pacho Exp $
-EAPI="2"
+EAPI="3"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
-inherit libtool flag-o-matic eutils python
+inherit libtool flag-o-matic eutils python autotools
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 ~sparc-fbsd ~x86-fbsd"
-IUSE="debug doc examples ipv6 python readline test"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="debug doc examples icu ipv6 python readline test"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16"
@@ -26,12 +28,19 @@ SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} )"
RDEPEND="sys-libs/zlib
+ icu? ( dev-libs/icu )
python? ( || ( <dev-lang/python-3[xml] ( <dev-lang/python-3 dev-python/pyxml ) ) )
readline? ( sys-libs/readline )"
DEPEND="${RDEPEND}
hppa? ( >=sys-devel/binutils-2.15.92.0.2 )"
+pkg_setup() {
+ if use python; then
+ python_pkg_setup
+ fi
+}
+
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
@@ -48,6 +57,26 @@ src_unpack() {
src_prepare() {
epunt_cxx
+
+ # Reactivate the shared library versionning script
+ epatch "${FILESDIR}/${P}-reactivate-script.patch"
+
+ # Fix a potential memory access error
+ epatch "${FILESDIR}/${P}-xpath-memory.patch"
+
+ # Fix a potential freeing error in XPath
+ epatch "${FILESDIR}/${P}-xpath-freeing.patch"
+ epatch "${FILESDIR}/${P}-xpath-freeing2.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.
+ sed -e "s/@PYTHON_SUBDIR@//" -i Makefile.am || die "sed failed"
+
+ eautoreconf
}
src_configure() {
@@ -60,72 +89,102 @@ src_configure() {
# --with-mem-debug causes unusual segmentation faults (bug #105120).
- local myconf="--with-zlib \
- --with-html-subdir=${PF}/html \
- --docdir=/usr/share/doc/${PF} \
- $(use_with debug run-debug) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with readline history) \
- $(use_enable ipv6) \
- PYTHON_SITE_PACKAGES=$(python_get_sitedir)"
-
- # Please do not remove, as else we get references to PORTAGE_TMPDIR
- # in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
- elibtoolize
+ local myconf="--with-zlib
+ --with-html-subdir=${PF}/html
+ --docdir=/usr/share/doc/${PF}
+ $(use_with debug run-debug)
+ $(use_with icu)
+ $(use_with python)
+ $(use_with readline)
+ $(use_with readline history)
+ $(use_enable ipv6)"
# filter seemingly problematic CFLAGS (#26320)
filter-flags -fprefetch-loop-arrays -funroll-loops
- econf $myconf
+ econf ${myconf}
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ python_copy_sources python
+ building() {
+ emake PYTHON_INCLUDES="$(python_get_includedir)" \
+ PYTHON_SITE_PACKAGES="$(python_get_sitedir)"
+ }
+ python_execute_function -s --source-dir python building
+ fi
+}
+
+src_test() {
+ default
+
+ if use python; then
+ testing() {
+ emake test
+ }
+ python_execute_function -s --source-dir python testing
+ fi
}
src_install() {
emake DESTDIR="${D}" \
EXAMPLES_DIR=/usr/share/doc/${PF}/examples \
- docsdir=/usr/share/doc/${PF}/python \
- exampledir=/usr/share/doc/${PF}/python/examples \
install || die "Installation failed"
- rm -rf "${D}"/usr/share/doc/${P}
+ if use python; then
+ installation() {
+ emake DESTDIR="${D}" \
+ PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \
+ docsdir=/usr/share/doc/${PF}/python \
+ exampledir=/usr/share/doc/${PF}/python/examples \
+ install
+ }
+ python_execute_function -s --source-dir python installation
+
+ python_clean_installation_image
+ fi
+
+ rm -rf "${ED}"/usr/share/doc/${P}
dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* || die "dodoc failed"
if ! use python; then
- rm -rf "${D}"/usr/share/doc/${PF}/python
- rm -rf "${D}"/usr/share/doc/${PN}-python-${PV}
+ rm -rf "${ED}"/usr/share/doc/${PF}/python
+ rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV}
fi
if ! use doc; then
- rm -rf "${D}"/usr/share/gtk-doc
- rm -rf "${D}"/usr/share/doc/${PF}/html
+ rm -rf "${ED}"/usr/share/gtk-doc
+ rm -rf "${ED}"/usr/share/doc/${PF}/html
fi
if ! use examples; then
- rm -rf "${D}/usr/share/doc/${PF}/examples"
- rm -rf "${D}/usr/share/doc/${PF}/python/examples"
+ rm -rf "${ED}/usr/share/doc/${PF}/examples"
+ rm -rf "${ED}/usr/share/doc/${PF}/python/examples"
fi
}
pkg_postinst() {
if use python; then
- python_need_rebuild
- python_mod_optimize $(python_get_sitedir)
+ python_mod_optimize drv_libxml2.py libxml2.py
fi
# 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}" != "/" ]
+ if [ "${EROOT}" != "/" ]
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"
+ 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 "${ROOT}etc/xml" ] || mkdir -p "${ROOT}etc/xml"
+ [ -d "${EROOT}etc/xml" ] || mkdir -p "${EROOT}etc/xml"
/usr/bin/xmlcatalog --create > ${CATALOG}
einfo "Created XML catalog in ${CATALOG}"
fi
@@ -133,5 +192,7 @@ pkg_postinst() {
}
pkg_postrm() {
- python_mod_cleanup /usr/$(get_libdir)/python*/site-packages
+ if use python; then
+ python_mod_cleanup drv_libxml2.py libxml2.py
+ fi
}