# $Id: Portfile 61386 2009-12-10 08:34:15Z takanori@macports.org $

PortSystem      1.0

name            nkf
version         2.1.0
categories      textproc japanese
maintainers     takanori openmaintainer
description     Network Kanji code conversion Filter
long_description \
                Nkf  is  a  yet  another kanji code converter among networks, hosts and \
                terminals.  It converts input kanji code to designated kanji code  such \
                as 7-bit JIS, MS-kanji (shifted-JIS), utf-8 or EUC.
platforms       darwin
homepage        http://sourceforge.jp/projects/nkf/
master_sites    sourceforge_jp:${name}/44486/
checksums       rmd160  77cf750e00fbc6b7b2178a25c152a4ed7b623a35

use_configure   no

build.target
build.args      CFLAGS="${configure.cflags}"

test.run        yes

use_parallel_build  yes

destroot {
    xinstall -m 755 ${worksrcpath}/nkf ${destroot}${prefix}/bin
    xinstall -m 644 ${worksrcpath}/nkf.1 ${destroot}${prefix}/share/man/man1
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 ${worksrcpath}/nkf.doc ${destroot}${prefix}/share/doc/${name}
}

variant universal {
    build.args  CFLAGS="${configure.cflags} ${configure.universal_cflags}"
}

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