PKGBUILDs/extra/sbcl/PKGBUILD

81 lines
2.4 KiB
Bash
Raw Normal View History

2015-09-21 23:38:08 +00:00
# $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
2017-06-07 23:18:03 +00:00
pkgver=1.3.18
2016-11-16 00:55:55 +00:00
pkgrel=1
2015-09-21 23:38:08 +00:00
pkgdesc="Steel Bank Common Lisp"
url="http://www.sbcl.org/"
arch=('i686' 'x86_64')
license=('custom')
2016-12-28 18:18:50 +00:00
depends=('zlib')
2015-09-21 23:38:08 +00:00
provides=('common-lisp' 'cl-asdf')
makedepends=('sbcl')
2016-11-16 00:55:55 +00:00
source=("https://downloads.sourceforge.net/project/sbcl/sbcl/$pkgver/$pkgname-$pkgver-source.tar.bz2"
2015-09-21 23:38:08 +00:00
"arch-fixes.lisp")
2017-06-07 23:18:03 +00:00
sha256sums=('fb2d622cba55ac441b7eb1be3c7343cd5e80f0c194bc648341aa0bb08f61398e'
2015-11-20 01:41:57 +00:00
'b5a6468dcbc1012cae2c3cda155762a37b6d96ef89bba4f723315063b0b5e7ce')
2015-09-21 23:38:08 +00:00
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
2017-03-12 17:15:58 +00:00
if [[ ${CARCH} = x86_64 ]]; then
enable_disable_largefile=enable
else
enable_disable_largefile=disable
fi
2015-09-21 23:38:08 +00:00
# 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)
2017-03-12 17:15:58 +00:00
(${enable_disable_largefile} :largefile)))
2015-09-21 23:38:08 +00:00
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}
}