archrelease: copy trunk to community-any
[ArchLinux/community.git] / lib32-libxml2 / trunk / PKGBUILD
blob75185d1289f4f7f6c438dc55e0676eb38c1d9de2
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=lib32-libxml2
8 pkgname=(
9   lib32-libxml2
11 pkgver=2.10.4
12 pkgrel=4
13 pkgdesc="XML C parser and toolkit (32-bit)"
14 url="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home"
15 arch=(x86_64)
16 license=(custom:MIT)
17 depends=(
18   lib32-icu
19   lib32-xz
20   lib32-zlib
21   libxml2
23 makedepends=(
24   git
25   python
27 _commit=223cb03a5d27b1b2393b266a8657443d046139d6  # tags/v2.10.4^0
28 source=(
29   "git+https://gitlab.gnome.org/GNOME/libxml2.git#commit=$_commit"
30   0001-Fix-python3-unicode-errors.patch
31   0002-HACK-Don-t-run-fuzzing-tests.patch
32   https://www.w3.org/XML/Test/xmlts20130923.tar.gz
34 b2sums=('SKIP'
35         'ec5a0955906c5fdd4bc65248bdb46f315460f4b2208bf37c49f55ef7468585786bdf563aa3e9357370d4f1ff947a6d4467869eeb2ca6b77ca5e40ffa45213a13'
36         'ec247c8caad963307d8f487176fde518cfb087bbff3f10c2a5846b90a04c9909c2f0e6aaf8ded4784f46586eafb16df493caf1debc20ff10014f03b1f1f8241d'
37         '63a47bc69278ef510cd0b3779aed729e1b309e30efa0015d28ed051cc03f9dfddb447ab57b07b3393e8f47393d15473b0e199c34cb1f5f746b15ddfaa55670be')
39 pkgver() {
40   cd libxml2
41   git describe --tags | sed 's/-rc/rc/;s/^v//;s/[^-]*-g/r&/;s/-/+/g'
44 prepare() {
45   cd libxml2
47   # Use xmlconf from conformance test suite
48   ln -s ../xmlconf
50   # https://gitlab.gnome.org/GNOME/libxml2/-/issues/64
51   git apply -3 ../0001-Fix-python3-unicode-errors.patch
53   # Do not run fuzzing tests
54   git apply -3 ../0002-HACK-Don-t-run-fuzzing-tests.patch
56   NOCONFIGURE=1 ./autogen.sh
59 build() {
60   local configure_options=(
61     --prefix=/usr
62     --libdir=/usr/lib32
63     --sysconfdir=/etc
64     --localstatedir=/var
65     --without-history
66     --with-icu
67     --without-python
68     --with-threads
69     --disable-static
70   )
72   export CC="gcc -m32"
73   export CXX="g++ -m32"
74   export PKG_CONFIG="i686-pc-linux-gnu-pkg-config"
76   cd libxml2
78   ./configure "${configure_options[@]}"
79   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
80   make
83 check() {
84   cd libxml2
85   make check
88 package_lib32-libxml2() {
89   provides=(libxml2.so)
91   cd libxml2
93   make DESTDIR="$pkgdir" install
95   rm -r "$pkgdir"/usr/{include,share,bin}
97   install -Dm644 Copyright -t "$pkgdir/usr/share/licenses/$pkgname"
100 # vim:set sw=2 sts=-1 et: