Changeset 39964


Ignore:
Timestamp:
Sep 14, 2008, 1:09:20 PM (12 years ago)
Author:
easieste@…
Message:

Rewrote the initialization code so that sequential invocation of targets will succeed.

Fix #16034 with supplied patch.

Start to address #16518, but not sure if complete.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • users/easieste/slime/Portfile

    r35798 r39964  
    77version     20080404
    88epoch       20080404
     9revision    1
    910categories  lang
    1011platforms   darwin
     
    2122    `slime-mode' adds support for interacting with a \
    2223    running Common Lisp process for compilation,\
    23     debugging, documentation lookup, and so on. 
     24    debugging, documentation lookup, and so on.
    2425
    25 homepage        http://common-lisp.net/project/slime/   
     26homepage        http://common-lisp.net/project/slime/
    2627master_sites    ${homepage}
    2728fetch.type      cvs
     
    3435use_configure   no
    3536depends_lib     port:emacs
     37default_variants +sbcl
    3638
    37 variant app description "Build SLIME against editors/emacs-app" { 
     39variant app description "Build SLIME against editors/emacs-app" {
    3840    depends_run-append port:emacs-app
    3941    depends_run-delete port:emacs
    4042}
    41 
    42 default_variants +sbcl
    4343
    4444variant sbcl description "Require lang/sbcl for SLIME" {
     
    4646}
    4747
    48 variant openmcl description "Require lang/openmcl for SLIME" { 
     48variant openmcl description "Require lang/openmcl for SLIME" {
    4949    depends_run-append port:openmcl
    5050}
    5151
    52 variant clisp description "Require lang/clisp for SLIME" { 
     52variant clisp description "Require lang/clisp for SLIME" {
    5353    depends_run-append port:clisp
    5454}
    5555
    56 post-patch {
     56set slime_emacs_binary [
     57   if { [regexp carbon [join [registry_installed emacs]]]  || [ variant_isset app ] } { 
     58       list "/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs"
     59   } else {
     60       list "${prefix}/bin/emacs"   
     61   }
     62]
     63ui_msg "slime_emacs_binary is $slime_emacs_binary"
     64
     65set slime_site_lisp_dir  [
     66     if {[ variant_isset app ]} { 
     67         list "${destroot}/Applications/MacPorts/Emacs.app/Contents/Resources/site-lisp/slime"
     68     } else {
     69         list "${destroot}${prefix}/share/emacs/site-lisp/slime"
     70     }
     71]
     72
     73set slime_site_lisp_contrib_dir ${slime_site_lisp_dir}/contrib
     74
     75set slime_byte_compile_p   0
     76
     77post-patch {
    5778    reinplace "s|/usr/local|${prefix}/share|g" \
    58         ${worksrcpath}/doc/makefile
     79        ${worksrcpath}/doc/Makefile
    5980}
    6081
    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     }
     82configure {
     83#     if {! [file executable ${slime_emacs_binary}]} {
     84#         set slime_byte_compile_p 0
     85#         ui_msg "Couldn't find an executable Emacs image so won't byte compile the Elisp files."
     86#     } else {
     87#         set slime_byte_compile_p 1
     88#         ui_msg "Emacs binary used for byte compilation is ${slime_emacs_binary}."
     89#     }
     90    set slime_byte_compile_p 0
     91}
    7692
    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     }
     93build {
     94    cd ${worksrcpath}
     95    if {${slime_byte_compile_p}} {
     96         system "${slime_emacs_binary} \
     97               -batch  \
     98   --directory ${worksrcpath}  --directory ${worksrcpath}/contrib \
     99                 --funcall batch-byte-compile \
     100               contrib/*.el"
     101         system "${slime_emacs_binary} \
     102               -batch  \
     103   --directory ${worksrcpath}  --directory ${worksrcpath}/contrib \
     104                 --funcall batch-byte-compile \
     105               *.el"
     106#         system "${slime_emacs_binary} \
     107#               --batch  --directory $pwd  --directory contrib \
     108#                --funcall batch-byte-compile \
     109#              *.el"
     110#         system "${slime_emacs_binary} \
     111#               --batch  --directory .  --funcall batch-byte-compile \
     112#               slime.el \
     113#               slime-autoloads.el \
     114#               hyperspec.el"
    83115
    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"
     116#        cd ${worksrcpath}/contrib
     117#         system "${slime_emacs_binary} \
     118#               --batch \
     119#               --directory .  --directory .. \
     120#               --funcall batch-byte-compile  \
     121#               slime.el slime-autoloads.el \
     122#               hyperspec.el \
     123#               bridge.el \
     124#               inferior-slime.el \
     125#               slime-asdf.el \
     126#               slime-parse.el \
     127#               slime-autodoc.el \
     128#               slime-banner.el \
     129#               slime-c-p-c.el \
     130#               slime-editing-commands.el \
     131#               slime-fancy-inspector.el \
     132#               slime-fancy.el \
     133#               slime-fuzzy.el \
     134#               slime-highlight-edits.el \
     135#               slime-indentation.el \
     136#               slime-motd.el \
     137#               slime-parse.el \
     138#               slime-presentation-streams.el \
     139#               slime-presentations.el \
     140#               slime-references.el \
     141#               slime-scheme.el \
     142#               slime-scratch.el \
     143#               slime-tramp.el \
     144#               slime-typeout-frame.el \
     145#               slime-xref-browser.el"
    131146    }
    132147
     
    135150}
    136151
    137 destroot    { 
     152destroot    {
    138153    cd ${worksrcpath}
    139     xinstall -m 755 -d ${slime_site_lisp_dest}
    140    
     154    xinstall -m 755 -d ${slime_site_lisp_dir}
     155
    141156    foreach file [glob *.el *.elc *.lisp ChangeLog] {
    142         xinstall -m 644 ${file} ${slime_site_lisp_dest}
     157        xinstall -m 644 ${file} ${slime_site_lisp_dir}
    143158    }
    144159
    145160    cd ${worksrcpath}/contrib
    146     xinstall -m 755 -d ${slime_site_lisp_dest_contrib}
     161    xinstall -m 755 -d ${slime_site_lisp_contrib_dir}
    147162    foreach file [glob *.el *.elc *.lisp ChangeLog] {
    148         xinstall -m 644 ${file} ${slime_site_lisp_dest_contrib}
     163        xinstall -m 644 ${file} ${slime_site_lisp_contrib_dir}
    149164    }
    150          
    151     xinstall -m 644 ${worksrcpath}/doc/slime.info ${destroot}${prefix}/share/info 
     165
     166    xinstall -m 644 ${worksrcpath}/doc/slime.info ${destroot}${prefix}/share/info
    152167}
    153168
    154 post-activate   { 
     169post-activate   {
    155170    ui_msg "To use SLIME, you need to have a Common Lisp installed with which"
    156171    ui_msg "you wish to interact.  At the moment, 'openmcl', 'sbcl', and"
     
    173188    ui_msg "   \'(slime-setup '(slime-fancy slime-banner)))"
    174189    ui_msg ""
    175     ui_msg "Populate the initialization list in SLIME-LISP-IMPLEMENTATIONS" 
     190    ui_msg "Populate the initialization list in SLIME-LISP-IMPLEMENTATIONS"
    176191    ui_msg "with the correct paths to the Common Lisp exectuables you wish to use."
    177192    ui_msg ""
Note: See TracChangeset for help on using the changeset viewer.