PKGBUILDs/extra/sbcl/PKGBUILD
2016-06-12 14:11:45 +00:00

77 lines
2.3 KiB
Bash

# $Id$
# Contributor: John Proctor <jproctor@prium.net>
# Contributor: Daniel White <daniel@whitehouse.id.au>
# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: Leslie Polzer (skypher)
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable sb-thread, not supported on ARM
buildarch=4
pkgname=sbcl
pkgver=1.3.6
pkgrel=2
pkgdesc="Steel Bank Common Lisp"
url="http://www.sbcl.org/"
arch=('i686' 'x86_64')
license=('custom')
depends=('glibc' 'zlib')
provides=('common-lisp' 'cl-asdf')
makedepends=('sbcl')
source=("http://downloads.sourceforge.net/project/sbcl/sbcl/$pkgver/$pkgname-$pkgver-source.tar.bz2"
"arch-fixes.lisp")
sha256sums=('f017ac1bd8fe0ad56a4cfda4f7543a06a8993db8da1c9c079e188c28c551b0d9'
'b5a6468dcbc1012cae2c3cda155762a37b6d96ef89bba4f723315063b0b5e7ce')
build() {
cd "$srcdir/$pkgname-$pkgver"
export CFLAGS+=" -D_GNU_SOURCE -fno-omit-frame-pointer -DSBCL_HOME=/usr/lib/sbcl"
export GNUMAKE="make"
# build system uses LINKFLAGS and OS_LIBS to build LDFLAGS
export LINKFLAGS="$LDFLAGS"
unset LDFLAGS
unset MAKEFLAGS
# Make a multi-threaded SBCL, disable LARGEFILE
cat >customize-target-features.lisp <<EOF
(lambda (features)
(flet ((enable (x) (pushnew x features))
(disable (x) (setf features (remove x features))))
(disable :sb-thread)
(enable :sb-core-compression)
(disable :largefile)))
EOF
sh make.sh sbcl --prefix=/usr
make -C doc/manual info
}
package() {
cd "$srcdir/$pkgname-$pkgver"
# cannot have both SBCL_HOME and INSTALL_ROOT
SBCL_HOME="" INSTALL_ROOT="$pkgdir/usr" sh install.sh
src/runtime/sbcl --core output/sbcl.core --script "${srcdir}/arch-fixes.lisp"
mv sbcl-new.core "${pkgdir}/usr/lib/sbcl/sbcl.core"
# sources
mkdir -p "$pkgdir/usr/share/sbcl-source"
cp -R -t "$pkgdir/usr/share/sbcl-source" "$srcdir/$pkgname-$pkgver/"{src,contrib}
# license
install -D -m644 "$srcdir/$pkgname-$pkgver/COPYING" \
"$pkgdir/usr/share/licenses/$pkgname/license.txt"
# drop unwanted files
find "$pkgdir" \( -name Makefile -o -name .cvsignore \) -delete
find "$pkgdir/usr/share/sbcl-source" -type f \
\( -name \*.fasl -o -name \*.o -o -name \*.log -o -name \*.so -o -name a.out \) -delete
rm "$pkgdir/usr/share/sbcl-source/src/runtime/sbcl"{,.nm}
}