1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 # Contributor: Jan de Groot <jgc@archlinux.org>
4 # Contributor: Tom Gundersen <teg@jklm.no>
5 # Contributor: John Proctor <jproctor@prium.net>
10 pkgdesc='XML parsing library, version 2'
11 url='http://www.xmlsoft.org/'
14 depends=(zlib readline ncurses xz icu)
15 makedepends=(python git)
16 optdepends=('python: Python bindings')
19 _commit=7846b0a677f8d3ce72486125fa281e92ac9970e8 # tags/v2.9.14^0
20 source=("git+https://gitlab.gnome.org/GNOME/libxml2.git#commit=$_commit"
21 libxml2-2.9.8-python3-unicode-errors.patch
23 https://www.w3.org/XML/Test/xmlts20130923.tar.gz)
25 'd331748e504e69603dac9c57f7b110a98a4bd4cb87e63d0c1bbcd71ec3635383'
26 '3fc010d8c42b93e6d6f1fca6b598a561e9d2c8780ff3ca0c76a31efabaea404f'
27 '9b61db9f5dbffa545f4b8d78422167083a8568c59bd1129f94138f936cf6fc1f')
31 git describe --tags | sed 's/-rc/rc/;s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
37 # Use xmlconf from conformance test suite
38 ln -s xmlconf build/xmlconf
42 # https://src.fedoraproject.org/rpms/libxml2/tree/rawhide
43 git apply -3 ../libxml2-2.9.8-python3-unicode-errors.patch
45 # Do not run fuzzing tests
46 git apply -3 ../no-fuzz.diff
48 NOCONFIGURE=1 ./autogen.sh
54 ../libxml2/configure \
58 --with-python=/usr/bin/python \
60 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
63 find doc -type f -exec chmod -c 0644 {} +
71 make -C build DESTDIR="$pkgdir" install
73 python -m compileall -d /usr/lib "$pkgdir/usr/lib"
74 python -O -m compileall -d /usr/lib "$pkgdir/usr/lib"
76 install -Dm 644 build/COPYING -t "$pkgdir/usr/share/licenses/$pkgname"