# $Id: Portfile,v 1.1 2006/01/25 07:29:40 olegb Exp $
PortSystem	1.0
name			LyX
version		1.4.0pre3
platforms		darwin
categories	aqua
maintainers	rsorasen@broadpark.no
description	WYSIWYM document processor

long_description	LyX is an advanced open source document processor \
				that encourages an approach to writing based on \
				the structure of your documents, not their \
				appearance. LyX lets you concentrate on writing, \
				leaving details of visual layout to the software.

homepage		http://www.lyx.org
master_sites	ftp://ftp.devel.lyx.org/pub/lyx/pre/
distname		lyx-${version}
checksums		${distname}${extract.suffix} sha1 4f59ca18516672af3df93706aba4914c3484ba4f
worksrcdir	lyx-${version}
depends_lib	lib:libqt.3.3:qt3-mac

patchfiles	patch-ltmain.sh

configure.env	CC="gcc-3.3" CXX="g++-3.3" \
    LDFLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -lz" \
    QTDIR="/opt/local" CPPFLAGS="-I/opt/local/include/qt3"

configure.args --with-frontend=qt --without-x --with-included-gettext \
    --enable-optimization=-Os --disable-concept-checks \
    --prefix=/Applications/DarwinPorts/LyX.app --with-qt-dir=${prefix}

pre-destroot {
    xinstall -m 755 -d ${destroot}/Applications/DarwinPorts
    file copy ${worksrcpath}/development/MacOSX/LyX.app ${destroot}/Applications/DarwinPorts
}

post-destroot {
    file delete ${destroot}/Applications/DarwinPorts/LyX.app/Contents/Resources/LyX/images/lyx.xpm
}
