# -*- 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 117448 2014-02-26 19:18:48Z devans@macports.org $

PortSystem      1.0

name            itstool
version         2.0.2
revision        1
license         GPL-3+
set branch      [join [lrange [split ${version} .] 0 1] .]

description     ITS Tool allows you to translate your XML documents with PO files, \
                using rules from the W3C Internationalization Tag Set.

long_description \
                ${description}

maintainers     devans openmaintainer
categories      textproc
platforms       darwin
homepage        http://itstool.org/
master_sites    http://files.itstool.org/${name}

use_bzip2       yes

checksums       rmd160  04531d2a4a8c5fef3b77888cb267063af2cb2917 \
                sha256  bf909fb59b11a646681a8534d5700fec99be83bb2c57badf8c1844512227033a

supported_archs noarch
installs_libs   no

depends_build   port:gawk

patchfiles      patch-configure.diff

variant python26 conflicts python27 description {Use Python 2.6} {
    depends_lib-append  port:py26-libxml2
    configure.python    ${prefix}/bin/python2.6
}

variant python27 conflicts python26 description {Use Python 2.7} {
    depends_lib-append  port:py27-libxml2
    configure.python    ${prefix}/bin/python2.7
}

if {![variant_isset python26]} {
    default_variants +python27
}

livecheck.type  regex
livecheck.url   http://itstool.org/download/
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
