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

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         Text-ChaSen 1.04
revision            5
categories-append   textproc japanese
maintainers         nomaintainer
description         ChaSen library module for Perl5.
long_description    ${description}
platforms           darwin
license             Restrictive/Distributable
homepage            http://chasen-legacy.osdn.jp/

checksums           rmd160  964b4f3a63554cd04a272c22be0d5a8dc9258484 \
                    sha256  5690c9732a2d14baf50f76b7f11ba6aa2fb4ecb08c3fb085df6f2d97a8692c8c

if {${perl5.major} != ""} {
    depends_build-append \
                    port:libiconv

    depends_lib-append \
                    port:chasen

    patchfiles      declare-encoding.patch

    post-destroot {
        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}/doc
        xinstall -m 644 -W ${worksrcpath} ChangeLog README ${destroot}${prefix}/share/doc/${subport}

        delete ${destroot}${prefix}/share/man

        system "pod2text ${worksrcpath}/ChaSen.pm ${destroot}${prefix}/share/doc/${subport}/usage.jp"
    }
}
