# -*- 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 89559 2012-02-02 20:20:31Z gwright@macports.org $

PortSystem 1.0

name            maxima
version         5.26.0
categories      math
maintainers     nomaintainer
platforms       darwin
license         GPL-2+
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     1d904f3484e41c12db8130a9ba93461d \
		sha1    bc7448486478b217c333605c6d8f6c0bbdd3526c \
		rmd160  789bb0449d65f6936bb548134ab1f33fe16858d0

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

patchfiles      src_maxima.in.patch

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