# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=libwpg
pkgver=0.3.4
pkgrel=0
pkgdesc="Import filter and tools for WordPerfect Graphics"
url="https://sourceforge.net/projects/libwpg/"
arch="all"
options="!check"  # No test suite.
license="MPL-2.0 LGPL-2.1-or-later"
makedepends="doxygen librevenge-dev libwpd-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://downloads.sourceforge.net/project/libwpg/libwpg/libwpg-$pkgver/libwpg-$pkgver.tar.bz2"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

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

tools() {
	amove usr/bin
}

sha512sums="
3d300388624933006fa84e86cc2800e4565179c638c26ed652ca04553366a4291c4a396809111de5f0139d26baaf7dc09b66259d7b17275268603e3582731ecb  libwpg-0.3.4.tar.bz2
"
