archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libxml2 / repos / core-x86_64 / PKGBUILD
blob06a69246e4bac6c73649d20bfca88e753c2f34a2
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 pkgbase=libxml2
8 pkgname=(
9   libxml2
10   libxml2-docs
12 pkgver=2.10.4
13 pkgrel=4
14 pkgdesc="XML C parser and toolkit"
15 url="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home"
16 arch=(x86_64)
17 license=(custom:MIT)
18 depends=(
19   icu
20   ncurses
21   readline
22   xz
23   zlib
25 makedepends=(
26   git
27   python
29 _commit=223cb03a5d27b1b2393b266a8657443d046139d6  # tags/v2.10.4^0
30 source=(
31   "git+https://gitlab.gnome.org/GNOME/libxml2.git#commit=$_commit"
32   0001-Fix-python3-unicode-errors.patch
33   0002-HACK-Don-t-run-fuzzing-tests.patch
34   https://www.w3.org/XML/Test/xmlts20130923.tar.gz
36 b2sums=('SKIP'
37         'ec5a0955906c5fdd4bc65248bdb46f315460f4b2208bf37c49f55ef7468585786bdf563aa3e9357370d4f1ff947a6d4467869eeb2ca6b77ca5e40ffa45213a13'
38         'ec247c8caad963307d8f487176fde518cfb087bbff3f10c2a5846b90a04c9909c2f0e6aaf8ded4784f46586eafb16df493caf1debc20ff10014f03b1f1f8241d'
39         '63a47bc69278ef510cd0b3779aed729e1b309e30efa0015d28ed051cc03f9dfddb447ab57b07b3393e8f47393d15473b0e199c34cb1f5f746b15ddfaa55670be')
41 pkgver() {
42   cd libxml2
43   git describe --tags | sed 's/-rc/rc/;s/^v//;s/[^-]*-g/r&/;s/-/+/g'
46 prepare() {
47   cd libxml2
49   # Use xmlconf from conformance test suite
50   ln -s ../xmlconf
52   # https://gitlab.gnome.org/GNOME/libxml2/-/issues/64
53   git apply -3 ../0001-Fix-python3-unicode-errors.patch
55   # Do not run fuzzing tests
56   git apply -3 ../0002-HACK-Don-t-run-fuzzing-tests.patch
58   NOCONFIGURE=1 ./autogen.sh
61 build() {
62   local configure_options=(
63     --prefix=/usr
64     --sysconfdir=/etc
65     --localstatedir=/var
66     --with-history
67     --with-icu
68     --with-python=/usr/bin/python
69     --with-threads
70     --disable-static
71   )
73   cd libxml2
75   ./configure "${configure_options[@]}"
76   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
77   make
80 check() {
81   cd libxml2
82   make check
85 package_libxml2() {
86   optdepends=('python: Python bindings')
87   provides=(libxml2.so)
89   cd libxml2
91   make DESTDIR="$pkgdir" install
93   mkdir -p ../doc/usr/share
94   mv "$pkgdir"/usr/share/{doc,gtk-doc} -t ../doc/usr/share
96   install -Dm644 Copyright -t "$pkgdir/usr/share/licenses/$pkgname"
99 package_libxml2-docs() {
100   pkgdesc+=" (documentation)"
101   depends=()
103   mv doc/* "$pkgdir"
105   install -Dm644 libxml2/Copyright -t "$pkgdir/usr/share/licenses/$pkgname"
108 # vim:set sw=2 sts=-1 et: