# -*- 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 88109 2011-12-19 08:45:12Z ryandesign@macports.org $
PortSystem 1.0

name			tex-whizzytex
version			1.3.1
revision 		3
categories		tex
platforms		darwin
maintainers		phw openmaintainer
description		An emacs minor mode for incremental viewing of LaTeX documents
long_description	${description}

homepage		http://cristal.inria.fr/whizzytex
master_sites	        http://gallium.inria.fr/whizzytex
distname		whizzytex
distfiles		${distname}-${version}.tgz
worksrcdir 		${distname}-${version}

configure.pre_args 	-prefix ${prefix}

depends_lib		bin:tex:texlive


checksums           md5     240d4ccb54b167f3baf55313411d6b92 \
                    sha1    c01e0dc5886631250c786251c009324064dfde97 \
		    rmd160  017cbdfa178216ec5f97ef0a4848813ac35550e1

pre-configure {
                  system "open /Applications/Utilities/X11.app"
}
post-destroot {
                  xinstall -m 755 -d ${destroot}${prefix}/share/texmf-dist/tex/latex/whizzytex
                  xinstall -m 644    ${worksrcpath}/src/${distname}.sty ${destroot}${prefix}/share/texmf-dist/tex/latex/whizzytex/
}


post-activate   {
                        system "mktexlsr"
			ui_msg "WhizzyTex requires a viewer, like xdvi."
			ui_msg "To use this, put the following into your ~/.emacs:"
			ui_msg "(add-to-list 'load-path \"${prefix}/share/whizzytex/emacs/\")"
			ui_msg "(autoload 'whizzytex-mode"
			ui_msg "\"whizzytex\""
			ui_msg "\"WhizzyTeX, a minor-mode WYSIWIG environment for LaTeX\" t)"
 			}

livecheck.url		"http://cristal.inria.fr/whizzytex/"
livecheck.regex		"whizzytex-((\\d+(\\.)*)+)\\.tgz"
