# -*- 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 66285 2010-04-08 08:09:09Z jmr@macports.org $

PortSystem 1.0

name            maxima
version         5.20.1
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.

#bugs   The graphical interfaces (xmaxima and the maxima \
#       session mode of TeXmacs) are still quite immature and \
#       prone to hang. \
#       \
#       The not all of the printable documentation can be built \
#       from the top level makefile yet. The printable_doc \
#       variant builds the reference manual in dvi format and \
#       forces its installation into \
#       ${prefix}/share/maxima/<version>/doc/dvi.

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

checksums	md5     cec78b96cc453e470871063fc16cd52f \
		sha1    2e4f1de880dbbaf6f7bf01f807269951a1a3ff49 \
		rmd160  eb4a277f9fdc889132292ef8daf7b7b58143152c

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
}
}

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>}
