| 13 | | long_description \ |
| 14 | | SLIME extends Emacs with new support for interactive \ |
| 15 | | programming in Common Lisp. The features are \ |
| 16 | | centred around `slime-mode', an Emacs minor-mode \ |
| 17 | | that complements the standard `lisp-mode'. While \ |
| 18 | | `lisp-mode' supports editing Lisp source files, \ |
| 19 | | `slime-mode' adds support for interacting with a \ |
| 20 | | running Common Lisp process for compilation,\ |
| 21 | | debugging, documentation lookup, and so on. |
| | 15 | long_description \ |
| | 16 | SLIME extends Emacs with new support for interactive \ |
| | 17 | programming in Common Lisp. The features are \ |
| | 18 | centred around `slime-mode', an Emacs minor-mode \ |
| | 19 | that complements the standard `lisp-mode'. While \ |
| | 20 | `lisp-mode' supports editing Lisp source files, \ |
| | 21 | `slime-mode' adds support for interacting with a \ |
| | 22 | running Common Lisp process for compilation,\ |
| | 23 | debugging, documentation lookup, and so on. |
| 86 | | post-activate { ui_msg "To use SLIME, you need to have a Common Lisp installed with which" |
| 87 | | ui_msg "you wish to interact. At the moment, 'openmcl', 'sbcl', and" |
| 88 | | ui_msg "'clisp' all work." |
| 89 | | ui_msg "" |
| 90 | | ui_msg "MacPorts also has 'gcl' (broken on OS X)." |
| 91 | | ui_msg "" |
| 92 | | ui_msg "Then put the following in your ~/.emacs:" |
| 93 | | ui_msg " (require 'slime)" |
| 94 | | ui_msg " (slime-setup)" |
| 95 | | ui_msg " (setq inferior-lisp-program \"sbcl\")" |
| 96 | | ui_msg "" |
| 97 | | ui_msg "Replace 'sbcl' with the name of the Common Lisp exectuable" |
| 98 | | ui_msg "if you wish to use a different lisp." |
| 99 | | ui_msg "" |
| 100 | | ui_msg "Then, 'M-x slime' from Emacs should connect you to your chosen" |
| 101 | | ui_msg "Lisp environment." |
| 102 | | ui_msg "" |
| 103 | | ui_msg "You may have to exit and restart Emacs to get slime completely installed." |
| | 52 | variant clisp description "Require lang/clisp for SLIME" { |
| | 53 | depends_run-append port:clisp |
| | 56 | post-patch { |
| | 57 | reinplace "s|/usr/local|${prefix}/share|g" \ |
| | 58 | ${worksrcpath}/doc/makefile |
| | 59 | } |
| | 60 | |
| | 61 | platform darwin { |
| | 62 | global slime_emacs_binary |
| | 63 | global slime_site_lisp_dest |
| | 64 | global slime_site_lisp_contrib |
| | 65 | global slime_byte_compile_p |
| | 66 | global slime_site_lisp_dest_contrib |
| | 67 | if {[ variant_isset app ]} { |
| | 68 | set slime_emacs_binary /Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs |
| | 69 | set slime_site_lisp_dest ${destroot}/Applications/MacPorts/Emacs.app/Contents/Resources/site-lisp |
| | 70 | set slime_site_lisp_contrib /Applications/MacPorts/Emacs.app/Contents/Resources/site-lisp |
| | 71 | } else { |
| | 72 | set slime_emacs_binary ${prefix}/bin/emacs |
| | 73 | set slime_site_lisp_dest ${destroot}${prefix}/share/emacs/site-lisp/slime |
| | 74 | set slime_site_lisp_contrib ${prefix}/share/emacs/site-lisp/contrib |
| | 75 | } |
| | 76 | |
| | 77 | set slime_site_lisp_dest_contrib ${slime_site_lisp_dest}/contrib |
| | 78 | |
| | 79 | # kludge if 'emacs+carbon' is installed |
| | 80 | if {[regexp carbon [join [registry_installed emacs]]]} { |
| | 81 | set slime_emacs_binary /Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs |
| | 82 | } |
| | 83 | |
| | 84 | if {! [file executable ${slime_emacs_binary}]} { |
| | 85 | set slime_byte_compile_p 0 |
| | 86 | ui_msg "Couldn't find an executable Emacs image so won't byte compile." |
| | 87 | } else { |
| | 88 | set slime_byte_compile_p 1 |
| | 89 | ui_msg "Emacs binary used for byte compilation is ${slime_emacs_binary}." |
| | 90 | } |
| | 91 | } |
| | 92 | |
| | 93 | build { |
| | 94 | cd ${worksrcpath} |
| | 95 | upvar #0 slime_emacs_binary emacs_bin |
| | 96 | if {${slime_byte_compile_p}} { |
| | 97 | system "${emacs_bin} \ |
| | 98 | --batch --directory . --funcall batch-byte-compile \ |
| | 99 | slime.el \ |
| | 100 | slime-autoloads.el \ |
| | 101 | hyperspec.el" |
| | 102 | |
| | 103 | cd ${worksrcpath}/contrib |
| | 104 | system "${emacs_bin} \ |
| | 105 | --batch \ |
| | 106 | --directory . --directory .. \ |
| | 107 | --funcall batch-byte-compile \ |
| | 108 | bridge.el \ |
| | 109 | inferior-slime.el \ |
| | 110 | slime-asdf.el \ |
| | 111 | slime-parse.el \ |
| | 112 | slime-autodoc.el \ |
| | 113 | slime-banner.el \ |
| | 114 | slime-c-p-c.el \ |
| | 115 | slime-editing-commands.el \ |
| | 116 | slime-fancy-inspector.el \ |
| | 117 | slime-fancy.el \ |
| | 118 | slime-fuzzy.el \ |
| | 119 | slime-highlight-edits.el \ |
| | 120 | slime-indentation.el \ |
| | 121 | slime-motd.el \ |
| | 122 | slime-parse.el \ |
| | 123 | slime-presentation-streams.el \ |
| | 124 | slime-presentations.el \ |
| | 125 | slime-references.el \ |
| | 126 | slime-scheme.el \ |
| | 127 | slime-scratch.el \ |
| | 128 | slime-tramp.el \ |
| | 129 | slime-typeout-frame.el \ |
| | 130 | slime-xref-browser.el" |
| | 131 | } |
| | 132 | |
| | 133 | cd ${worksrcpath}/doc |
| | 134 | system "make slime.info" |
| | 135 | } |
| | 136 | |
| | 137 | destroot { |
| | 138 | cd ${worksrcpath} |
| | 139 | xinstall -m 755 -d ${slime_site_lisp_dest} |
| | 140 | |
| | 141 | foreach file [glob *.el *.elc *.lisp ChangeLog] { |
| | 142 | xinstall -m 644 ${file} ${slime_site_lisp_dest} |
| | 143 | } |
| | 144 | |
| | 145 | cd ${worksrcpath}/contrib |
| | 146 | xinstall -m 755 -d ${slime_site_lisp_dest_contrib} |
| | 147 | foreach file [glob *.el *.elc *.lisp ChangeLog] { |
| | 148 | xinstall -m 644 ${file} ${slime_site_lisp_dest_contrib} |
| | 149 | } |
| | 150 | |
| | 151 | xinstall -m 644 ${worksrcpath}/doc/slime.info ${destroot}${prefix}/share/info |
| | 152 | } |
| | 153 | |
| | 154 | post-activate { |
| | 155 | ui_msg "To use SLIME, you need to have a Common Lisp installed with which" |
| | 156 | ui_msg "you wish to interact. At the moment, 'openmcl', 'sbcl', and" |
| | 157 | ui_msg "'clisp' all work. By default, MacPorts SLIME installs 'sbcl' as a" |
| | 158 | ui_msg "dependency." |
| | 159 | ui_msg "" |
| | 160 | ui_msg "Then put the following in your ~/.emacs:" |
| | 161 | ui_msg "" |
| | 162 | ui_msg "(require 'slime-autoloads)" |
| | 163 | ui_msg "(setq slime-lisp-implementations" |
| | 164 | ui_msg " \`((sbcl (\"/opt/local/bin/sbcl\"))" |
| | 165 | ui_msg " (clisp (\"/opt/local/bin/clisp\"))))" |
| | 166 | ui_msg "(add-hook \'lisp-mode-hook" |
| | 167 | ui_msg " (lambda ()" |
| | 168 | ui_msg " (cond ((not (featurep \'slime))" |
| | 169 | ui_msg " (require \'slime) " |
| | 170 | ui_msg " (normal-mode)))))" |
| | 171 | ui_msg "" |
| | 172 | ui_msg "(eval-after-load \"slime\"" |
| | 173 | ui_msg " \'(slime-setup '(slime-fancy slime-banner)))" |
| | 174 | ui_msg "" |
| | 175 | ui_msg "Populate the initialization list in SLIME-LISP-IMPLEMENTATIONS" |
| | 176 | ui_msg "with the correct paths to the Common Lisp exectuables you wish to use." |
| | 177 | ui_msg "" |
| | 178 | ui_msg "Then, 'M-x slime' from Emacs should connect you to the first" |
| | 179 | ui_msg "CL implementation in the list. 'C-- M-x slime' will present" |
| | 180 | ui_msg "an interactive chooser for additional implementations in the list." |
| | 181 | ui_msg "" |
| | 182 | } |
| | 183 | |
| | 184 | |