# -*- 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
# $Id: Portfile 97153 2012-08-28 12:58:49Z jmr@macports.org $

PortSystem 1.0

name             ess
version          12.04-3
categories       math science
maintainers      sdf.org:jrblevin openmaintainer
license          GPL-3+
platforms        darwin
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 c9b1668cf7d8bcd2ace5f864dd69aab09ed8526a \
                 sha256 cefe758860a5a0ac4b5fe56479825a6e68c06e442cd569f55131fd99c9db40b5

depends_lib      port:emacs

use_configure    no

build {}

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    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)"
