2014-01-21 08:48:05 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class MecabKoDic < Formula
|
2014-05-18 15:10:34 +00:00
|
|
|
homepage "https://bitbucket.org/eunjeon/mecab-ko-dic"
|
2014-08-31 19:03:16 +00:00
|
|
|
url "https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-1.6.1-20140814.tar.gz"
|
|
|
|
sha1 "f68a6faf9aa86691de5a1abace65e70571972d03"
|
2014-01-21 08:48:05 +00:00
|
|
|
|
|
|
|
depends_on :autoconf
|
|
|
|
depends_on :automake
|
|
|
|
depends_on 'mecab-ko'
|
|
|
|
|
|
|
|
def install
|
2014-05-18 15:10:34 +00:00
|
|
|
system "./autogen.sh"
|
2014-01-21 08:48:05 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--with-dicdir=#{prefix}"
|
|
|
|
system "make install"
|
|
|
|
|
2014-09-03 04:44:21 +00:00
|
|
|
if File.readlines("#{etc}/mecabrc").grep(/^dicdir.*=/).empty?
|
|
|
|
open("#{etc}/mecabrc", "a") { |f| f.puts "dicdir = #{opt_prefix}\n" }
|
2014-08-31 19:03:16 +00:00
|
|
|
end
|
2014-05-18 15:10:34 +00:00
|
|
|
end
|
|
|
|
end
|