This commit is contained in:
Tom Willemse 2013-12-01 14:09:53 +01:00
parent c8adcf31fb
commit 13608297c6
4 changed files with 142 additions and 0 deletions

71
sbcl/PKGBUILD Normal file
View file

@ -0,0 +1,71 @@
# $Id: PKGBUILD 196298 2013-10-11 08:53:55Z 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.1.14
pkgrel=1
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')
install=sbcl.install
source=("http://downloads.sourceforge.net/project/sbcl/sbcl/$pkgver/$pkgname-$pkgver-source.tar.bz2"
"arch-fixes.lisp")
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
# 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)
(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}
}
md5sums=('e3f933f7cb0053c3438d86e90f5bd73b'
'7ac0c1936547f4278198b8bf7725204d')

21
sbcl/arch-fixes.lisp Normal file
View file

@ -0,0 +1,21 @@
(in-package "COMMON-LISP-USER")
(let* ((parent (make-pathname :directory '(:absolute "usr" "share" "sbcl-source")))
(src
(merge-pathnames
(make-pathname :directory '(:relative "src" :wild-inferiors)
:name :wild :type :wild)
parent))
(contrib
(merge-pathnames
(make-pathname :directory '(:relative "contrib" :wild-inferiors)
:name :wild :type :wild)
parent)))
(setf (logical-pathname-translations "SYS")
`(("SYS:SRC;**;*.*.*" ,src)
("SYS:CONTRIB;**;*.*.*" ,contrib))))
(ignore-errors
(sb-ext:gc :full t)
(sb-ext:enable-debugger)
(sb-ext:save-lisp-and-die "sbcl-new.core"))

18
sbcl/sbcl.install Normal file
View file

@ -0,0 +1,18 @@
info_dir=/usr/share/info
info_files=(asdf.info sbcl.info)
post_install() {
for f in ${info_files[@]}; do
install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
done
}
post_upgrade() {
post_install $1
}
pre_remove() {
for f in ${info_files[@]}; do
install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
done
}

View file

@ -0,0 +1,32 @@
diff -up texinfo-4.13/info/window.c_old texinfo-4.13/info/window.c
--- texinfo-4.13/info/window.c_old 2009-08-04 13:46:15.000000000 +0200
+++ texinfo-4.13/info/window.c 2009-08-04 13:47:29.000000000 +0200
@@ -1581,7 +1581,7 @@ process_node_text (WINDOW *win, char *st
const char *carried_over_ptr;
size_t carried_over_len, carried_over_count;
const char *cur_ptr = mbi_cur_ptr (iter);
- int cur_len = mb_len (mbi_cur (iter));
+ size_t cur_len = mb_len (mbi_cur (iter));
int replen;
int delim = 0;
int rc;
@@ -1754,7 +1754,7 @@ clean_manpage (char *manpage)
mbi_advance (iter))
{
const char *cur_ptr = mbi_cur_ptr (iter);
- int cur_len = mb_len (mbi_cur (iter));
+ size_t cur_len = mb_len (mbi_cur (iter));
if (cur_len == 1)
{
@@ -1852,8 +1852,8 @@ window_scan_line (WINDOW *win, int line,
mbi_advance (iter))
{
const char *cur_ptr = mbi_cur_ptr (iter);
- int cur_len = mb_len (mbi_cur (iter));
- int replen;
+ size_t cur_len = mb_len (mbi_cur (iter));
+ size_t replen;
if (cur_ptr >= endp)
break;