# Contributor: Carlo Landmeter # Maintainer: Carlo Landmeter pkgname=libxml2 pkgver=2.9.0 pkgrel=3 pkgdesc="XML parsing library, version 2" url="http://www.xmlsoft.org/" arch="all" license="MIT" depends= depends_dev="zlib-dev python-dev" makedepends="zlib-dev python-dev" subpackages="$pkgname-doc $pkgname-dev py-$pkgname:py $pkgname-utils" source="ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz CVE-2012-5134.patch CVE-2013-0338.patch " options="!strip" _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info make } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install rm "$pkgdir"/usr/lib/*.la \ "$pkgdir"/usr/lib/python*/site-packages/*.la \ || return 1 install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING } py() { cd "$_builddir" pkgdesc="$pkgname python bindings" install -d "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } utils() { pkgdesc="XML utilities" replaces="libxml2" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } md5sums="5b9bebf4f5d2200ae2c4efe8fa6103f7 libxml2-2.9.0.tar.gz fe428448d74481d7547bc173cb40ef26 CVE-2012-5134.patch eddb937c2bf9185ca826f130166bf58c CVE-2013-0338.patch" sha256sums="ad25d91958b7212abdc12b9611cfb4dc4e5cddb6d1e9891532f48aacee422b82 libxml2-2.9.0.tar.gz d68115aea0fb0d22cf716254228d199530cc54566ab0acf652b54be4bc227915 CVE-2012-5134.patch b222fb0ec9abf8e18c8c069bbee96a7a53ef39673c09cc02eb00fd4a2177621d CVE-2013-0338.patch" sha512sums="b13268ea3725a8b534974ece33981b001324164e5687df94b0d15c77189070e2a5d9f08c1646e5492e70a607ca0adf00788772fcf300ac2d4a110e9bf57d4afe libxml2-2.9.0.tar.gz 5a25c523ec2f75f1403b43eead6bba4c9e8046a68149e4b3654aef4cd97498e47a1a29f41ed9acf5bcd36cefa16b67eaf86db8d34edc0ae2892cb4c626cc9e9c CVE-2012-5134.patch 839bc35d1baf100a0193572ef78c64051f6fcbcf7c70d0c321142c54b15de52c7fd678c209d04c92d6e5e30a3b0e3346c94f3a7fa1ba706ab68081cd9a4fc2bf CVE-2013-0338.patch"