# -*- 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

PortSystem              1.0
PortGroup               github 1.0

github.setup            emacs-php php-mode 1.27.0 v
revision                0
checksums               rmd160  0b17317b2052fb0c286a63c30154d0d9d312b51c \
                        sha256  2ac03fe0e553d2df630b267f51069a815e430e3b73bf14f6844244ccfbb4778f \
                        size    133871

name                    php-mode.el
categories              lang editors
platforms               any
supported_archs         noarch
license                 GPL-3+
maintainers             {ryandesign @ryandesign} openmaintainer
github.tarball_from     archive

description             PHP mode for Emacs

long_description        An Emacs major mode for editing PHP code. \
                        Features: Syntax coloring and indenting\; \
                        Documentation browse and search functions\; \
                        Support for Imenu and SpeedBar\; \
                        Customization options

# We want emacs from MacPorts since this will install stuff in emacs' site-lisp and we want
# it to go into ${prefix}'s site-lisp.
depends_lib             path:bin/emacs:emacs

use_configure           no

build.dir               ${worksrcpath}/lisp

build {
    system -W ${build.dir} "emacs --batch --eval \
        '(progn (setq load-path (cons \".\" load-path)) \
                (byte-compile-file \"php-mode.el\"))'"
}

destroot {
    set site_lisp ${prefix}/share/emacs/site-lisp
    xinstall -d ${destroot}${site_lisp}
    xinstall -W ${build.dir} php-mode.el php-mode.elc ${destroot}${site_lisp}
}

notes "
To use this, put the following into your ~/.emacs:

(setq auto-mode-alist
  (cons '(\"\\\\.php\\\\w?\" . php-mode) auto-mode-alist))
(autoload 'php-mode \"php-mode\" \"PHP mode.\" t)
"
