# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0

name             ess
version          13.09-1
categories       math science
maintainers      sdf.org:jrblevin openmaintainer
license          GPL-3+
platforms        any
supported_archs  noarch

description      Emacs mode for statistical programming and analysis

long_description \
    ESS is a GNU Emacs and XEmacs mode for interactive statistical programming \
    and data analysis. Languages supported: the S family (S, S-PLUS and R), \
    SAS, BUGS/JAGS, Stata and XLispStat.

homepage         http://ess.r-project.org/

master_sites     http://ess.r-project.org/downloads/ess/ \
                 http://stat.ethz.ch/ESS/downloads/ess/

extract.suffix   .tgz

checksums        rmd160 e86dd26932de00ee2f224dcc1c8eb0de78e7c2be \
                 sha256 3ad92bc0235329dae5236a674a7048bf4afab2b2894356ffb43a363fe0944113

depends_lib      port:emacs
depends_build    port:texinfo
use_configure    no

destroot.args-append        PREFIX=${destroot}${prefix}

variant emacs_app description "If your Emacs is emacs-app" {
    depends_lib-append      port:emacs-app
    depends_lib-delete      port:emacs
    destroot.args-append    EMACS=${applications_dir}/Emacs.app/Contents/MacOS/Emacs
    destroot.args-append    LISPDIR=${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp/ess
    destroot.args-append    SITELISP=${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp
    destroot.args-append    INFODIR=${destroot}${applications_dir}/Emacs.app/Contents/Resources/info/ess
    destroot.args-append    ETCDIR=${destroot}${applications_dir}/Emacs.app/Contents/Resources/etc/ess
}

notes "To use this, put the following into your ~/.emacs:\n\
    (require 'ess-site)"

livecheck.type  regex
livecheck.url   ${homepage}/index.php?Section=download
livecheck.regex {Download ESS Version ([-\d.]+)}
