# $Id: Portfile,v 1.1 2006/07/20 03:23:40 pguyot Exp $

PortSystem			1.0
name            	xdvipdfmx
version         	0.1
description     	Extended version of dvipdfmx for XeTeX
long_description	Extended version of dvipdfmx for XeTeX \
					\
					Support files are provided by dvipdfmx port (they are \
					identical and this allows the installation of both \
					binaries)
platforms       	darwin
categories      	tex print
maintainers     	pguyot@kallisys.net
homepage			http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=xetex_linux
master_sites		http://scripts.sil.org/svn-view/xdvipdfmx/TAGS/
checksums			md5 3f757ac871b65bc49bedae67b0add1da \
					sha1 f64a8177445e5d8c206e10585a687f3c3094c08c \
					rmd160 81cb687bb0975403658caf5afc4f9488e1e61441
depends_lib			lib:libkpathsea:teTeX \
					lib:libpng:libpng \
					lib:libz:zlib \
					port:expat \
					port:fontconfig \
					port:freetype \
					port:dvipdfmx
configure.env		CFLAGS=-I${prefix}/include \
					LDFLAGS=-L${prefix}/lib
patchfiles			patch-src-pdfobj.c

pre-configure {
	system "chmod +x ${worksrcpath}/configure"
}
post-destroot {
	# Trash dvipdfm files. We got them from dvipdfmx.
	file delete -force "${destroot}${prefix}/share/texmf/dvipdfm/"
}

post-activate {
	system "mktexlsr"
}
