# $Id: Portfile,v 1.2 2005/02/06 22:47:35 jmpp Exp $

PortSystem 1.0

name	   latex2rtf
version	   1.9.16a
categories	textproc
platforms	darwin
maintainers	jmpp@opendarwin.org

description	Translator program intended to translate a LaTeX document into RTF
long_description	LaTeX2rtf is a translator program which is intended to translate a LaTeX \
			document (precisely: the text and a limited subset of LaTeX tags) into \
			the RTF format which can be imported by several textprocessors (including \
			Microsoft Word for Windows and Word for Macintosh).

homepage	http://latex2rtf.sourceforge.net/
master_sites	sourceforge
checksums	md5 b1c766baeb645c954fb2454fc51c5f03

patchfiles	patch-Makefile.diff

depends_run	bin:tex:teTeX \
		bin:gs:ghostscript \
		bin:convert:ImageMagick \
		bin:pnmtopng:netpbm

configure	{
		cd ${worksrcpath}
		reinplace "s|/usr/local|${prefix}|g" Makefile
		reinplace "s|/man/man1|/share/man/man1|g" Makefile
		reinplace "s|/info|/share/info|" Makefile
}

post-destroot	{ 
		cd ${worksrcpath}
		xinstall -m 755 -v scripts/latex2pn.bat ${destroot}${prefix}/bin
		xinstall -m 755 -v scripts/latex2png_1 ${destroot}${prefix}/bin
		xinstall -m 755 -v scripts/latex2png_2 ${destroot}${prefix}/bin
		system "${build.cmd} install-info DESTDIR=${destroot}"
}
