# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $

PortSystem      1.0
PortGroup       ruby 1.0

ruby.setup      MeCab 0.96 extconf.rb {}

platforms       darwin
maintainers     gmail.com:rsky0711
description     a Ruby module for MeCab
long_description ${description}

homepage        http://mecab.sourceforge.net/
master_sites    sourceforge:mecab
distname        mecab-ruby-${version}
checksums       md5    400479138d0cc1a7a4bf2af3e1bf581a \
                sha1   2831121ed5121802c3bc0cbeedee7a04563e3bfd \
                rmd160 bb0063b20162c0a6d02b529f9e451d8fe0e7b518

categories-append   textproc japanese
depends_lib-append  port:mecab

post-extract {
    reinplace s|\#!/usr/bin/ruby|\#!${ruby.bin}|g \
        ${worksrcpath}/test.rb
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/examples
    xinstall -m 644 ${worksrcpath}/test.rb \
        ${destroot}${prefix}/share/doc/${name}/examples
}
