summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2014-05-08 15:40:30 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2014-05-08 15:40:30 +0000
commite177d69c0fb0a76006890bd3040b99ffa7be84c1 (patch)
tree5d2ff0e0440144a9bc58727eedc13fb391e5c919 /dev-libs/libxml2
parentRevision bump, thorough review to use java-pkg-2 and fix up common mistakes; ... (diff)
downloadhistorical-e177d69c0fb0a76006890bd3040b99ffa7be84c1.tar.gz
historical-e177d69c0fb0a76006890bd3040b99ffa7be84c1.tar.bz2
historical-e177d69c0fb0a76006890bd3040b99ffa7be84c1.zip
Fix denial of service vulnerability (CVE-2014-0191, bug #509834, thanks to Agostino Sarubbo). Enable support for Python 3.4. Modernize python build as suggested by Michał Górny.
Package-Manager: portage-2.2.10/cvs/Linux x86_64 Manifest-Sign-Key: 0xCF0ADD61
Diffstat (limited to 'dev-libs/libxml2')
-rw-r--r--dev-libs/libxml2/ChangeLog10
-rw-r--r--dev-libs/libxml2/Manifest26
-rw-r--r--dev-libs/libxml2/files/libxml2-2.9.1-external-param-entities.patch39
-rw-r--r--dev-libs/libxml2/libxml2-2.9.1-r3.ebuild210
4 files changed, 268 insertions, 17 deletions
diff --git a/dev-libs/libxml2/ChangeLog b/dev-libs/libxml2/ChangeLog
index 36e0047d1de1..4a14d2cc5798 100644
--- a/dev-libs/libxml2/ChangeLog
+++ b/dev-libs/libxml2/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-libs/libxml2
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.410 2014/04/28 17:38:51 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.411 2014/05/08 15:40:25 tetromino Exp $
+
+*libxml2-2.9.1-r3 (08 May 2014)
+
+ 08 May 2014; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +libxml2-2.9.1-r3.ebuild, +files/libxml2-2.9.1-external-param-entities.patch:
+ Fix denial of service vulnerability (CVE-2014-0191, bug #509834, thanks to
+ Agostino Sarubbo). Enable support for Python 3.4. Modernize python build as
+ suggested by Michał Górny.
28 Apr 2014; Michał Górny <mgorny@gentoo.org> libxml2-2.9.1-r2.ebuild:
Replace multilib_build_binaries with multilib_is_native_abi. The two are
diff --git a/dev-libs/libxml2/Manifest b/dev-libs/libxml2/Manifest
index 492d6f870e6a..b4aa3a2f1f94 100644
--- a/dev-libs/libxml2/Manifest
+++ b/dev-libs/libxml2/Manifest
@@ -6,6 +6,7 @@ AUX libxml2-2.8.0_rc1-winnt.patch 2392 SHA256 c18b2c15550b3ff4709a85cd18d1636892
AUX libxml2-2.9.0-manual-python.patch 1409 SHA256 647023249861bece60c719c49421a539342ab11a9c9023ee3175e29faaa24974 SHA512 1e06c52c729752d5bb72ac57ec0aa5c384eed49f79d38088eb9514c0a15c0f433309cd60ebfabbe75bf6166d93d1c7eb2a5ba6fd44a18bea8583590fdbcb3f11 WHIRLPOOL ec9653cab65af8833fef1264fe96ceeb8863047a3f699b8e69afbe8e5e47ef50e4e589a62d305d58352f560507cb606e45e1be5603b3b3758474fa192bb51506
AUX libxml2-2.9.0-thread-alloc.patch 1819 SHA256 ab0e44f05903ea70babeff17aaac09f344c9ce069264ecb4f27f9a6929c6af73 SHA512 80308f3f0087bcc0f08848e10c75b6333247f960190940e7a20575ce41d382fbd46350b0b8631a6c877f8edb06bcc930659c9e9e8ea71bc381f0a4287c22c935 WHIRLPOOL 24c4ba69c70ff949848795418cbfe59326c09a0b90126c67853fe7ee39854a824c56e092e7dacfe6a969eb4d451e6d2354c382c03e6d5c657eab07a50c14babe
AUX libxml2-2.9.1-compression-detection.patch 3415 SHA256 02497f74371338b681e372b3fa6cdb3d24aa675caaa7a2e50fcf9bb117f29951 SHA512 28e1b914d60dea06d72de0523d289a4dca82ab3c505d796a223880fecebe22578369400a31f5d0f6ac02375e171ccb96368c0eb06ddaa67d9be377fc37c03357 WHIRLPOOL ca3eddb2ae8cdd088bb6b6a62c697a56d149a1134b892d2108d20baed4f4d951b8709604ac9d1b6cb8d6371a41b730c01e295de463242c6986401e25b518e622
+AUX libxml2-2.9.1-external-param-entities.patch 1374 SHA256 4066788b3c1b3be48ff8e79c35096c9cbe9c08d1da8d74d75d2a5992ba27a764 SHA512 020ba4c532776e09f4e2084419a532c75f4545235c080af9ffa9934703b6485fa32156ae7b287e13c219a47c6ce01a13298c448d8d61d905b5446d5cef1c4e5a WHIRLPOOL 661ca93431638c1025e56513e63ffa146a5fb9c9c48b11445e034e344cfe223bc03123b90a90b552cee005ce1fde82949f279cf5f96e9cfe85a74e5c506086b8
AUX libxml2-2.9.1-icu-pkgconfig.patch 653 SHA256 e4a02666bd25e0771dcfa75edd4b22c4d2035c4c47f47f29f30b925a58bc38f7 SHA512 3d63f1f19b06a3edc92024e6b057a9d6c47274659ebebe59d20bc8e2fb62c902f19b1407aeb0903fa618aff4f43093997621dfc05dfef780df65db7d6bc2c44d WHIRLPOOL 28502cbd819bb6aedce3059ae6482cefab895053ff5dbf0d79aeb69663c77ffd38bee18a07a0e67d92424c32b6911089ba877c7a68b5badd91a321fe59dc59f5
AUX libxml2-2.9.1-missing-break.patch 670 SHA256 98681d90b279174160e8bd3901f468544a7956d163c86473a60756be05191bad SHA512 2efee76fffd0da39e197b9a51bcc3925323ae4e1e861f55daec9ae7872166b24ed207970ef8573d306c267215f1ddf5439b45f2cb6b6d308bf749b22accf5c97 WHIRLPOOL f51d55103ad2060c883091e23554e5d70724fa4b2a58767b6d15143f447f445aa09df1ad7ac022f84d53f5339478e4f9ab8624918ab61f44402e6f59b2a7785e
AUX libxml2-2.9.1-non-ascii-cr-lf.patch 5842 SHA256 1613e564814437ab1ddc28cb468cdebaff7e46587b364a4a6c7904c7b8da78b9 SHA512 1db9a31c1457e5ca6cb4397eb898a93e8985f1c73a5e213cbc1b70bc569fcef08c77af2f9123ed5b814903acda6cdf2e8b38434c81665f4456c8de4adb9345eb WHIRLPOOL adf9bb6dbff21494439589dc4f7b41d0719e0905811acc6719f637deffc0257f5aaf82534b8bf7761793a4ab7ecb12232a3de9d86c01391e6137043dbda22678
@@ -18,24 +19,17 @@ DIST xsts-2002-01-16.tar.gz 6894439 SHA256 55e5c08db29946a91ea8e70e8f2418d3fd30d
DIST xsts-2004-01-14.tar.gz 2761085 SHA256 09bdf9f81f381ebf9bc158a9472e498e896f7a02eb7461146e9abe1b9493ca17 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe WHIRLPOOL c46a3bf7d6dd771757f4304995cc177cf51c6cdd0e9778851fc13d3809c7b984690b4f273b3e075abe018110968eb7fc78f5b83170d3e18bacf00a4ed64b213d
EBUILD libxml2-2.9.1-r1.ebuild 6040 SHA256 9b36696b19c36c18dfb34407a7d32ff3c39ffbc39b2b06576d6297b44b5bb334 SHA512 3728dadc2f9e414a5bbddf05b5184dbcee7eace6c74ab371eeb9302a8d4e9393814de43e79e16e4f38edda19093fc15019946fa262b1245973a2b8d106fcb6bd WHIRLPOOL 7f8056d104f1fa63bb4b64292a1f08f2519b03a265e5c27069073f3db9ff2d205dcc3396adfe8f15537fd12e073418af85280c9ba7f4ca78230bac0bc32a9935
EBUILD libxml2-2.9.1-r2.ebuild 6753 SHA256 33cb681c3da5f1a8da6a7be8e0f603bea336e5adf65a6a224646b722b7fdcb81 SHA512 c6a54baf99e412aea032fc89c30d6cc85e84190bd87098091646d75bc413cb8090e8aa1876f4415438e8735111141ffa84f4f5d92f052eb1df2d73f79a9965bb WHIRLPOOL e032b132dda65deede1ecf652fef5156163e16fdf56b003ce8fac43c55396bc366e3f466ddeadff084efea76be542863a4bc5de2501df279a685537e2da471ca
-MISC ChangeLog 58868 SHA256 a1dbae1494be14a8944e6a12dabb7d38e5a9b36f2c0824ba280340687c044adf SHA512 eac9f4189d53d9f378685b319644a338e6369d653390c412c01d6c8c037f51149f40549b828961e39ec9840bdd7c478041b167e8cf2d7b51ea8aa86167913f9c WHIRLPOOL 84bda8071bd0ef4fbd8199ffcdf3a79ad23c6ddc9cc56cb1bd5de1fbb7f86bd469861c1138a7d08a06323ae3bca6e1dcd7a990054c537dc6f4bc6ae8dd897281
+EBUILD libxml2-2.9.1-r3.ebuild 6715 SHA256 26d0fa2039c3e980dbded6440d814dee37c88989674537c64ce910f131979efb SHA512 b35b51bba4b46fd79d764636fdcbbed9843fac9d02dcc13335937a16fc8feccc54726c3dddf2fdd41df76fa423f1d3a4818f4b81d0bd4f510e3cafdbf382c412 WHIRLPOOL c34645a234648d918ec2b6cc56a2c13d2ab94315063b6e603df2a25df44bc491f5fab6d56ab5964dff1aa600908d915cccf311a93c4e5d5393e630c534e6db91
+MISC ChangeLog 59230 SHA256 73ff203a8a2ab06072900d7d738f9bb6fae37b8b3a703077711c4940ce4cbf97 SHA512 a4a471fcccbeef1eaae3e25f13bfc10ec3f5ef11f1341fdee6b674f91e63badb4810c013dcdfd24cf4c971671267c975a0a4388e8fad161d9e92a3818eabe90e WHIRLPOOL 6507ccc757238e8940ccd9a97e3896c1f142ba4cc09843eb1ff952c12d152926f7abeab60d6ddbd961aec4f9136a0810c384cef7466f60d7036fffeb2687118d
MISC metadata.xml 240 SHA256 5dcdc1a8fd86d82f00a60bb322fb4f8a579d75ec7be2398164435197ab3903df SHA512 d673fbe248c2fcdf401f91f8d0e15587fd9f94c604d62f7864931f379b35a3ffc20264ae9668661a0d09693cd42db30c7f74fcb606da812312e394272acfeec8 WHIRLPOOL 4d2cc2b44bc446377dc659162e9f638650e82564a3328b0b23c1e6f197e88b9ae545d8778c69829a6f268e8b5f7d0db1b0aee1e3d8aedd909d1d756dc4aa94c3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQJ8BAEBCABmBQJTXpItXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
-ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC
-MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOsfwP/2xKBz9j8ZxIKBsg/Lj7KJff
-PTsC71oKam3O/K9DdZMDtzOhdyb3r+3bclYTqzjQjZNm5NwC3rnthDBVIbj39fMJ
-7ao24fw3mpJCb4MLXBUbLoggbRux3kxVGhf6rXBu8pP35n/11C+7TKpsMZxJKUX8
-hRF0cUorgJOpLM8HY2/3RiAnpmQ/MtdqxeNhyhSIlPPcKu0ZAyHT6baj2/huz7jD
-SlQ6BVfHjKtc8Yl93szyZGefcGMmIieleuo9rEdVFTGMz+2mXh+s7VRi7CN/FCjV
-xSit/MZP9TsW3fFU7fgP+LAqZsvlvymWWwEegbOIZK1bLgH1srpKpG57H7F4FM89
-ja3cAIK2bkXGwRw9YO3ljams+/fY1zU9l2RtJJgTrP/JS2f3fZPUezAuvpswfSbj
-MJQcrs9c/pGSSeJ4SPnkmCwK0AxD8BXBvzmhtNp4ApcWpZD+Mc2RwpIhQKhIE5ET
-3YQuphVwbvO2uUbzossJzkgKv62J0eiLsqDhezFy4Ly58Q9wokqqQhGKSg1qQax9
-Euipmltmo8zVzRJz2JK+oSK9Tia/ek4bQZxnOZPzcatOzs1sEsjvpuc0XJzfXoVd
-9d91lBwpdwx5tPhXHkzn4VkTbyBxd7JdSPcUI57cBWOVHyIoPMYiOxyVojforMbm
-Fh4jTp3q0ViBubTpcHO/
-=37gC
+iQEcBAEBCAAGBQJTa6U1AAoJEJ0WA1zPCt1hi1cIAI1VtaoblGaVhoagoJJb64Rc
+SX2dLAAzkPGOiviAC2K5F/wlsRz9iG4r4HXlbLZ1Wjg582aeHdIbDzg2Roq1rjzT
+TQHASyTG9O5lnT6lXh2qd2KTrsvbMqgzaLyAsdSETNGBzn7GpwbxnEHMAMCtidSO
+0DcXKtXO0YAzvbX+1IL3LN2Lfy7jOM07Alsw27IoL27AcFUgzzx/V8Q/tf6vQh3D
+9jVxql7u6xbQwoqTZeaasLLDodFY6lALWXSuNqn5qNZ8GNow6hX28NFfh2Cn4kMc
+6mz9rU9jEMqM/v6aFiXY1EGGQagdtcSr6m8ivu5dNPWRRo3tGOdy+01ZcJCAJN8=
+=Az+g
-----END PGP SIGNATURE-----
diff --git a/dev-libs/libxml2/files/libxml2-2.9.1-external-param-entities.patch b/dev-libs/libxml2/files/libxml2-2.9.1-external-param-entities.patch
new file mode 100644
index 000000000000..81f692fc71f6
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.9.1-external-param-entities.patch
@@ -0,0 +1,39 @@
+From 9cd1c3cfbd32655d60572c0a413e017260c854df Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Tue, 22 Apr 2014 15:30:56 +0800
+Subject: [PATCH] Do not fetch external parameter entities
+
+Unless explicitely asked for when validating or replacing entities
+with their value. Problem pointed out by Daniel Berrange <berrange@redhat.com>
+---
+ parser.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/parser.c b/parser.c
+index 9347ac9..c0dea05 100644
+--- a/parser.c
++++ b/parser.c
+@@ -2598,6 +2598,20 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
+ xmlCharEncoding enc;
+
+ /*
++ * Note: external parsed entities will not be loaded, it is
++ * not required for a non-validating parser, unless the
++ * option of validating, or substituting entities were
++ * given. Doing so is far more secure as the parser will
++ * only process data coming from the document entity by
++ * default.
++ */
++ if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
++ ((ctxt->options & XML_PARSE_NOENT) == 0) &&
++ ((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
++ (ctxt->validate == 0))
++ return;
++
++ /*
+ * handle the extra spaces added before and after
+ * c.f. http://www.w3.org/TR/REC-xml#as-PE
+ * this is done independently.
+--
+1.9.2
+
diff --git a/dev-libs/libxml2/libxml2-2.9.1-r3.ebuild b/dev-libs/libxml2/libxml2-2.9.1-r3.ebuild
new file mode 100644
index 000000000000..9f013744b285
--- /dev/null
+++ b/dev-libs/libxml2/libxml2-2.9.1-r3.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.9.1-r3.ebuild,v 1.1 2014/05/08 15:40:25 tetromino Exp $
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} )
+PYTHON_REQ_USE="xml"
+
+inherit libtool flag-o-matic eutils python-r1 autotools prefix multilib-minimal
+
+DESCRIPTION="Version 2 of the library to manipulate XML files"
+HOMEPAGE="http://www.xmlsoft.org/"
+
+LICENSE="MIT"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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"
+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} )"
+
+COMMON_DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
+ lzma? ( app-arch/xz-utils:=[${MULTILIB_USEDEP}] )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:= )
+"
+RDEPEND="${COMMON_DEPEND}
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20131008-r6
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+ 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
+ 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() {
+ DOCS=( AUTHORS ChangeLog NEWS README* TODO* )
+
+ # 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 # if we don't eautoreconf
+
+ # 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" \
+ "${FILESDIR}/${PN}-2.9.1-python3.patch" \
+ "${FILESDIR}/${PN}-2.9.1-python3a.patch"
+
+ # Security fixes from 2.9.2
+ epatch "${FILESDIR}/${P}-external-param-entities.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
+
+ # Use pkgconfig to find icu to properly support multilib
+ epatch "${FILESDIR}/${PN}-2.9.1-icu-pkgconfig.patch"
+
+ eautoreconf
+}
+
+multilib_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).
+
+ libxml2_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --with-html-subdir=${PF}/html \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_with debug run-debug) \
+ $(use_with icu) \
+ $(use_with lzma) \
+ $(use_enable ipv6) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with readline) \
+ $(multilib_native_use_with readline history) \
+ "$@"
+ }
+
+ libxml2_py_configure() {
+ mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
+ run_in_build_dir libxml2_configure "--with-python=${PYTHON}" # odd build system
+ }
+
+ libxml2_configure --without-python # build python bindings separately
+
+ if multilib_is_native_abi && use python; then
+ python_parallel_foreach_impl libxml2_py_configure
+ fi
+}
+
+multilib_src_compile() {
+ default
+ if multilib_is_native_abi && use python; then
+ local native_builddir=${BUILD_DIR}
+ python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all
+ fi
+}
+
+multilib_src_test() {
+ default
+ multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" \
+ EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install
+
+ if multilib_is_native_abi && use python; then
+ python_foreach_impl libxml2_py_emake DESTDIR="${D}" install
+ python_foreach_impl python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ # 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
+
+ rm -rf "${ED}"/usr/share/doc/${P}
+ einstalldocs
+
+ 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 "$@"
+ popd > /dev/null
+}