# $Id: Portfile,v 1.13 2006/07/03 18:09:05 gwright Exp $

PortSystem 1.0
name		maxima
version		5.9.3
revision	1
categories	math
maintainers	gwright@opendarwin.org
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 e6388632d91722bb0607914bdabc72f6

depends_build	port:sbcl
depends_run	bin:wish:tk

worksrcdir	${name}-${version}

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

variant clisp conflicts darwin i386 {
		  depends_build-delete	port:sbcl
		  depends_build-append	port:clisp
		  configure.args-delete	--enable-sbcl
		  configure.args-append	--enable-clisp
		}

default_variants +test

variant test	{ test.run	yes
		  test.target	check
		}

variant	printable_doc	{
		depends_build-append	port:teTeX
		build.target		all dvi

		pre-destroot	{ system "install -d -m 755 ${destroot}/${prefix}/share/${name}/${version}/doc/dvi"
				  system "install -c -m 644 ${workpath}/${worksrcdir}/doc/info/maxima.dvi ${destroot}/${prefix}/share/${name}/${version}/doc/dvi"
				}
		}


