# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 56357 2009-08-26 14:53:03Z snc@macports.org $

PortSystem	        1.0

name			    LyX
version			    1.6.4
set branch          [join [lrange [split ${version} .] 0 1] .]
categories	        aqua
#license             GPLv2+
maintainers	        snc openmaintainer
description	        WYSIWYM document processor
homepage		    http://www.lyx.org/
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.


platforms		    darwin
depends_build	    port:pkgconfig
depends_lib		    port:qt4-mac \
				    bin:tex:texlive \
				    port:ImageMagick \
				    port:python25

use_bzip2		    yes
distname		    lyx-${version}
master_sites	    http://lyx.cybermirror.org/stable/${branch}.x/ \
				    http://sunsite.icm.edu.pl/pub/unix/editors/lyx/stable/${branch}.x/ \
				    ftp://ftp.ntua.gr/pub/X11/LyX/stable/${branch}.x/ \
				    ftp://ftp.lyx.org/pub/lyx/stable/${branch}.x/ \
				    http://gd.tuwien.ac.at/publishing/tex/lyx/stable/${branch}.x/

checksums           md5     3dd759f91acd7765c304336c51aa3a2a \
                    sha1    2be7a822f36ca94498bc7c9665f4489156cd56c5 \
                    rmd160  c222d38fbd3bcc375f9e42433df70a6f98c94e07

configure.python    ${prefix}/bin/python2.5
configure.pre_args  --prefix=${applications_dir}/LyX.app
configure.args      --with-frontend=qt4 --without-x --with-included-gettext \
                    --enable-optimization=-Os --disable-concept-checks \
                    --with-qt4-dir=${prefix}/libexec/qt4-mac \
                    --with-version-suffix=-1.6

build.env           LD_FLAGS="-framework Carbon -framework OpenGL -framework AGL -framework QuickTime -framework Cocoa" \
                    LD_LIBRARY_PATH=${prefix}/libexec/qt4-mac/lib \
                    CPLUS_INCLUDE_PATH=${prefix}/libexec/qt4-mac/include

livecheck.check     regex
livecheck.url       ${homepage}
livecheck.regex     "${name} (\\d+\\.\\d+\\.\\d+) released"
