aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/cabocha.rb
blob: c4093c44e7d0b47ea7d942f1ae1b503f7f1e8fe4 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
require 'formula'

class Cabocha < Formula
  homepage 'http://code.google.com/p/cabocha/'
  url 'http://cabocha.googlecode.com/files/cabocha-0.66.tar.bz2'
  sha1 '33172b7973239a53d98eabbd309f70d88e36c94c'

  depends_on 'crf++'
  depends_on 'mecab'

  # Fix finding unistd
  def patches; DATA; end

  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

    system "./configure", "--with-charset=utf8",
                          "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
  end
end

__END__
diff --git a/src/utils.cpp b/src/utils.cpp
index b0cee48..4ab074a 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -3,9 +3,7 @@
 //  $Id: utils.cpp 50 2009-05-03 08:25:36Z taku-ku $;
 //
 //  Copyright(C) 2001-2008 Taku Kudo <taku@chasen.org>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #include <iostream>
 #include <fstream>