# -*- 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 92366 2012-04-26 15:38:09Z nicos@macports.org $

PortSystem          1.0
PortGroup           kde4 1.1

name                kde4-kile
version             2.1.2
categories          tex kde kde4
platforms           darwin
license             GPL-2+
maintainers         nicos openmaintainer

description         KDE Integrated LaTeX Environment
long_description    Kile is a user friendly TeX/LaTeX editor for the KDE \
                    desktop environment. KDE is available for many \
                    architectures such as PC, PowerPC (Mac for example) and \
                    SPARC.

homepage            http://kile.sourceforge.net/
master_sites        sourceforge:project/kile/stable/kile-${version}
distname            kile-${version}

checksums           sha1    238a8fde4fca00e06b314c13671ff53e2ac4845c \
                    rmd160  9b03112386930ec061e335407e9536613d8fed59

use_bzip2           yes

depends_lib-append  port:kdelibs4

depends_run-append  port:okular \
                    port:kate \
                    port:ImageMagick \
                    port:ghostscript \
                    port:texlive-basic \
                    port:texlive-latex

patchfiles          patch-kilestdtools.rc.macports.diff \
                    patch-runTests.sh.macports.diff

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/data/kilestdtools.rc ${worksrcpath}/src/test/runTests.sh
    reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" ${worksrcpath}/src/data/kilestdtools.rc ${worksrcpath}/src/test/runTests.sh
}

build.asroot        yes

livecheck.type      sourceforge
livecheck.url       http://sourceforge.net/projects/kile/files/stable/
livecheck.regex     /kile-(\[0-9.\]+)${extract.suffix}
