1 # arg 1: the new package version
4 _subsystems='glib pango gdk gtk gtkglext cairo'
8 if pacman -Qq clisp-new-clx &>/dev/null ||
9 pacman -Qq clisp-gtk2 &>/dev/null ||
10 pacman -Qq clisp-new-clx &>/dev/null; then
11 _lisp=(${_lisp[@]} 'clisp')
13 if pacman -Qq sbcl &>/dev/null; then
14 _lisp=(${_lisp[@]} 'sbcl')
16 if pacman -Qq cmucl &> /dev/null; then
17 _lisp=(${_lisp[@]} 'cmucl')
21 sbcl --noinform --no-sysinit --no-userinit \
22 --eval "(require :asdf)" \
23 --eval "(pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)" \
24 --eval "(asdf:operate 'asdf:compile-op '${_pkgname})" \
25 --eval "(quit)" &> ${_compile_log_file} || return 1
28 clisp --silent -norc -x \
29 "(load #p\"/usr/share/common-lisp/source/asdf/asdf\")
30 (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)
31 (asdf:operate 'asdf:compile-op '${_pkgname})
32 (quit)" &> ${_compile_log_file} || return 1
35 cmucl -quiet -nositeinit -noinit -eval \
36 "(load #p\"/usr/share/common-lisp/source/asdf/asdf\")
37 (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)
38 (asdf:operate 'asdf:compile-op '${_pkgname})
39 (quit)" &> ${_compile_log_file} || return 1
43 for _lispiter in ${_lisp[@]}; do
44 echo "---> Compiling lisp files using ${_lispiter} <---"
45 for _subsystem in ${_subsystems}; do
46 _pkgname=${_pkgname_base}-${_subsystem}
47 echo "---> Compiling ${_pkgname} <---"
48 if [ $_compile_log = 'y' ]; then
49 _compile_log_file=/tmp/${_pkgname}_${_lispiter}.log
51 _compile_log_file=/dev/null
55 echo "---> Done compiling lisp files (using ${_lispiter}) <---"
60 To load this library, load asdf and then run the following lines
61 (or their equivalent for your lisp of choice):
63 (push #p"/usr/share/common-lisp/systems/" asdf:*central-registry*)
64 (asdf:operate 'asdf:load-op '${_pkgname})
73 rm -f /usr/share/common-lisp/source/${_pkgname}/{*.fas,*.fasl,*.lib,*.x86f}