[Groonga-mysql-commit] mroonga/homebrew-mroonga at 0881267 [master] Fix build error with MySQL 5.7 (maybe)

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Nov 30 18:48:11 JST 2015


Kouhei Sutou	2015-11-30 18:48:11 +0900 (Mon, 30 Nov 2015)

  New Revision: 088126770b92efea956f1038bcd42f6935e8c123
  https://github.com/mroonga/homebrew-mroonga/commit/088126770b92efea956f1038bcd42f6935e8c123

  Message:
    Fix build error with MySQL 5.7 (maybe)
    
    GitHub: fix #4
    
    Reported by 104yuki. Thanks!!!

  Modified files:
    mroonga.rb

  Modified: mroonga.rb (+30 -0)
===================================================================
--- mroonga.rb    2015-11-30 18:41:23 +0900 (cfcf400)
+++ mroonga.rb    2015-11-30 18:48:11 +0900 (3b9740b)
@@ -23,8 +23,10 @@ class Mroonga < Formula
   end
 
   if build.include?("use-homebrew-mysql")
+    depends_on "cmake" => :build
     depends_on "mysql"
   elsif build.include?("use-homebrew-mariadb")
+    depends_on "cmake" => :build
     depends_on "mariadb"
   end
 
@@ -98,10 +100,38 @@ class Mroonga < Formula
     end
   end
 
+  module DryInstallable
+    def install(options={})
+      if options[:dry_run]
+        catch do |tag|
+          @dry_install_tag = tag
+          begin
+            super()
+          ensure
+            @dry_install_tag = tag
+          end
+        end
+      else
+        super()
+      end
+    end
+
+    private
+    def system(*args)
+      if args == ["make", "install"] and @dry_install_tag
+        throw @dry_install_tag
+      end
+      super
+    end
+  end
+
   def build_formula(name)
     formula = Formula[name]
     formula.extend(Patchable)
+    formula.extend(DryInstallable)
     formula.brew do
+      formula.patch
+      formula.install(:dry_run => true)
       yield formula
     end
   end
-------------- next part --------------
HTML����������������������������...
Download 



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