diff options
| author | Jack Nagel | 2012-08-13 15:40:26 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-13 15:40:26 -0500 |
| commit | f69b851e81e221bb52d87e304cd2fb8d18187131 (patch) | |
| tree | 51e4d6e2fdeb2a67e4f34ad8678d0eaca190312a /Library/Formula | |
| parent | e72f9f35dbc6f8a3d90cab02e992e1fc4c25449f (diff) | |
| download | homebrew-f69b851e81e221bb52d87e304cd2fb8d18187131.tar.bz2 | |
percona-server: use options DSL
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/percona-server.rb | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/Library/Formula/percona-server.rb b/Library/Formula/percona-server.rb index 503889eb4..dfc65c5de 100644 --- a/Library/Formula/percona-server.rb +++ b/Library/Formula/percona-server.rb @@ -10,6 +10,12 @@ class PerconaServer < Formula depends_on 'readline' depends_on 'pidof' + option :universal + option 'with-tests', 'Build with unit tests' + option 'with-embedded', 'Build the embedded server' + option 'with-libedit', 'Compile with editline wrapper instead of readline' + option 'enable-local-infile', 'Build with local infile loading support' + conflicts_with 'mysql', :because => "percona-server and mysql install the same binaries." conflicts_with 'mariadb', @@ -22,16 +28,6 @@ class PerconaServer < Formula cause "https://github.com/mxcl/homebrew/issues/issue/144" end - def options - [ - ['--with-tests', "Build with unit tests."], - ['--with-embedded', "Build the embedded server."], - ['--with-libedit', "Compile with EditLine wrapper instead of readline"], - ['--universal', "Make mysql a universal binary"], - ['--enable-local-infile', "Build with local infile loading support"] - ] - end - # The CMAKE patches are so that on Lion we do not detect a private # pthread_init function as linkable. Patch sourced from the MySQL formula. def patches @@ -62,23 +58,23 @@ class PerconaServer < Formula ] # To enable unit testing at build, we need to download the unit testing suite - if ARGV.include? '--with-tests' + if build.include? 'with-tests' args << "-DENABLE_DOWNLOADS=ON" else args << "-DWITH_UNIT_TESTS=OFF" end # Build the embedded server - args << "-DWITH_EMBEDDED_SERVER=ON" if ARGV.include? '--with-embedded' + args << "-DWITH_EMBEDDED_SERVER=ON" if build.include? 'with-embedded' # Compile with readline unless libedit is explicitly chosen - args << "-DWITH_READLINE=yes" unless ARGV.include? '--with-libedit' + args << "-DWITH_READLINE=yes" unless build.include? 'with-libedit' # Make universal for binding to universal applications - args << "-DCMAKE_OSX_ARCHITECTURES='i386;x86_64'" if ARGV.build_universal? + args << "-DCMAKE_OSX_ARCHITECTURES='i386;x86_64'" if build.universal? # Build with local infile loading support - args << "-DENABLED_LOCAL_INFILE=1" if ARGV.include? '--enable-local-infile' + args << "-DENABLED_LOCAL_INFILE=1" if build.include? 'enable-local-infile' system "cmake", *args system "make" |
