# -*- 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 78307 2011-05-02 19:33:44Z gwright@macports.org $

PortSystem 1.0

name            maxima
version         5.24.0
categories      math
maintainers     nomaintainer
platforms       darwin
description     The Maxima computer algebra system
long_description \
        The Maxima computer algebra system is a descendant \
        of DOE Macsyma, a version of MIT's Macsyma whose \
        development was supported by the U.S. Department of \
        Energy. \
        Through the effort of the late William Shelter of the \
        University of Texas, it was released under the GNU \
        General Public License. It is one of the more \
        comprehensive and powerful computer algebra systems \
        available as open source.

homepage        http://maxima.sourceforge.net/
master_sites    sourceforge

checksums	md5     396765661059d73e03b739b350bc42da \
		sha1    13586c1221bb5f36067a4cce1e6d5fb31e44e41c \
		rmd160  46e9ce7dbf8293606ab76b50926fbef922f4cafb

depends_lib     port:sbcl
depends_run     port:tk \
                port:recode \
                port:gnuplot

configure.args  --infodir=${prefix}/share/info \
                --mandir=${prefix}/share/man \
                --enable-sbcl

if {${os.platform} != "darwin" && ${os.arch} != "i386"} {
variant clisp description {Use CLISP instead of SBCL for Lisp} {
    depends_lib-delete  port:sbcl
    depends_lib-append  port:clisp
    configure.args-delete --enable-sbcl
    configure.args-append --enable-clisp
}
}

variant abcl description {Use ABCL instead of SBCL for Lisp } {
    depends_lib-delete  port:sbcl
    depends_lib-append  port:abcl
    configure.args-delete --enable-sbcl
    configure.args-append --enable-abcl
}

test.run    yes
test.target check

variant printable_doc description {Build printable documentation} {
    depends_build-append    port:texlive
    build.target            all pdf

    pre-destroot {
        xinstall -d -m 755 ${destroot}${prefix}/share/${name}/${version}/doc/pdf
        xinstall -m 644 ${worksrcpath}/doc/info/maxima.pdf \
                        ${destroot}${prefix}/share/${name}/${version}/doc/pdf
    }
}

livecheck.regex  {<title>Maxima (.*)-source released.*</title>}
