Portfile

# $Id: Portfile 21856 2007-02-10 16:53:18Z rhwood@macports.org $

PortSystem 1.0
name TeXShop
version 2.09d
categories editors aqua
maintainers waqar@macports.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

platform darwin 7 {
pre-fetch {
ui_msg "\n
TeXShop 2.x will not install on less than OS X 10.4 and there isn't a
TeXShop 1.x port contributed as yet to accommodate 10.3.
\n"

exit 1
}
}

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/MacPorts -target ${name} \
install INSTALL_MODE_FLAG=755 \
FRAMEWORK_SEARCH_PATHS=${worksrcpath}"
}