aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/mysql.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2009-08-05 11:17:31 -0700
committerMax Howell2009-08-10 18:15:25 +0100
commitca0d50a00679d5fd0c9879db7cc6804d6ea36b41 (patch)
tree56d5e66daa147a7316e6a832e59deef47eaadf85 /Library/Formula/mysql.rb
parentce16f44d3fdf26f23949dc74a7a0e0e5d3b4fe0b (diff)
downloadhomebrew-ca0d50a00679d5fd0c9879db7cc6804d6ea36b41.tar.bz2
Recipe for MySQL client tools (5.1.x)
Diffstat (limited to 'Library/Formula/mysql.rb')
-rw-r--r--Library/Formula/mysql.rb48
1 files changed, 48 insertions, 0 deletions
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb
new file mode 100644
index 000000000..ab5c2f492
--- /dev/null
+++ b/Library/Formula/mysql.rb
@@ -0,0 +1,48 @@
+# Builds MySQL 5.1, but only the client libraries and tools.
+# Does not install the mysqld server.
+require 'brewkit'
+
+class Mysql <Formula
+ @url='http://mysql.llarian.net/Downloads/MySQL-5.1/mysql-5.1.37.zip'
+ @homepage='http://dev.mysql.com/doc/refman/5.1/en/'
+ @md5='7564d7759a8077b3a0e6190955422287'
+
+ def deps
+ # --without-readline means use system's readline
+ LibraryDep.new 'readline'
+ end
+
+ def install
+ ENV['CXXFLAGS'] = ENV['CXXFLAGS'].gsub "-fomit-frame-pointer", ""
+ ENV['CXXFLAGS'] += " -fno-omit-frame-pointer -felide-constructors"
+
+ # What about these options?
+ # --with-mysqld-ldflags=-all-static
+ # --enable-assembler
+ # --with-atomic-ops
+
+ system "./configure", "--without-readline",
+ "--without-server",
+ "--without-bench",
+ "--without-docs",
+ "--without-debug",
+ "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--with-extra-charsets=complex",
+ "--enable-thread-safe-client",
+ "--enable-local-infile",
+ "--enable-shared"
+ system "make install"
+
+ # save 66MB :P
+ (prefix+'mysql-test').rmtree unless ARGV.include? '--with-tests'
+ end
+
+ def caveats
+ <<-EOS
+Currently we don't build the server (mysqld), however this should be the
+default. So please amend this formula, and add a --client-tools-only option
+for installation for its existing state. Thanks.
+ EOS
+ end
+end