[Groonga-mysql-commit] mroonga/homebrew at 4114acd [master] Support to install Mroonga with MeCab all at once

Back to archive index

HAYASHI Kentaro null+****@clear*****
Fri Jan 31 22:15:51 JST 2014


HAYASHI Kentaro	2014-01-31 22:15:51 +0900 (Fri, 31 Jan 2014)

  New Revision: 4114acdcac4c09eadc65165e5ea29d7f78aa24a1
  https://github.com/mroonga/homebrew/commit/4114acdcac4c09eadc65165e5ea29d7f78aa24a1

  Message:
    Support to install Mroonga with MeCab all at once
    
    Here is the use case:
    
      % brew install --use-homebrew-mysql --use-homebrew-mecab
    
    Then mecab,mecab-ipadic,groonga package dependencies are resolved all at once.
    
    If you already installed Groonga without MeCab, what happens?
    
      % brew install mroonga --use-homebrew-mysql --use-homebrew-mecab
      Error: mroonga dependency groonga not installed with:
        --use-homebrew-mecab
    
    Homebrew reports "Please install Groonga with --use-homebrew-mecab option."
    
    NOTE: This fix works after Homebrew #26308 was merged.

  Modified files:
    mroonga.rb

  Modified: mroonga.rb (+7 -1)
===================================================================
--- mroonga.rb    2014-01-29 23:33:15 +0900 (d086032)
+++ mroonga.rb    2014-01-31 22:15:51 +0900 (95ebefa)
@@ -8,9 +8,14 @@ class Mroonga < Formula
   sha256 '9b2922793435d6c0484e5a9b9274365184bea4d26a3357b284e78c76e93a030a'
 
   depends_on 'pkg-config' => :build
-  depends_on 'groonga'
   depends_on 'groonga-normalizer-mysql'
 
+  if ARGV.include?("--use-homebrew-mecab")
+    depends_on 'groonga' => '--use-homebrew-mecab'
+  else
+    depends_on 'groonga'
+  end
+
   if ARGV.include?("--use-homebrew-mysql")
     depends_on 'mysql'
   elsif ARGV.include?("--use-homebrew-mariadb")
@@ -21,6 +26,7 @@ class Mroonga < Formula
     [
       ["--use-homebrew-mysql", "Use MySQL installed by Homebrew."],
       ["--use-homebrew-mariadb", "Use MariaDB installed by Homebrew. You can't use this option with --use-homebrew-mysql."],
+      ["--use-homebrew-mecab", "Use MeCab installed by Homebrew. You can use additional tokenizer - TokenMecab."],
       ["--with-mysql-source=PATH", "MySQL source directory. You can't use this option with --use-homebrew-mysql and --use-homebrew-mariadb"],
       ["--with-mysql-build=PATH", "MySQL build directory (default: guess from --with-mysql-source)"],
       ["--with-mysql-config=PATH", "mysql_config path (default: guess from --with-mysql-source)"],
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index