# -*- 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 50368 2009-04-29 21:43:03Z gwright@macports.org $

PortSystem 1.0

name            maxima
version         5.18.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     8be7388ad31b975335623b390bc2516e		\
		sha1    3ed2f97d509a9a407563c097943413cf4df09ed5	\
		rmd160  a1c0f0978ed85ba79ed9ab4e8bf50cf268f46ebf


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

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

variant clisp conflicts darwin i386 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>}
