pkgname=libxml2 pkgver=2.9.4 pkgrel=1 pkgdesc="XML parsing library, version 2" arch=('x86_64') license=('custom') depends=('zlib' 'readline' 'ncurses' 'xz') makedepends=('python2' 'python3') url="http://www.xmlsoft.org/" source=(ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz) md5sums=('ae249165c173b1ff386ee8ad676815f5') prepare() { cd "${pkgname}-${pkgver}" mkdir build-py3 mkdir build-py2 } build() { cd "${pkgname}-${pkgver}" cd build-py2 ../configure --prefix=/usr --with-threads --with-history --with-python=/usr/bin/python2 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool make cd ../build-py3 ../configure --prefix=/usr --with-threads --with-history --with-python=/usr/bin/python3 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool PYTHONHASHSEED=0 make } check() { cd ${srcdir}/${pkgname}-${pkgver}/build-py2 make check } package() { cd ${srcdir}/${pkgname}-${pkgver}/build-py2 find doc -type f -exec chmod 0644 {} \; make DESTDIR="${pkgdir}" install install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" cd ../build-py3/python PYTHONHASHSEED=0 make DESTDIR="${pkgdir}" install }