Created
April 20, 2010 08:02
-
-
Save kpumuk/372179 to your computer and use it in GitHub Desktop.
Patch for the Homebrew's mysql formula to build it with Percona XtraDB plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb | |
index 1f2ecdc..b6f3c01 100644 | |
--- a/Library/Formula/mysql.rb | |
+++ b/Library/Formula/mysql.rb | |
@@ -1,5 +1,11 @@ | |
require 'formula' | |
+class PerconaXtradb < Formula | |
+ url 'http://www.percona.com/percona-builds/Percona-Server/Percona-Server-5.1.45-10/source/percona-xtradb-1.0.6-10.tar.gz' | |
+ md5 'd20bc3befd6e732c40fd41a9adcec9d9' | |
+ version '1.0.6-10' | |
+end | |
+ | |
class Mysql <Formula | |
homepage 'http://dev.mysql.com/doc/refman/5.1/en/' | |
url 'http://mysql.llarian.net/Downloads/MySQL-5.1/mysql-5.1.45.tar.gz' | |
@@ -12,6 +18,7 @@ class Mysql <Formula | |
['--with-tests', "Keep tests when installing."], | |
['--with-bench', "Keep benchmark app when installing."], | |
['--client-only', "Only install client tools, not the server."], | |
+ ['--with-xtradb', "Replace MySQL InnoDB plugin with Percona XtraDB."], | |
] | |
end | |
@@ -44,6 +51,12 @@ class Mysql <Formula | |
configure_args << "--without-server" if ARGV.include? '--client-only' | |
+ if ARGV.include? '--with-xtradb' | |
+ `rm -rf storage/innobase/*` | |
+ mysql_root = Dir.pwd | |
+ PerconaXtradb.new.brew { `cp -R * #{mysql_root}/storage/innobase` } | |
+ end | |
+ | |
system "./configure", *configure_args | |
system "make install" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment