# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $

PortSystem      1.0
PortGroup       python25 1.0
name            py25-mecab
version         0.96

platforms       darwin
maintainers     gmail.com:rsky0711
description     a Python module for MeCab
long_description ${description}

homepage        http://mecab.sourceforge.net/
master_sites    sourceforge:mecab
distname        mecab-python-${version}
checksums       md5    5faa154aa8a95145d6a58befa42e6c40 \
                sha1   53089465107a3b45b0b31a8bd69f654ea561a200 \
                rmd160 1f62a74d1673867a611de0ce9181ef011df67e46

patchfiles      patch-test.py
patch.pre_args  -p0

categories-append   textproc japanese
depends_lib-append  port:mecab

post-patch {
    reinplace s|%PREFIX%/bin/python|${python.bin}|g ${worksrcpath}/test.py
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/examples
    xinstall -m 644 ${worksrcpath}/test.py \
        ${destroot}${prefix}/share/doc/${name}/examples
}
