# $Id: Portfile 79036 2011-05-30 23:58:53Z takanori@macports.org $

PortSystem      1.0
PortGroup       perl5 1.0

set nkf_ver     2.1.1
perl5.setup     NKF [string range ${nkf_ver} 0 2][string range ${nkf_ver} 4 end]
revision        3
categories-append \
                textproc japanese
maintainers     nifty.com:pelopor takanori openmaintainer
description     A perl extension module to use nkf.
long_description \
                ${description}
platforms       darwin
license         zlib/libpng
homepage        http://sourceforge.jp/projects/nkf/
master_sites    sourceforge_jp:nkf/48945/
distname        nkf-${nkf_ver}
dist_subdir     nkf
distfiles       [suffix ${distname}]:nkf
patchfiles      nkf.git-bbb280a04623e073e447add83c6c9a5309c30fd2.patch \
                nkf.git-d2f185cc2134b370b49b7a52a5e81b9671ecc43e.patch \
                nkf.git-fbbf52db285384e4938bbe7862cae1df80482960_2.patch \
                nkf.git-7f18e3086e219cc8a3639ebc7b0e4192001d3174.patch
checksums       rmd160  06e0dbda6e90502ab4bafe4d44a9d05beed248c5

worksrcdir  ${distname}/NKF.mod

patch.pre_args  -p1
pre-patch {
    worksrcdir  ${distname}
}
post-patch {
    worksrcdir  ${distname}/NKF.mod
}

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

livecheck.type      regex
livecheck.url       ${homepage}files/
livecheck.version   ${nkf_ver}
livecheck.regex     nkf-(\[0-9.a-z\]+)\\.tar
