# Contributor: Andrew Bell # Maintainer: Andrew Bell pkgname=xerces-c pkgver=3.2.2 pkgrel=6 pkgdesc="A validating XML parser written in a portable subset of C++" url="https://xerces.apache.org/index.html" arch="all" license="Apache-2.0" makedepends="cmake curl-dev icu-dev" subpackages="$pkgname-samples $pkgname-doc $pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/apache/xerces-c/archive/v$pkgver.tar.gz" build() { mkdir build && cd build local thread_support=-Dthreads:BOOL=ON case "$CARCH" in s390x) thread_support=-Dthreads:BOOL=OFF ;; esac cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX="$pkgdir"/usr \ $thread_support \ -Dnetwork-accessor=curl \ -Dmessage-loader=icu \ -Dtranscoder=icu cmake --build . } package() { cd "$builddir"/build cmake --build . --target install --config Release } samples() { pkgdesc="$pkgdesc (compiled samples)" mkdir -p $subpkgdir/usr mv $pkgdir/usr/bin $subpkgdir/usr } check() { cd "$builddir"/build ctest } sha512sums="e4b2d3499fb4d1d1bcaf991ee858f352112683084b9cc7855c0e52e7fc8cc982a8e3cd548fa30718af6a6dee40e460d82ffcd3480a50f7e7516b462b2c2080c6 xerces-c-3.2.2.tar.gz"