# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=liborcus
pkgver=0.17.2
pkgrel=0
pkgdesc="Library for processing spreadsheet documents"
url="https://gitlab.com/orcus/orcus"
arch="all"
license="MPL-2.0 AND MIT"
depends=""
depends_dev="boost-dev mdds libixion-dev"
makedepends="$depends_dev zlib-dev autoconf automake libtool cmd:which"
subpackages="$pkgname-dev"
source="https://gitlab.com/orcus/orcus/-/archive/$pkgver/orcus-$pkgver.tar.bz2"

builddir="$srcdir/orcus-$pkgver"

build() {
	export LDFLAGS="-lstdc++fs" #826

	./autogen.sh \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-python
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="76ec54dc8ee63e2b6487c865483b7c4eb67b47ac5e9be03dd1ad67705659f640b0cb58cc2dc6fef68210879509d1b53fa460c35f3c3c2900d05d1ca9c0d6cfbd  orcus-0.17.2.tar.bz2"