# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Thomas Arnhold <thomas at arnhold dot org>

pkgname=liborcus
pkgver=0.19.2
pkgrel=5
pkgdesc="File import filter library for spreadsheet documents."
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://gitlab.com/orcus/orcus/blob/master/README.md"
license=('MPL-2.0')
depends=('libixion' 'glibc' 'boost-libs' 'gcc-libs' 'zlib' 'python')
makedepends=('boost' 'mdds')
optdepends=('python-requests: in tool bugzilla')
source=(https://kohei.us/files/orcus/src/${pkgname}-${pkgver}.tar.xz)
# https://gitlab.com/orcus/orcus/-/releases
sha256sums=('69ed26a00d4aaa7688e62a6e003cbc81928521a45e96605e53365aa499719e39')

build() {
    cd "${pkgname}"-${pkgver}
    ./configure --prefix=/usr
    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
    make
}

check() {
    cd "${pkgname}"-${pkgver}
    make check
}

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