# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libffi
pkgver=3.4.8
pkgrel=0
pkgdesc="portable, high level programming interface to various calling conventions."
url="https://sourceware.org/libffi/"
arch="all"
license="MIT"
depends_dev="linux-headers"
makedepends_build="texinfo"
checkdepends="dejagnu"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc"
source="https://github.com/libffi/libffi/releases/download/v$pkgver/libffi-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-pax_emutramp \
		--enable-portable-binary \
		--disable-exec-static-tramp
	make
}

check() {
	make check
}

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

sha512sums="
05344c6c1a1a5b44704f6cf99277098d1ea3ac1dc11c2a691c501786a214f76184ec0637135588630db609ce79e49df3dbd00282dd61e7f21137afba70e24ffe  libffi-3.4.8.tar.gz
"
