# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libtommath
pkgver=1.2.0
pkgrel=0
pkgdesc="Theoretic multiple-precision integer library"
url="https://www.libtom.net/LibTomMath/"
arch="all"
options="!check"  # no longer builds properly, tested manually on gwyn
license="Unlicense"
depends=""
makedepends="libtool"
subpackages="$pkgname-dev"
source="https://github.com/libtom/libtommath/releases/download/v$pkgver/ltm-$pkgver.tar.xz"

build() {
	make PREFIX=/usr -f makefile.shared
}

check() {
	make PREFIX=/usr -f makefile.shared -j1 test
	./test
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" -f makefile.shared install
}

sha512sums="6f9ccd0691831f07f86ddc81cb6145504b3d5da66dd3e92312c64cce0ea986fa4e08ba65ca8991aaebe56702c2d7c15f309696785b813dffb4c112a4ad04b203  ltm-1.2.0.tar.xz"