# $Id: Portfile,v 1.3 2005/02/06 22:45:43 jmpp Exp $

PortSystem 1.0

name	   rtf2latex
version	   1.5
categories	textproc
platforms	darwin
maintainers	jmpp@opendarwin.org

description	Filter to convert RTF text into LaTeX code
long_description	rtf2LaTeX is a filter built on Paul DuBois' RTF reader that converts \
			RTF (Microsoft's Rich Text Format) into LaTeX. rtf2LaTeX expends a \
			good deal of effort in an attempt to make the resulting LaTeX maintainable \
			and modifiable.

homepage	http://www.ctan.org/tex-archive/support/rtf2latex
master_sites	${homepage}
distname	rtf2LaTeX
distfiles	${distname}.${version}${extract.suffix}
checksums	md5 90964f786d149d314a57511ed9ceaaee

patchfiles	patch-Makefile.2LaTeX.diff

pre-configure	{ file rename ${worksrcpath}/Makefile.2LaTeX ${worksrcpath}/Makefile }
configure	{
		cd ${worksrcpath}
		reinplace "s|-DSYSV||g" Makefile
		reinplace "s|/usr/local|${prefix}|g" Makefile
		reinplace "s|/man/man1|/share/man/man1|g" Makefile
}

build.target	{}

post-destroot	{
		xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
		foreach f [glob -directory ${worksrcpath} -type f interna.*] {
			xinstall -m 644 -v $f ${destroot}${prefix}/share/doc/${name}
		}
}
