New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 35801

Show
Ignore:
Timestamp:
04/06/2008 13:31:33 (4 years ago)
Author:
easieste@…
Message:

Updated SLIME to 20080404 with the following changes:

Adding 'app' variant to build SLIME against editors/emacs-app <jrh@…>

Default variant is 'sbcl'.

Moved setup code from 'configure' to 'platform darwin' (#macports jmr_mp)

Updated post-activate message.

Check for emacs binary to actually byte compile *.el files.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/slime/Portfile

    r24798 r35801  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 
    12# $Id$ 
    23 
    3 PortSystem 1.0 
     4PortSystem  1.0 
    45 
    5 name            slime 
    6 version         20070503 
    7 epoch           20070503 
    8 categories      lang 
    9 maintainers     evenson@panix.com 
     6name        slime 
     7version     20080404 
     8epoch       20080404 
     9categories  lang 
     10platforms   darwin 
     11maintainers evenson@panix.com 
    1012 
    11 description     An Emacs mode for unifying Common Lisp development 
     13description An Emacs mode for unifying Common Lisp development 
    1214 
    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.  
     15long_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.  
    2224 
    23 homepage        http://common-lisp.net/project/slime/    
    24 master_sites    ${homepage} 
    25 fetch.type      cvs 
    26 cvs.root        :pserver:anonymous@common-lisp.net:/project/slime/cvsroot 
    27 cvs.module      slime 
    28 cvs.password    anonymous 
    29 cvs.date        ${version} 
    30 worksrcdir      slime 
     25homepage        http://common-lisp.net/project/slime/    
     26master_sites    ${homepage} 
     27fetch.type      cvs 
     28cvs.root        :pserver:anonymous@common-lisp.net:/project/slime/cvsroot 
     29cvs.module      slime 
     30cvs.password    anonymous 
     31cvs.date        ${version} 
     32worksrcdir      slime 
    3133 
    32 use_configure   no 
    33 depends_lib     port:emacs 
    34 depends_run     port:sbcl 
     34use_configure   no 
     35depends_lib     port:emacs 
    3536 
    36 variant devel   { depends_lib-append port:emacs-devel 
    37                   depends_lib-delete port:emacs 
    38                 } 
    39  
    40 variant openmcl { depends_run-append port:openmcl 
    41                   depends_run-delete port:sbcl 
    42                 } 
    43  
    44 variant clisp   { depends_run-append port:clisp 
    45                   depends_run-delete port:sbcl 
    46                 } 
    47  
    48 post-patch      { reinplace "s|/usr/local|${prefix}/share|g" \ 
    49                     ${worksrcpath}/doc/makefile 
     37variant app description "Build SLIME against editors/emacs-app" {  
     38    depends_run-append port:emacs-app 
     39    depends_run-delete port:emacs 
    5040} 
    5141 
    52 pre-build       { global emacs_binary 
    53                   if {[ variant_isset devel ]} { 
    54                         set emacs_binary [ glob ${prefix}/bin/emacs\-* ] 
    55                         ui_msg "emacs binary name is ${emacs_binary}" 
    56                   } else { 
    57                         set emacs_binary        ${prefix}/bin/emacs 
    58                   } 
    59 } 
    60                          
    61 build           { cd ${worksrcpath} 
    62                   upvar #0 emacs_binary emacs_bin 
    63                   system "${emacs_bin}                  \ 
    64                           --batch                       \ 
    65                           --directory .                 \ 
    66                           --funcall batch-byte-compile  \ 
    67                           slime.el                      \ 
    68                           hyperspec.el                  \ 
    69                           tree-widget.el" 
     42default_variants +sbcl 
    7043 
    71                   cd ${worksrcpath}/doc 
    72                   system "make slime.info" 
     44variant sbcl description "Require lang/sbcl for SLIME" { 
     45    depends_run-append port:sbcl 
    7346} 
    7447 
    75 destroot        { cd ${worksrcpath} 
    76                   set site_lisp_dest ${destroot}${prefix}/share/emacs/site-lisp/slime 
    77                   xinstall -m 755 -d ${site_lisp_dest} 
    78  
    79                   foreach file [glob *.el *.elc *.lisp ChangeLog] { 
    80                         xinstall -m 644 ${file} ${site_lisp_dest} 
    81                   } 
    82  
    83                   xinstall -m 644 ${worksrcpath}/doc/slime.info ${destroot}${prefix}/share/info   
     48variant openmcl description "Require lang/openmcl for SLIME" {  
     49    depends_run-append port:openmcl 
    8450} 
    8551 
    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." 
     52variant clisp description "Require lang/clisp for SLIME" {  
     53    depends_run-append port:clisp 
    10454} 
    10555 
     56post-patch {  
     57    reinplace "s|/usr/local|${prefix}/share|g" \ 
     58        ${worksrcpath}/doc/makefile 
     59} 
     60 
     61platform 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             
     93build {  
     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 
     137destroot    {  
     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 
     154post-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