diff options
| author | Jack Nagel | 2012-08-13 15:42:59 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-13 15:42:59 -0500 |
| commit | 3b08f8b4f889300c6c173d2f490bc0491887bcb7 (patch) | |
| tree | 0be122f07b5466afee6fef74aa0e1857f65c4324 /Library/Formula/postgresql.rb | |
| parent | f69b851e81e221bb52d87e304cd2fb8d18187131 (diff) | |
| download | homebrew-3b08f8b4f889300c6c173d2f490bc0491887bcb7.tar.bz2 | |
postgresql: use options DSL
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/postgresql.rb')
| -rw-r--r-- | Library/Formula/postgresql.rb | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/Library/Formula/postgresql.rb b/Library/Formula/postgresql.rb index 410d770df..098198a8c 100644 --- a/Library/Formula/postgresql.rb +++ b/Library/Formula/postgresql.rb @@ -9,15 +9,11 @@ class Postgresql < Formula depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old depends_on 'ossp-uuid' - def options - [ - ['--32-bit', 'Build 32-bit only.'], - ['--without-ossp-uuid', 'Build without OSSP uuid.'], - ['--no-python', 'Build without Python support.'], - ['--no-perl', 'Build without Perl support.'], - ['--enable-dtrace', 'Build with DTrace support.'] - ] - end + option '32-bit' + option 'without-ossp-uuid', 'Build without OSSP uuid' + option 'no-python', 'Build without Python support' + option 'no-perl', 'Build without Perl support' + option 'enable-dtrace', 'Build with DTrace support' skip_clean :all @@ -42,21 +38,21 @@ class Postgresql < Formula "--with-libxml", "--with-libxslt"] - args << "--with-ossp-uuid" unless ARGV.include? '--without-ossp-uuid' - args << "--with-python" unless ARGV.include? '--no-python' - args << "--with-perl" unless ARGV.include? '--no-perl' - args << "--enable-dtrace" if ARGV.include? '--enable-dtrace' + args << "--with-ossp-uuid" unless build.include? 'without-ossp-uuid' + args << "--with-python" unless build.include? 'no-python' + args << "--with-perl" unless build.include? 'no-perl' + args << "--enable-dtrace" if build.include? 'enable-dtrace' ENV.append 'CFLAGS', `uuid-config --cflags`.strip ENV.append 'LDFLAGS', `uuid-config --ldflags`.strip ENV.append 'LIBS', `uuid-config --libs`.strip - if not ARGV.build_32_bit? and MacOS.prefer_64_bit? and not ARGV.include? '--no-python' + if not build.build_32_bit? and MacOS.prefer_64_bit? and not build.include? 'no-python' args << "ARCHFLAGS='-arch x86_64'" check_python_arch end - if ARGV.build_32_bit? + if build.build_32_bit? ENV.append 'CFLAGS', '-arch i386' ENV.append 'LDFLAGS', '-arch i386' end |
