# Contributor: Stefan Stutz <stutz@pm.me>
# Maintainer: Stefan Stutz <stutz@pm.me>
pkgname=mpdecimal
pkgver=4.0.1
pkgrel=0
pkgdesc="complete implementation of the General Decimal Arithmetic Specification"
url="https://www.bytereef.org/mpdecimal/index.html"
arch="all"
license="BSD-2-Clause"
subpackages="$pkgname-doc $pkgname-dev"
source="https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	# The new test target *make check_local* does not attempt to download
	# dectest.zip.  This is useful for packagers whose infrastructure does
	# not allow downloading during the testing phase.
	make check_local
}

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

sha512sums="
431fa8ab90d6b8cdecc38b1618fd89d040185dec3c1150203e20f40f10a16160058f6b8abddd000f6ecb74f4dc42d9fef8111444f1496ab34c34f6b814ed32b7  mpdecimal-4.0.1.tar.gz
"
