# -*- 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
# $Id: Portfile 150279 2016-07-14 03:50:28Z devans@macports.org $

# This comment was inserted on 20160713 to force reindexing of
# this port after the default homepage definition in the perl5
# PortGroup was changed to use metacpan.org (r150080).
# Reindexing is necessary for the new definition to take effect.
# This comment may be removed in subsequent updates of this port.

PortSystem          1.0
PortGroup           perl5 1.0

perl5.branches      5.22 5.24
perl5.setup         Text-Kakasi 2.04
revision            4
categories-append   textproc japanese
maintainers         nomaintainer
description         This module provides interface to kakasi.
long_description    ${description}
platforms           darwin
license             GPL-2+

checksums           rmd160  26f81dec43a278d5abed501fac860c0884d97726 \
                    sha256  844c01e78ba4bfb89c0702995a86f488de7c29b40a75e7af0e4f39d55624dba0

if {${perl5.major} != ""} {
    patchfiles      patch-MANIFEST.diff \
                    patch-lib-Text-Kakasi-JP.pod.diff

    depends_lib-append \
                    port:kakasi

    post-patch {
        reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile.PL
        system "pod2text ${worksrcpath}/lib/Text/Kakasi/JP.pod ${worksrcpath}/usage.jp"
        delete ${worksrcpath}/lib
    }
}
