OCaml 4.14.0 rebuild
[arch-packages.git] / libxml2 / repos / core-x86_64 / PKGBUILD
blob7535042f53160176ff1dee94a3f36a2d283a673c
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>
7 pkgname=libxml2
8 pkgver=2.9.14
9 pkgrel=1
10 pkgdesc='XML parsing library, version 2'
11 url='http://www.xmlsoft.org/'
12 arch=(x86_64)
13 license=(MIT)
14 depends=(zlib readline ncurses xz icu)
15 makedepends=(python git)
16 optdepends=('python: Python bindings')
17 provides=(libxml2.so)
18 options=(debug)
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
22         no-fuzz.diff
23         https://www.w3.org/XML/Test/xmlts20130923.tar.gz)
24 sha256sums=('SKIP'
25             'd331748e504e69603dac9c57f7b110a98a4bd4cb87e63d0c1bbcd71ec3635383'
26             '3fc010d8c42b93e6d6f1fca6b598a561e9d2c8780ff3ca0c76a31efabaea404f'
27             '9b61db9f5dbffa545f4b8d78422167083a8568c59bd1129f94138f936cf6fc1f')
29 pkgver() {
30   cd libxml2
31   git describe --tags | sed 's/-rc/rc/;s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
34 prepare() {
35   mkdir build
37   # Use xmlconf from conformance test suite
38   ln -s xmlconf build/xmlconf
40   cd libxml2
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
51 build() {
52   cd build
54   ../libxml2/configure \
55     --prefix=/usr \
56     --with-threads \
57     --with-history \
58     --with-python=/usr/bin/python \
59     --with-icu
60   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
61   make
63   find doc -type f -exec chmod -c 0644 {} +
66 check() {
67   make -C build check
70 package() {
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"
79 # vim:set sw=2 et: