blob: 8f961492e13af0dcb87e3b973d8c5c8f3166887a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# $Id: PKGBUILD 132801 2011-07-26 10:22:05Z juergen $
# Contributor: John Proctor <jproctor@prium.net>
# Contributor: Daniel White <daniel@whitehouse.id.au>
# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: Leslie Polzer (skypher)
pkgname=sbcl
pkgver=1.0.50
pkgrel=1
pkgdesc="Steel Bank Common Lisp"
arch=('i686' 'x86_64')
license=('custom')
depends=('glibc')
provides=('common-lisp' 'cl-asdf')
makedepends=('sbcl' 'texinfo')
source=("http://downloads.sourceforge.net/project/sbcl/sbcl/$pkgver/$pkgname-$pkgver-source.tar.bz2" "arch-fixes.lisp")
md5sums=('74ce9b24516885d066ec4287cde52e8c'
'7ac0c1936547f4278198b8bf7725204d')
url="http://www.sbcl.org/"
install=sbcl.install
build() {
export CFLAGS="${CFLAGS} -DSBCL_HOME=\\\"/usr/lib/sbcl\\\""
export GNUMAKE="make -e"
# build system uses LINKFLAGS and OS_LIBS to build LDFLAGS
export LINKFLAGS="$LD_FLAGS"
unset LDFLAGS
cd ${startdir}/src/${pkgname}-${pkgver}
# 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))))
(enable :sb-thread)
(disable :largefile)))
EOF
sh make.sh sbcl
mkdir -p ${startdir}/pkg/usr
pushd doc/manual
make info || return 1
popd
INSTALL_ROOT=${startdir}/pkg/usr sh install.sh
src/runtime/sbcl --core output/sbcl.core --script ${startdir}/src/arch-fixes.lisp
mv sbcl-new.core ${startdir}/pkg/usr/lib/sbcl/sbcl.core
# sources
mkdir -p ${startdir}/pkg/usr/share/sbcl-source
cp -R -t ${startdir}/pkg/usr/share/sbcl-source \
${startdir}/src/${pkgname}-${pkgver}/{src,contrib}
# drop unwanted files
find ${startdir}/pkg/usr/share/sbcl-source -type f \
-name \*.fasl -or \
-name \*.o -or \
-name \*.log -or \
-name \*.so -or \
-name a.out -delete
rm ${startdir}/pkg/usr/share/sbcl-source/src/runtime/sbcl
rm ${startdir}/pkg/usr/share/sbcl-source/src/runtime/sbcl.nm
find ${startdir}/pkg \( -name Makefile -o -name .cvsignore \) -delete
rm $startdir/pkg/usr/share/info/dir
gzip -9nf $startdir/pkg/usr/share/info/*
# license
install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/COPYING \
${startdir}/pkg/usr/share/licenses/${pkgname}/license.txt
}
|