# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem  1.0

name		advi
version     	1.6.0
revision	2
categories  	x11 graphics
maintainers 	nomaintainer
platforms   	darwin
description 	TeX DVI previewer
long_description \
    Active-DVI is an O'Caml Unix-platform DVI previewer and a \
    programmable presenter for slides written in LaTeX.

homepage        http://pauillac.inria.fr/advi/

# same format as the original, .tgz
master_sites	macports
# master_sites	ftp://ftp.inria.fr/INRIA/Projects/cristal/advi/
extract.suffix	.tgz

livecheck.type	regex
livecheck.url	${homepage}
livecheck.regex	Version (\[0-9.\]+)

checksums	sha1 881b130ad361e803fccebd6cc5a82bd4b90efff2

# you can install hevea if you want additional functionality
depends_run \
	bin:tex:texlive

depends_lib \
	port:ocaml \
	port:camlimages \
	port:xorg-libXinerama \
	port:xpm \
	port:freetype

destroot {
		xinstall -m 755 -W ${worksrcpath} advi.bin \
			 ${destroot}${prefix}/bin/advi
		xinstall -m 755 -W ${worksrcpath} advi.byt \
			 ${destroot}${prefix}/bin
		xinstall -d ${destroot}${prefix}/share/texmf/tex/latex/${name}
		xinstall -m 644 -W ${worksrcpath} doc/splash.dvi \
			 doc/scratch_write_splash.dvi \
			 doc/scratch_draw_splash.dvi tex/advilogo.eps \
			 tex/bar.eps tex/caml.eps tex/advi-annot.sty \
			 tex/advi-slides.sty tex/argv.sty \
			 tex/superpose.sty tex/advi-graphicx.sty \
			 tex/advi.sty tex/bubble.sty \
			 tex/xwindows-colors.sty \
			 ${destroot}${prefix}/share/texmf/tex/latex/${name}
		xinstall -m 444 -W ${worksrcpath} doc/advi.1 \
			 ${destroot}${prefix}/share/man/man1
}

post-install {
		ui_msg "You should run texhash now."
}
