aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/mecab-jumandic.rb
blob: 6e07c19b7def7574c1d9b9ecf5654b190fb3eb4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'formula'

class MecabJumandic < Formula
  homepage 'http://mecab.googlecode.com/svn/trunk/mecab/doc/index.html'
  url 'https://downloads.sourceforge.net/project/mecab/mecab-jumandic/5.1-20070304/mecab-jumandic-5.1-20070304.tar.gz'
  sha1 '0672cb267b8fde6268a69d57add7ab1544e62154'

  # Via ./configure --help, valid choices are utf8 (default), euc-jp, sjis
  option 'charset=', "Select charset: utf8 (default), euc-jp, or sjis"

  depends_on "mecab"

  def install
    charset = ARGV.value('charset') || 'utf8'
    args = %W[
      --disable-debug
      --disable-dependency-tracking
      --prefix=#{prefix}
      --with-charset=#{charset}
    ]

    system "./configure", *args
    system "make install"
  end
end