2012-01-30 15:56:53 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Cabocha < Formula
|
|
|
|
homepage 'http://code.google.com/p/cabocha/'
|
2014-03-13 18:15:35 +00:00
|
|
|
url 'https://cabocha.googlecode.com/files/cabocha-0.68.tar.bz2'
|
|
|
|
sha1 '5e22a71eb86d778fdeb1b725c0b27f1fb4af7f4b'
|
2012-01-30 15:56:53 +00:00
|
|
|
|
|
|
|
depends_on 'crf++'
|
2012-11-17 07:12:19 +00:00
|
|
|
depends_on 'mecab'
|
2012-01-30 15:56:53 +00:00
|
|
|
|
2014-01-11 08:18:57 +00:00
|
|
|
option 'posset', 'choose default posset: IPA, JUMAN, UNIDIC'
|
2013-11-17 22:00:07 +00:00
|
|
|
|
2012-01-30 15:56:53 +00:00
|
|
|
def install
|
|
|
|
ENV["LIBS"] = '-liconv'
|
|
|
|
|
|
|
|
inreplace 'Makefile.in' do |s|
|
|
|
|
s.change_make_var! 'CFLAGS', ENV.cflags
|
|
|
|
s.change_make_var! 'CXXFLAGS', ENV.cflags
|
|
|
|
end
|
|
|
|
|
2014-01-11 08:18:57 +00:00
|
|
|
posset = ARGV.value('posset') || "IPA"
|
|
|
|
args = ["--with-charset=utf8",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"]
|
|
|
|
args << "--with-posset=#{posset}"
|
|
|
|
|
|
|
|
system "./configure", *args
|
2012-01-30 15:56:53 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|