# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=openlibm
pkgver=0.8.3
pkgrel=0
pkgdesc="High quality system independent, portable, open source libm implementation"
url="https://openlibm.org/"
# riscv64 is not supported upstream
arch="all !s390x !riscv64 !loongarch64"
license="MIT AND BSD-2-Clause AND ISC AND LGPL-2.1-or-later"
subpackages="$pkgname-dev"
source="openlibm-$pkgver.tar.gz::https://github.com/JuliaLang/openlibm/archive/v$pkgver.tar.gz
	powerpc_fixes.patch"

build() {
	make
}

check() {
	make check
}

package() {
	make VERSION=$pkgver DESTDIR="$pkgdir" prefix=/usr install
	rm -f "$pkgdir"/usr/lib/*.a
}

sha512sums="
1c6969e6e3117ddc066697318e43cf42d170750cb85cbed6013eb29d7513d5998eeffbff4a658d222cf637977cb7dca34b7a15814f8870f4e36e880673d757c0  openlibm-0.8.3.tar.gz
76ee57a281275b2bd382f0485e4ca383566af47f3d89981b75ad764c629d82f7f0260fb41cc9eb50f0f175c88b64699aabcc732add321f4d730f38ba7a48238d  powerpc_fixes.patch
"
