diff options
author | Matthew Kennedy <mkennedy@gentoo.org> | 2004-01-28 09:52:32 +0000 |
---|---|---|
committer | Matthew Kennedy <mkennedy@gentoo.org> | 2004-01-28 09:52:32 +0000 |
commit | f132b7604e575cfff3ac6eeff89da0cae6005396 (patch) | |
tree | 13e1118b394131b16ee706cc9ca2dc0c6e1622a1 /dev-lisp/common-lisp-controller/files | |
parent | Blocks app-i18n/uim (diff) | |
download | historical-f132b7604e575cfff3ac6eeff89da0cae6005396.tar.gz historical-f132b7604e575cfff3ac6eeff89da0cae6005396.tar.bz2 historical-f132b7604e575cfff3ac6eeff89da0cae6005396.zip |
*** empty log message ***
Diffstat (limited to 'dev-lisp/common-lisp-controller/files')
3 files changed, 268 insertions, 0 deletions
diff --git a/dev-lisp/common-lisp-controller/files/3.82/clc-send-command b/dev-lisp/common-lisp-controller/files/3.82/clc-send-command new file mode 100644 index 000000000000..0b2c5818385c --- /dev/null +++ b/dev-lisp/common-lisp-controller/files/3.82/clc-send-command @@ -0,0 +1,146 @@ +#!/bin/bash + +# {{{ Copyright + +# A shell version of the clc-send-command program. +# Copyright (C) 2003 The Free Software Foundation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA + +# Authors: Matthew Kennedy <mkennedy@gentoo.org> + +# }}} +# {{{ Commentary... + +# Traditionally, the controller consisted of two programs: +# clc-send-command and clc-build-daemon, The former invokes the later +# via an Internet super-server such as inetd and xinetd. +# +# Why the contoller requires a Internet super-sever is beyond my +# comprehension, hence this program. +# +# This program works exactly like the original clc-send-command +# program, however it bypasses clc-build-daemon to call the controller +# implementation scripts (/usr/lib/common-lisp/bin/*.sh) directly. + +# }}} +# {{{ Utility functions + +function error { + echo "Error: $1" + exit 255 +} + +function warning { + echo "Warning: $1" + exit 0 +} + +function is_valid_impl { + local impl=$1 + for i in /usr/lib/common-lisp/bin/*.sh; do + i=$(basename ${i} .sh) + if [ "x${i}" == "x${impl}" ]; then + return 0 + fi + done + return 1 +} + +function is_valid_package { + local impl=$1 package=$2 + test -d /usr/lib/common-lisp/${impl}/${package} +} + +function su-maybe { + if [ "x`whoami`" == "xroot" ]; then + su - cl-builder -c "$@" + else + $@ + fi +} + +function remove_package { + local impl=$1 package=$2 +# su - cl-builder -c "/usr/lib/common-lisp/bin/${impl}.sh remove ${package}" + su-maybe "/usr/lib/common-lisp/bin/${impl}.sh remove ${package}" +} + +function recompile_package { + local impl=$1 package=$2 + su - cl-builder -c "/usr/lib/common-lisp/bin/${impl}.sh rebuild ${package}" +} + +# }}} + +declare -a ARGS + +i=0; while [ ! -z "$1" ]; do + # collect the arguments we're interested in, discard all else + case $1 in + -d | --debug | -q | --quiet | -v | --verbose) + # ignore these for now + ;; + -? | --help | --usage) + cat <<EOF +clc-send-command [OPTION...] recompile <package> <implementation> +clc-send-command [OPTION...] remove <package> <implementation> +EOF + exit 1 + ;; + --verbose | -V) + # mimic the original clc-send-command program's output + echo 'version 1.0 for clc v3' + exit 1 + ;; + *) + ARGS[$i]=$1 i=$[$i + 1] + ;; + esac + shift +done + +if [ ${#ARGS[*]} -ne 3 ]; then + error 'Invalid number of arguments.' +fi + +command=${ARGS[0]} package=${ARGS[1]} impl=${ARGS[2]} + +is_valid_impl ${impl} \ + || error "Invalid implementaion: ${impl}" + +case ${command} in + remove) + is_valid_package ${impl} ${package} \ + || warning "Package ${package} for implementation ${impl} does not exist or has not been compiled yet." + remove_package ${impl} ${package} \ + || error "Cannot remove package: ${package} for implementation: ${impl}" + ;; + recompile) + recompile_package ${impl} ${package} \ + || error "Cannot recompile package: ${package} for implementation: ${impl}" + ;; + *) + error "Unrecognized command: ${command}" + ;; +esac + +exit 0 + +# Local Variables: *** +# mode: shell-script *** +# indent-tabs-mode: nil *** +# End: *** diff --git a/dev-lisp/common-lisp-controller/files/3.82/common-lisp-controller-gentoo.patch b/dev-lisp/common-lisp-controller/files/3.82/common-lisp-controller-gentoo.patch new file mode 100644 index 000000000000..752f1dd54e5c --- /dev/null +++ b/dev-lisp/common-lisp-controller/files/3.82/common-lisp-controller-gentoo.patch @@ -0,0 +1,121 @@ +Index: clc-autobuild-check +=================================================================== +RCS file: /home/mkennedy/cvsroot/common-lisp-controller/clc-autobuild-check,v +retrieving revision 1.1.1.1 +diff -u -r1.1.1.1 clc-autobuild-check +--- clc-autobuild-check 14 Jan 2004 17:41:13 -0000 1.1.1.1 ++++ clc-autobuild-check 14 Jan 2004 19:11:24 -0000 +@@ -31,7 +31,7 @@ + return + fi + if [ -r $file ]; then +- first_line="$(cat $file | head -1)" ++ first_line="$(cat $file | head -n 1)" + if [ "$first_line" ]; then + first_line="$(echo "$first_line" | tr "[A-Z]" "[a-z]")" + if [ "$(expr "$first_line" : ".*\(yes\).*")" ]; then +Index: post-sysdef-install.lisp +=================================================================== +RCS file: /home/mkennedy/cvsroot/common-lisp-controller/post-sysdef-install.lisp,v +retrieving revision 1.1.1.1 +diff -u -r1.1.1.1 post-sysdef-install.lisp +--- post-sysdef-install.lisp 14 Jan 2004 17:41:13 -0000 1.1.1.1 ++++ post-sysdef-install.lisp 14 Jan 2004 19:07:37 -0000 +@@ -146,75 +146,22 @@ + + (defun require-defsystem3 (module-name) + ;; if in the clc root: +- (let ((system (mk:find-system module-name +- :load-or-nil))) +- (or +- ;; try to load it +- (progn +- (mk:oos module-name +- :load +- :load-source-instead-of-binary nil +- :load-source-if-no-binary nil +- :bother-user-if-no-binary nil +- :compile-during-load nil) +- ;; did we load it? +- (find module-name mk::*modules* :test #'string=)) +- (progn +- (format t "~&;;;Please wait, recompiling library...") +- (cond +- (*recompiling-from-daemon* +- (mk:oos module-name +- :compile +- :verbose nil)) +- (t +- ;; first compile the sub-components! +- (dolist (sub-system (make::component-depends-on system)) +- (when (stringp sub-system) +- (setf sub-system (intern sub-system (find-package :keyword)))) +- (clc-require sub-system)) +- (common-lisp-controller:send-clc-command :recompile +- (if (stringp module-name) +- module-name +- (string-downcase +- (symbol-name +- module-name)))))) +- (terpri) +- (mk:oos module-name +- :load +- :load-source-instead-of-binary nil +- :load-source-if-no-binary nil +- :bother-user-if-no-binary nil +- :compile-during-load nil) +- t)))) ++ (let ((system (mk:find-system module-name :load-or-nil))) ++ (mk:oos module-name ++ :load ++ :load-source-instead-of-binary nil ++ :load-source-if-no-binary nil ++ :bother-user-if-no-binary nil ++ :compile-during-load nil) ++ ;; did we load it? ++ (find module-name mk::*modules* :test #'string=))) + + + (defun require-asdf (module-name) + (let ((system (asdf:find-system module-name))) + (when system +- (if (asdf-system-compiled-p system) +- (asdf:oos 'asdf:load-op module-name) +- (progn +- (format t "~&;;; Please wait, recompiling library...") +- (cond +- (*recompiling-from-daemon* +- (asdf:oos 'asdf:compile-op module-name)) +- (t +- ;; first compile the depends-on +- (dolist (sub-system +- ;; skip asdf:load-op at beginning of first list +- (cdar (asdf:component-depends-on +- (make-instance 'asdf:compile-op) system))) +- (clc-require sub-system)) +- (let ((module-name-str +- (if (stringp module-name) +- module-name +- (string-downcase (symbol-name module-name))))) +- ;; clc-build-daemon will report pkg built unless all components are removed +- (common-lisp-controller:send-clc-command :remove module-name-str) +- (common-lisp-controller:send-clc-command :recompile module-name-str)))) +- (terpri) +- (asdf:oos 'asdf:load-op module-name))) +- t))) ++ (asdf:oos 'asdf:load-op module-name))) ++ t) + + ;; we need to hack the require to + ;; call clc-send-command on load failure... +@@ -234,9 +181,7 @@ + + (defun compile-library (library) + "Recompiles the given library" +- (let* (;; this is because of clc-build-daemon +- (*recompiling-from-daemon* t) +- (system (find-system-def library))) ++ (let ((system (find-system-def library))) + (case system + (:defsystem3 + (mk:oos library :compile :verbose nil)) diff --git a/dev-lisp/common-lisp-controller/files/digest-common-lisp-controller-3.82 b/dev-lisp/common-lisp-controller/files/digest-common-lisp-controller-3.82 new file mode 100644 index 000000000000..140a1194f515 --- /dev/null +++ b/dev-lisp/common-lisp-controller/files/digest-common-lisp-controller-3.82 @@ -0,0 +1 @@ +MD5 d86baa5aba313d1b1712ec44eaa25cba common-lisp-controller_3.82.tar.gz 1231728 |