# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>

pkgname=xerces-c
pkgver=3.2.5
pkgrel=2
pkgdesc="A validating XML parser written in a portable subset of C++"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://xerces.apache.org/xerces-c/"
license=('APACHE')
depends=('gcc-libs' 'curl' 'libnsl' 'icu')
source=("https://archive.apache.org/dist/xerces/c/3/sources/${pkgname}-${pkgver}.tar.gz")
sha256sums=('545cfcce6c4e755207bd1f27e319241e50e37c0c27250f11cda116018f1ef0f5')

build() {
  cd "${pkgname}-${pkgver}"

  [[ "${CARCH}" = "i686" ]] && SSE2="--disable-sse2"
  ./configure --prefix=/usr --sysconfdir=/etc ${SSE2}
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}/" install
}
