# Contributor: John Proctor <jproctor@prium.net>
# Maintainer: juergen <juergen@archlinux.org>

pkgname=ecl
pkgver=16.1.3
pkgrel=3
pkgdesc="Embeddable Common Lisp"
arch=('x86_64')
url="https://common-lisp.net/project/ecl/"
license=('LGPL')
depends=('bash' 'gmp')
makedepends=('texinfo')
provides=('common-lisp' 'cl-asdf')
options=('!makeflags')
source=("https://common-lisp.net/project/ecl/static/files/release/${pkgname}-${pkgver}.tgz")
sha256sums=('76a585c616e8fa83a6b7209325a309da5bc0ca68e0658f396f49955638111254')

build() {
  cd $srcdir/$pkgname-$pkgver
  sed -i 's|-Wl,--rpath,~A|-Wl,--rpath,/usr/lib/ecl|' src/configure
  ./configure \
    --build=$CHOST \
    --prefix=/usr \
    --with-tcp \
    --with-serve-event \
    --with-clos-streams \
    --with-system-gmp \
    --without-x \
    --without-clx \
    --enable-threads \
    --enable-shared \
    --enable-boehm=included \

  make
}

package() {
  make -C $srcdir/$pkgname-$pkgver DESTDIR=$pkgdir install
}
