# -*- 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

PortSystem          1.0

name                colorsvn
version             0.3.3
revision            3
categories          textproc
license             GPL-2+
maintainers         nomaintainer
supported_archs     noarch
platforms           any

description         colorsvn is the Subversion output colorizer

long_description \
    colorsvn is the Subversion output colorizer. Colorsvn was extracted from \
    kde-sdk and was extended with build process and configuration.

homepage            http://colorsvn.tigris.org
master_sites        http://colorsvn.tigris.org/files/documents/4414/49311

checksums           rmd160  45cdbf3c4af5a54e78de6971c3428d9196615cf7 \
                    sha256  db58d5b8f60f6d4def14f8f102ff137b87401257680c1acf2bce5680b801394e \
                    size    107961

# The configure script fails if the svn program is not present at build time
# and colorsvn is a wrapper around the svn program at runtime.
depends_lib         port:subversion

post-patch {
    reinplace {/^confdir=/s|/etc|$(sysconfdir)|} $worksrcpath/Makefile.in
    reinplace "s|/etc|${prefix}/etc|g" ${worksrcpath}/colorsvn-original

}

configure.args-append --mandir=${prefix}/share/man

post-destroot {
    set docdir ${prefix}/share/doc/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} COPYING CREDITS ChangeLog ${destroot}${docdir}
}

notes "
If you have subversion installed from macports, change\
${prefix}/etc/colorsvnrc to contain 'svn: ${prefix}/bin/svn'
Also, verify your terminal's \$TERM is listed in the colorsvrc file.
"

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     "${name}-(\[0-9.\]+)</b> is the latest stable version"
