# Compiling Time: 0.90 SBU
# Maintainer: Elentir <elentir@frugalware.org>

pkgname=clisp
pkgver=2.49
pkgrel=11
pkgdesc="GNU CLisp is an ANSI Common Lisp Implementation"
url="http://clisp.cons.org/"
source=("http://ftp.gnu.org/pub/gnu/clisp/latest/$pkgname-$pkgver.tar.bz2" \
	clisp-gcc5.patch readline7.patch)
depends=('glibc' 'readline>=8.0' 'ncurses>=6.5' 'gettext' 'libsigsegv' 'ffcall')
groups=('devel-extra')
archs=('x86_64')
up2date="Flasttar http://ftp.gnu.org/pub/gnu/clisp/latest/"
Fconfopts="--prefix=/usr --docdir=/usr/share/doc/$pkgname-$pkgver"
sha1sums=('7e8d585ef8d0d6349ffe581d1ac08681e6e670d4' \
          '2252f04095ab1bcbfe192ed5de5d81d42b97877b' \
          '8dfc67cc2bb035ed44f0f0b74e375fabd1b05c25')

build() {
	Fcd
	Fpatchall
	Fexec ulimit -s 16384 || Fdie
	Fexec ./configure $Fconfopts || Fdie
        cd src || Fdie
	Fexec ./makemake --with-dynamic-ffi --without-dynamic-modules ${Fconfopts} > Makefile || Fdie
	unset MAKEFLAGS
        Fexec make || Fdie
	Fmakeinstall

}

# optimization OK
