# $Id: Portfile,v 1.15 2006/06/12 22:37:19 waqar Exp $

PortSystem    	1.0
name      	TeXShop
version       	2.09d
categories    	editors aqua
maintainers   	waqar@opendarwin.org
description   	TeX previewer for Mac OS X
long_description   \
	TeXShop is a TeX previewer for Mac OS X, written in Cocoa. 	\
	Since pdf is a native file format on OS X, TeXShop uses 	\
	"pdftex" and "pdflatex" rather than "tex" and "latex" to 	\
	typeset, these programs in the standard teTeX distribution 	\
	of TeX produce pdf output instead of dvi output.
homepage	http://www.uoregon.edu/~koch/texshop/texshop.html
platforms	macosx
master_sites	http://www.uoregon.edu/~koch/texshop
use_zip		yes
distname	texshopsource
checksums	md5 50316d4b37fefed9de554f272a435a57			\
		sha1 c7f75100862804a6ab3cf14dbd7be3980f8c4fa8

use_configure   no
pre-build	{
# German.lproj has the help file with wrong case we have to move it to
# tmp and then correct the case.
	file rename ${worksrcpath}/German.lproj/TexShopHelp		\
		${worksrcpath}/German.lproj/TexShopHelp1
	file rename ${worksrcpath}/German.lproj/TexShopHelp1		\
		${worksrcpath}/German.lproj/TeXShopHelp
}

build.type	pbx
build.target	-target ${name}
build.args	build FRAMEWORK_SEARCH_PATHS=${worksrcpath}

destroot 	{ 
	cd ${worksrcpath}
	system "${build.cmd} DSTROOT=${destroot}			\
		INSTALL_PATH=/Applications/DarwinPorts -target ${name} 	\
		install	INSTALL_MODE_FLAG=755 				\
		FRAMEWORK_SEARCH_PATHS=${worksrcpath}"
}
