# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=presage
pkgver=0.9.1
pkgrel=3
pkgdesc="An intelligent predictive text entry system"
url="https://presage.sourceforge.io/"
arch="all"
license="GPL-3.0-or-later"
depends_dev="
	sqlite-dev
	tinyxml-dev
	"
makedepends="$depends_dev
	autoconf
	automake
	doxygen
	graphviz
	help2man
	libtool
	"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://downloads.sourceforge.net/project/presage/presage/$pkgver/presage-$pkgver.tar.gz
	gcc6.patch
	gcc11.patch
	"

prepare() {
	default_prepare

	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-documentation
	make
}

check() {
	make check
}

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

sha512sums="
46d7151a80e376d9a8a018be985b2c88a070a6f6555bf3d9b1f50aa41ea8e861c8e26ed3c25a5833855ae01004ecbd36408711e40baf4f072599c240f6c721b1  presage-0.9.1.tar.gz
276907303156d9262c3520ec912f0d984c31bb27a9d1c14132a9abc012cdff855d8272d4f163b42062369e30bf5cfaa1c149ff3551167694cb7220231aa37b5a  gcc6.patch
bfd6656b1bbab07363f72dc0f6af12818468b1e4372be683c5d678875f26374968775abdebbf9255becee535f4b70ede869f556897ea7349df169c8ce02511ec  gcc11.patch
"
