# $Id: Portfile 106554 2013-05-30 23:03:55Z cal@macports.org $

PortSystem      1.0
PortGroup       python 1.0

name            py-pyicu
version         1.5
revision        3
categories-append   textproc
platforms       darwin
maintainers     nomaintainer
license         MIT

description     Python extension wrapping IBM's International \
                Components for Unicode C++ library (ICU)

long_description \
                ${description}

homepage        http://pyicu.osafoundation.org/
master_sites    http://pypi.python.org/packages/source/P/PyICU/
distname        PyICU-${version}

checksums       rmd160  e063b3ba951b135503d9a3a2993ff8311ac404a2 \
                sha256  7597ae80f8bbfed5ff321c6c3ed7200ef07d546a26ee8a08dc1ce578a9e33b04

python.versions 25 26 27

if {${name} != ${subport}} {
    depends_lib-append  port:icu

    patchfiles          patch-setup.py

    post-patch {
        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/setup.py
    }

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       [lindex ${master_sites} 0]
    livecheck.regex     PyICU-(\[0-9.\]+)${extract.suffix}
}
