# $Id: Portfile 80236 2011-07-07 14:45:02Z jmr@macports.org $
# -*- 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
PortGroup python26 1.0

name                py26-roman
version             1.4.0
categories-append   textproc
license             PSF-2.1.1
platforms           darwin
supported_archs     noarch
maintainers         nomaintainer
description         Integer to Roman numerals converter
long_description    ${description}
homepage            http://pypi.python.org/pypi/roman/
master_sites        http://pypi.python.org/packages/source/r/roman/
distname            roman-${version}

checksums           md5     4f8832ed4108174b159c2afb4bd1d1dd \
                    sha1    3d9cf0c46a4e3558785a9f7c90cd96a2d31dc9b0 \
                    rmd160  9c9f1d8de8e19f6dcab02a28b2a28a1a7f3dd546

depends_lib         port:py26-distribute

pre-activate {
    if {[file exists ${python.pkgd}/roman.py] 
        && ![catch {set vers [lindex [registry_active py26-docutils] 0]}]
        && [rpm-vercomp [lindex $vers 1] 0.6] < 0} {
        set deactivate_proc registry_deactivate_composite
        if {[info commands registry_deactivate_composite] == {}} {
            set deactivate_proc registry_deactivate
        }
        $deactivate_proc py26-docutils "" [list ports_nodepcheck 1]
    }
}

livecheck.type      regex
livecheck.regex     {roman-(\d+(?:\.\d+)*)}
