diff options
| author | Jack Nagel | 2012-08-13 15:40:11 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-13 15:40:11 -0500 |
| commit | e72f9f35dbc6f8a3d90cab02e992e1fc4c25449f (patch) | |
| tree | c458f1b6792bee573ea988329a04e02a6857119c | |
| parent | c12c9d4f9c93aa64e1ea88e31e687f47761ff5ba (diff) | |
| download | homebrew-e72f9f35dbc6f8a3d90cab02e992e1fc4c25449f.tar.bz2 | |
mariadb: use options DSL
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Formula/mariadb.rb | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/Library/Formula/mariadb.rb b/Library/Formula/mariadb.rb index 1e0a62b10..00b7a2bb9 100644 --- a/Library/Formula/mariadb.rb +++ b/Library/Formula/mariadb.rb @@ -1,12 +1,17 @@ require 'formula' class Mariadb < Formula - url 'http://ftp.osuosl.org/pub/mariadb/mariadb-5.3.7/kvm-tarbake-jaunty-x86/mariadb-5.3.7.tar.gz' homepage 'http://mariadb.org/' + url 'http://ftp.osuosl.org/pub/mariadb/mariadb-5.3.7/kvm-tarbake-jaunty-x86/mariadb-5.3.7.tar.gz' sha1 '1ee2ef4895aefabd66b4884c382ba2cd1f7bbe2d' depends_on 'readline' + option :universal + option 'with-tests', 'Keep test when installing' + option 'with-bench', 'Keep benchmark app when installing' + option 'client-only', 'Install only client tools' + conflicts_with 'mysql', :because => "mariadb and mysql install the same binaries." conflicts_with 'percona-server', @@ -16,20 +21,11 @@ class Mariadb < Formula build 421 end - def options - [ - ['--with-tests', "Keep tests when installing."], - ['--with-bench', "Keep benchmark app when installing."], - ['--client-only', "Only install client tools, not the server."], - ['--universal', "Make mariadb a universal binary"] - ] - end - def install ENV.append 'CXXFLAGS', '-fno-omit-frame-pointer -felide-constructors' # Make universal for bindings to universal applications - ENV.universal_binary if ARGV.build_universal? + ENV.universal_binary if build.universal? configure_args = [ "--without-docs", @@ -52,7 +48,7 @@ class Mariadb < Formula "--with-libevent", ] - configure_args << "--without-server" if ARGV.include? '--client-only' + configure_args << "--without-server" if build.include? 'client-only' system "./configure", *configure_args system "make install" @@ -60,8 +56,8 @@ class Mariadb < Formula bin.install_symlink "#{libexec}/mysqld" bin.install_symlink "#{share}/mysql/mysql.server" - (prefix+'mysql-test').rmtree unless ARGV.include? '--with-tests' # save 121MB! - (prefix+'sql-bench').rmtree unless ARGV.include? '--with-bench' + (prefix+'mysql-test').rmtree unless build.include? 'with-tests' # save 121MB! + (prefix+'sql-bench').rmtree unless build.include? 'with-bench' plist_path.write startup_plist plist_path.chmod 0644 |
