# $Id: Portfile 107974 2013-07-10 03:47:43Z dports@macports.org $

PortSystem          1.0
PortGroup           perl5 1.0

perl5.branches      5.8 5.10 5.12 5.14 5.16
perl5.setup         Encode-JIS2K 0.02
revision            5
platforms           darwin
maintainers         nomaintainer
description         JIS X 0212 (aka JIS 2000) Encodings
long_description    This module implements encodings that covers JIS X 0213 \
                    charset (AKA JIS 2000, hence the module name).

checksums           md5 00e73ee943fb2f882b00b7b61e4c9db1 \
                    sha1 18cbf86bb6bf30e17b50b991c60c11ebe405b026 \
                    rmd160 8348da769f3a794e7d7ac14f0d4b1634d085a5e9

if {${perl5.major} != ""} {
depends_lib-append  port:p${perl5.major}-encode
}

if {$subport != $name} {
    patchfiles patch-Makefile.PL.diff
    post-patch {
        reinplace "s|@@ENC2XS@@|${prefix}/bin/enc2xs-${perl5.major}|g" ${worksrcpath}/Makefile.PL
    }
}
