2012-01-30 15:56:53 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Cabocha < Formula
|
|
|
|
homepage 'http://code.google.com/p/cabocha/'
|
2014-01-11 08:18:57 +00:00
|
|
|
url 'http://cabocha.googlecode.com/files/cabocha-0.67.tar.bz2'
|
|
|
|
sha1 '457a9bd0d264a1146a5eb1c5a504dd90a8b51fb8'
|
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
|