# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libffi
pkgver=3.4.2
pkgrel=0
pkgdesc="A portable foreign function interface library"
url="https://sourceware.org/libffi"
arch="all"
license="MIT"
depends=""
makedepends="texinfo"
checkdepends="dejagnu"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/$pkgname/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
	long-double-size.patch
	"

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

check() {
	make check
}

package() {
	make DESTDIR=""$pkgdir"" install
	install -m755 -d ""$pkgdir"/usr/share/licenses/$pkgname"
	install -m644 LICENSE ""$pkgdir"/usr/share/licenses/$pkgname/"
}

sha512sums="31bad35251bf5c0adb998c88ff065085ca6105cf22071b9bd4b5d5d69db4fadf16cadeec9baca944c4bb97b619b035bb8279de8794b922531fddeb0779eb7fb1  libffi-3.4.2.tar.gz
ef6ee13ac5ad6a5c7b60235d64e0c4bd57ccea320c7498327a0602cbe9398dadeef2c10f2ff958f106ae033412d1e174735a6c5ab0ee68982275274cc4906fde  long-double-size.patch"