diff options
author | Matthew Kennedy <mkennedy@gentoo.org> | 2005-06-07 01:44:37 +0000 |
---|---|---|
committer | Matthew Kennedy <mkennedy@gentoo.org> | 2005-06-07 01:44:37 +0000 |
commit | 1ad4396831eaedbd5a84cec73673fa5c57d33823 (patch) | |
tree | ec83f18feb07f03497fe0a3325d5cdb064783483 /dev-lisp/ecls/files | |
parent | Make sure we dont build ssp.c with stack-protector and disable syslog() until... (diff) | |
download | gentoo-2-1ad4396831eaedbd5a84cec73673fa5c57d33823.tar.gz gentoo-2-1ad4396831eaedbd5a84cec73673fa5c57d33823.tar.bz2 gentoo-2-1ad4396831eaedbd5a84cec73673fa5c57d33823.zip |
clc
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'dev-lisp/ecls/files')
-rw-r--r-- | dev-lisp/ecls/files/README.Gentoo | 30 | ||||
-rw-r--r-- | dev-lisp/ecls/files/clc-lite.lisp | 112 |
2 files changed, 142 insertions, 0 deletions
diff --git a/dev-lisp/ecls/files/README.Gentoo b/dev-lisp/ecls/files/README.Gentoo new file mode 100644 index 000000000000..40221f9f95ba --- /dev/null +++ b/dev-lisp/ecls/files/README.Gentoo @@ -0,0 +1,30 @@ +-*- outline -*- $Id: README.Gentoo,v 1.1 2005/06/07 01:44:37 mkennedy Exp $ + +Gentoo GNU/Linux specific notes for ECL +--------------------------------------- + +This is the README.Gentoo file from /usr/share/doc/@PF@/ directory. + + * The Gentoo port includes a patch to ECL's installed header file (ech.h) so + that TRUE and FALSE are not redefined if they're already included from + elsewhere. This makes it easier to use ECL with other software which defines + those C preprocesser symbols (eg. glib-2.0). + + * Support for a kind of Common Lisp Controller is available since + dev-lisp/ecls-0.9f_p1 but not enabled by default. The controller included in + ECL simply puts /usr/share/common-lisp/systems/ into ASDF:*CENTRAL-REGISTRY* + and extends ASDF:OUTPUT-FILES so that FASLs are placed into + /var/cache/common-lisp-controller/<username>/ecl/. + + To use this controller, either copy /usr/share/doc/@PF@/clc-lite.lisp to + your ~/.eclrc or source it from there. + + * ECL versus dev-lisp/cl-*: ECL 0.9f_p1 and later will compile a lot of the + dev-lisp/cl-* ports. Quite a few ports will fail however. Should you come + across a failure, consider isolating it in an ECL without the clc-lite.lisp + code loaded. Submit your results preferably to the Gentoo Bugzilla or to + upstream if you're absolutely sure it isn't Gentoo related. + +If you encounter any problems or have suggestions, use http://bugs.gentoo.org. +Please don't bother the upstream authors unless you are absolutely certain it is +not Gentoo-related. diff --git a/dev-lisp/ecls/files/clc-lite.lisp b/dev-lisp/ecls/files/clc-lite.lisp new file mode 100644 index 000000000000..80d0a2f161d6 --- /dev/null +++ b/dev-lisp/ecls/files/clc-lite.lisp @@ -0,0 +1,112 @@ +;;;; -*- mode: common-lisp; indent-tabs-mode: nil; package: common-lisp-controller -*- + +(defpackage #:common-lisp-controller + (:use #:common-lisp)) + +(in-package #:common-lisp-controller) + +(defvar *source-root* #p"/usr/share/common-lisp/source/") + +(defvar *fasl-root* nil) + +(defvar *implementation-name* "ecl") + +(eval-when (:load-toplevel :compile-toplevel :execute) + (unless (member :asdf *features*) + (require 'asdf))) + + +;; I cut this out of CMUCL + +(defun %enough-namestring (pathname &optional (defaults *default-pathname-defaults*)) + (let* ((path-dir (pathname-directory pathname)) + (def-dir (pathname-directory defaults)) + (enough-dir + ;; Go down the directory lists to see what matches. What's + ;; left is what we want, more or less. + (cond ((and (eq (first path-dir) (first def-dir)) + (eq (first path-dir) :absolute)) + ;; Both paths are :absolute, so find where the common + ;; parts end and return what's left + (do* ((p (rest path-dir) (rest p)) + (d (rest def-dir) (rest d))) + ((or (endp p) (endp d) + (not (equal (first p) (first d)))) + `(:relative ,@p)))) + (t + ;; At least one path is :relative, so just return the + ;; original path. If the original path is :relative, + ;; then that's the right one. If PATH-DIR is + ;; :absolute, we want to return that except when + ;; DEF-DIR is :absolute, as handled above. so return + ;; the original directory. + path-dir)))) + (make-pathname :host (pathname-host pathname) + :directory enough-dir + :name (pathname-name pathname) + :type (pathname-type pathname) + :version (pathname-version pathname)))) + +;; I cut this out of the original Common Lisp Controller v4 from Debian + +(defun calculate-fasl-root () + "Inits common-lisp controller for this user" + (unless *fasl-root* + (setf *fasl-root* + ;; set it to the username of the user: + (let* (#-cmu + (homedir (pathname-directory + (user-homedir-pathname))) + ;; cmucl has searchlist home (!) + #+cmu + (homedirs (extensions:search-list "home:")) + #+cmu + (homedir (when homedirs + (pathname-directory + (first homedirs))))) + ;; strip off :re or :abs + (when (or (eq (first homedir) + :relative) + (eq (first homedir) + :absolute)) + (setf homedir (rest homedir))) + ;; if it starts with home, nuke it + (when (string= (first homedir) + "home") + (setf homedir (rest homedir))) + ;; now append *implementation-name* + (setf homedir (append homedir + (list *implementation-name*))) + ;; this should be able to cope with + ;; homedirs like /home/p/pv/pvaneynd ... + (merge-pathnames + (make-pathname + :directory `(:relative ,@homedir)) + #p"/var/cache/common-lisp-controller/"))))) + +(defun source-root-path-to-fasl-path (source) + "Converts a path in the source root into the equivalent path in the fasl root" + (calculate-fasl-root) + (merge-pathnames + (%enough-namestring source (asdf::resolve-symlinks *source-root*)) + *fasl-root*)) + +(defmethod asdf:output-files :around ((op asdf:operation) (c asdf:component)) + (let ((orig (call-next-method))) + (mapcar #'source-root-path-to-fasl-path orig))) + +(pushnew #p"/usr/share/common-lisp/systems/" asdf:*central-registry*) + +;;;; Some notes on ENOUGH-NAMESTRING on ECL + +;; NOTE enough-namestring might be broken on ECL +;; +;; > (enough-namestring #P"/usr/share/common-lisp/source/cl-ppcre/" +;; #P"/usr/share/common-lisp/source/") +;; "/usr/share/common-lisp/source/cl-ppcre/" + +: ; SBCL: +;; +;; CL-USER> (enough-namestring #P"/usr/share/common-lisp/source/cl-ppcre/" +;; #P"/usr/share/common-lisp/source/") +;; "cl-ppcre/" |