# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: Michael Baehr <usemike@spamblocked.com>
pkgname=ffcall
pkgver=2.4
pkgrel=2
pkgdesc="C library for implementing foreign function calls in embedded interpreters"
arch=('armv7h' 'aarch64')
url="https://www.gnu.org/software/libffcall/"
license=('GPL2')
depends=('glibc')
options=('!makeflags' 'staticlibs')
source=(https://ftp.gnu.org/gnu/libffcall/libffcall-${pkgver}.tar.gz)
sha256sums=('8ef69921dbdc06bc5bb90513622637a7b83a71f31f5ba377be9d8fd8f57912c2')
build() {
cd "${srcdir}/lib${pkgname}-${pkgver}"
[ "$CARCH" = "x86_64" ] && CONFIGFLAG="--with-pic"
CFLAGS+=" -ffat-lto-objects" \
./configure --prefix=/usr --mandir=/usr/share/man $CONFIGFLAG
make
}
check() {
cd "${srcdir}/lib${pkgname}-${pkgver}"
make check
}
package() {
cd "${srcdir}/lib${pkgname}-${pkgver}"
install -d "${pkgdir}"/usr/share/{man,doc/ffcall}
make DESTDIR="${pkgdir}" htmldir=/usr/share/doc/ffcall install
}