Ticket #36095: Portfile.diff

File Portfile.diff, 1.4 KB (added by tom@…, 12 years ago)

patch to install puppet mode for emacs

  • Portfile

    old new  
    1111maintainers         explanatorygap.net:nigel puppetlabs.com:nigel openmaintainer
    1212supported_archs     noarch
    1313
     14variant emacs description {Install puppet mode for emacs.} {
     15    depends_lib-append    port:emacs
     16}
     17
    1418description         Puppet is a configuration management solution.
    1519
    1620long_description    Puppet is a configuration management solution. \
     
    5054                        xinstall -m 755 -d ${etcexamplesdestdir}
    5155                        eval xinstall -m 644 [glob ${worksrcpath}/examples/etc/puppet/*] \
    5256                            ${etcexamplesdestdir}
     57   
     58                        if {[variant_isset emacs]} {
     59                            set emacsdir ${destroot}${prefix}/share/emacs/site-lisp
     60                            xinstall -m 755 -d ${emacsdir}
     61                            eval xinstall -m 644 ${worksrcpath}/ext/emacs/puppet-mode.el ${emacsdir}
     62                        }
    5363                    }
     64
     65post-activate   {
     66   
     67    if {[variant_isset emacs]} {
     68        ui_msg "To use the puppet mode for emacs, put the following into your ~/.emacs:"
     69        ui_msg "(autoload 'puppet-mode \"puppet-mode\" \"Major mode for editing puppet manifests\")"
     70        ui_msg "(add-to-list 'auto-mode-alist '(\"\\\\.pp$\" . puppet-mode))"
     71        }
     72}