summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Kennedy <mkennedy@gentoo.org>2003-09-21 02:26:02 +0000
committerMatthew Kennedy <mkennedy@gentoo.org>2003-09-21 02:26:02 +0000
commit8ad3a227f1fd2b2e0786e6c835851d84b68b4197 (patch)
tree7d1b1a35640972f8e155bc984271e82a12a6d6e7 /dev-lisp/sbcl/files
parentresolves bug 28340 (diff)
downloadgentoo-2-8ad3a227f1fd2b2e0786e6c835851d84b68b4197.tar.gz
gentoo-2-8ad3a227f1fd2b2e0786e6c835851d84b68b4197.tar.bz2
gentoo-2-8ad3a227f1fd2b2e0786e6c835851d84b68b4197.zip
resolves bug 28340
Diffstat (limited to 'dev-lisp/sbcl/files')
-rw-r--r--dev-lisp/sbcl/files/digest-sbcl-0.8.34
-rw-r--r--dev-lisp/sbcl/files/install-clc.lisp46
-rw-r--r--dev-lisp/sbcl/files/sbcl.rc7
-rw-r--r--dev-lisp/sbcl/files/sbcl.sh80
4 files changed, 137 insertions, 0 deletions
diff --git a/dev-lisp/sbcl/files/digest-sbcl-0.8.3 b/dev-lisp/sbcl/files/digest-sbcl-0.8.3
new file mode 100644
index 000000000000..11a7dd0771ca
--- /dev/null
+++ b/dev-lisp/sbcl/files/digest-sbcl-0.8.3
@@ -0,0 +1,4 @@
+MD5 5989896de7eba3827556b1a11e297c91 sbcl-0.8.3-source.tar.bz2 2001385
+MD5 6c193e328cdb472787ef78401ee5294c sbcl-0.8.1-x86-linux-binary.tar.bz2 6348098
+MD5 1cbd667b28d6d5afabccc759315eea70 sbcl-0.7.13-binary-linux-ppc.tar.bz2 5339432
+MD5 b377256bca8ccdb9cc8170a104b227fd sbcl-0.8.3-html.tar.bz2 45551
diff --git a/dev-lisp/sbcl/files/install-clc.lisp b/dev-lisp/sbcl/files/install-clc.lisp
new file mode 100644
index 000000000000..842a51ba696a
--- /dev/null
+++ b/dev-lisp/sbcl/files/install-clc.lisp
@@ -0,0 +1,46 @@
+;;; -*- Mode: LISP; Package: CL-USER -*-
+;;;
+;;; Copyright (C) Peter Van Eynde 2001 and Kevin Rosenberg 2002-2003
+;;;
+;;; License: LGPL v2
+;;;
+(in-package "COMMON-LISP-USER")
+
+(unless (ignore-errors
+ (load "/usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp"))
+ (sb-unix:unix-exit 1))
+
+(unless (ignore-errors
+ (common-lisp-controller:init-common-lisp-controller
+ "/usr/lib/common-lisp/sbcl/"
+ :version 3)
+ t)
+ (format t "~%Error during init of common-lisp-controller~%")
+ (sb-unix:unix-exit 1))
+
+(defun common-lisp-controller:send-clc-command (command package)
+ (let ((process
+ (sb-ext:run-program "/usr/bin/clc-send-command"
+ (list
+ (ecase command
+ (:recompile "recompile")
+ (:remove "remove"))
+ (format nil "~A" package)
+ "sbcl"
+ "--quiet")
+ :wait t)))
+ (if (= (sb-ext:process-exit-code process) 0)
+ (values)
+ (error "An error happened during ~A of ~A for ~A~%Please see /usr/share/doc/common-lisp-controller/REPORTING-BUGS.gz"
+ (ecase command
+ (:recompile "recompilation")
+ (:remove "removal"))
+ package
+ "sbcl"))))
+
+(ignore-errors
+ (format t "~%Saving to sbcl-new.core...")
+ (sb-ext:gc :full t)
+;(setf ext:*batch-mode* nil)
+ (sb-ext:save-lisp-and-die "sbcl-new.core"
+ :purify t))
diff --git a/dev-lisp/sbcl/files/sbcl.rc b/dev-lisp/sbcl/files/sbcl.rc
new file mode 100644
index 000000000000..5362dcfddba2
--- /dev/null
+++ b/dev-lisp/sbcl/files/sbcl.rc
@@ -0,0 +1,7 @@
+;;; -*- Lisp -*-
+;;; this file gets installed as /etc/sbcl.rc and run on every
+;;; invocation of sbcl
+
+(if (probe-file "/etc/lisp-config.lisp")
+ (load "/etc/lisp-config.lisp")
+ (format t "~%;;; Hey: there is no /etc/lisp-config.lisp file, please run \"dpkg-reconfigure common-lisp-controller\" as root"))
diff --git a/dev-lisp/sbcl/files/sbcl.sh b/dev-lisp/sbcl/files/sbcl.sh
new file mode 100644
index 000000000000..2e1bc27017c6
--- /dev/null
+++ b/dev-lisp/sbcl/files/sbcl.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+if [ ! -f /usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp ] ; then
+ cat <<EOF
+$0: cannot find the common-lisp-controller source.
+EOF
+ exit 0
+fi
+
+build_error()
+{
+ echo "Build failure $1"
+ exit 1
+}
+
+case $1 in
+ rebuild)
+ echo $0 rebuilding...
+ shift
+ echo rebuilding $1
+ sbcl --noinform --sysinit /etc/sbcl.rc --userinit /dev/null \
+ --disable-debugger \
+ --eval \
+"(handler-case
+ (progn
+ (c-l-c:compile-library (quote $1))
+ (sb-unix:unix-exit 0))
+ (error (e)
+ (ignore-errors (format t \"~&Build error: ~A~%\" e))
+ (finish-output)
+ (sb-unix:unix-exit 1)))" || build_error
+ ;;
+ remove)
+ echo $0 removing packages...
+ shift
+ while [ ! -z "$1" ] ; do
+ rm -rf "/usr/lib/common-lisp/sbcl/$1"
+ shift
+ done
+ ;;
+ install-defsystem | install-clc)
+ echo $0 loading and dumping clc.
+ ( cd /usr/lib/sbcl
+ sbcl --core /usr/lib/sbcl/sbcl-dist.core \
+ --noinform --sysinit /etc/sbcl.rc --userinit /dev/null \
+ --load "/usr/lib/sbcl/install-clc.lisp" 2> /dev/null
+ mv sbcl-new.core sbcl.core || (echo FAILED ; cp sbcl-dist.core sbcl.core ) )
+ ;;
+ remove-defsystem | remove-clc)
+ echo $0 removing clc-enabled image
+ cp /usr/lib/sbcl/sbcl-dist.core /usr/lib/sbcl/sbcl.core
+ ;;
+ make-user-image)
+ if [ ! -f "$2" ] ; then
+ echo "Trying to make-user image, but can not find file $2" >&2
+ exit 1
+ fi
+ sbcl --core /usr/lib/sbcl/sbcl-dist.core \
+ --noinform --sysinit /dev/null --userinit /dev/null \
+ --eval \
+"(handler-case
+ (progn
+ (load \"$2\")
+ (sb-ext:gc :full t)
+ (sb-ext:save-lisp-and-die \"/usr/lib/sbcl/sbcl-new.core\" :purify t))
+ (sb-unix:unix-exit 0))
+ (error (e)
+ (ignore-errors (format t \"make-user-image error: ~A~%\" e))
+ (finish-output)
+ (sb-unix:unix-exit 1)))"
+ mv sbcl-new.core sbcl.core || (echo FAILED ; cp sbcl-dist.core sbcl.core )
+ ;;
+ *)
+ echo $0 unkown command $1
+ echo known commands: rebuild, remove, make-user-image, install-clc and remove-clc
+ exit 1
+ ;;
+esac
+
+exit 0