# $Id: Portfile,v 1.4 2006/07/19 09:02:47 takanori Exp $

PortSystem      1.0
PortGroup       ruby 1.0

ruby.setup      MeCab 0.92 extconf.rb {}

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

homepage        http://mecab.sourceforge.jp/
set sfj         20920
master_sites    http://osdn.dl.sourceforge.jp/mecab/${sfj}/ \
                http://keihanna.dl.sourceforge.jp/mecab/${sfj}/ \
                http://qgpop.dl.sourceforge.jp/mecab/${sfj}/
distname        mecab-ruby-${version}
checksums       md5    a39d34da7a55444c7e8c5e5fcbcc527e \
                sha1   5ad35d667380e93eba3b1822d899dfd5e40e5ae9 \
                rmd160 2b804e24ff5118fd5d99f2c3e1a0d488ab025777

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
}
