# -*- 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         MeCab 0.996
categories-append   textproc japanese
maintainers         nomaintainer

description         a Perl module for MeCab
long_description    ${description}

master_sites        macports_distfiles:mecab
checksums           rmd160  0fb41c1a8bbc15da0283f649a17fd227fde3756f \
                    sha256  71fe5559c5bd2a13ea9929190a8f9f5ee4c63987108081bd7332ca1bbbb616c9

homepage            http://taku910.github.io/mecab/
platforms           darwin
license             {GPL LGPL BSD}

distname            mecab-perl-${perl5.moduleversion}
dist_subdir         mecab

if {${perl5.major} != ""} {
    depends_lib-append  path:bin/mecab-config:mecab-utf8

    platform darwin 8 {
        build.env       MACOSX_DEPLOYMENT_TARGET=10.4
    }

    post-patch {
        reinplace "s|\#!/usr/bin/perl|\#!${perl5.bin}|" \
            ${worksrcpath}/test.pl
    }

    post-destroot {
        set exdir ${destroot}${prefix}/share/doc/${subport}/examples
        xinstall -m 755 -d ${exdir}
        xinstall -m 755 ${worksrcpath}/test.pl ${exdir}
    }

}

livecheck.type      none 
