# -*- 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 92623 2012-05-02 11:55:13Z jmr@macports.org $

PortSystem              1.0
PortGroup               qt4 1.0

name                    tea
version                 25.1.0
revision                2
description             TEA is the powerful text editor for GNU/Linux and *BSD.
long_description        ${description}
maintainers             nomaintainer
categories              editors
platforms               darwin
homepage                http://tea.linux.kiev.ua/
master_sites            sourceforge:project/tea-editor/tea-editor/${version}

checksums               md5     072f7d60db0b5ffb6f0b3411af22620e \
                        sha1    49d3c2d5058652f527ea82f6fe1e0c69f6d8433f \
                        rmd160  1c2dc1173038a5a0334dff3c6fd56501bb28dd20

depends_lib-append      port:aspell

use_bzip2               yes

configure.cmd           ${qt_qmake_cmd}
configure.pre_args
configure.universal_args

build.args              CC=${configure.cc} CXX=${configure.cxx}

post-patch {
    reinplace "s|/usr|${prefix}|" ${worksrcpath}/src.pro
    reinplace "s|-laspell|-laspell -lz|" ${worksrcpath}/src.pro
}

destroot {
    copy ${worksrcpath}/bin/tea.app ${destroot}${applications_dir}
}
