diff options
| author | Adam Vandenberg | 2012-08-23 15:28:02 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-23 15:28:02 -0700 |
| commit | a831e65e37ed1a8e039d2c0e73845fbee9e17808 (patch) | |
| tree | bcecbe594834f49e12bfba9ac06c9916623b777b /Library/Formula | |
| parent | dbf3dde2928e362563800ec18085d27d34cc90bf (diff) | |
| download | homebrew-a831e65e37ed1a8e039d2c0e73845fbee9e17808.tar.bz2 | |
weechat: use new dsl
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/weechat.rb | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/Library/Formula/weechat.rb b/Library/Formula/weechat.rb index 3da156ab2..5f86bbfd9 100644 --- a/Library/Formula/weechat.rb +++ b/Library/Formula/weechat.rb @@ -8,26 +8,22 @@ class Weechat < Formula depends_on 'cmake' => :build depends_on 'gettext' depends_on 'gnutls' - depends_on 'guile' if ARGV.include? '--guile' - depends_on 'aspell' if ARGV.include? '--aspell' - depends_on 'lua' if ARGV.include? '--lua' + depends_on 'guile' => :optional if build.include? 'guile' + depends_on 'aspell' => :optional if build.include? 'aspell' + depends_on 'lua' => :optional if build.include? 'lua' - def options - [ - ['--lua', 'Build the lua module.'], - ['--perl', 'Build the perl module.'], - ['--ruby', 'Build the ruby module.'], - ['--guile', 'Build the guile module.'], - ['--python', 'Build the python module (requires framework Python).'], - ['--aspell', 'Build the aspell module that checks your spelling.'] - ] - end + option 'lua', 'Build the lua module' + option 'perl', 'Build the perl module' + option 'ruby', 'Build the ruby module' + option 'guile', 'Build the guile module' + option 'python', 'Build the python module (requires framework Python)' + option 'aspell', 'Build the aspell module that checks your spelling' def install # Remove all arch flags from the PERL_*FLAGS as we specify them ourselves. # This messes up because the system perl is a fat binary with 32, 64 and PPC # compiles, but our deps don't have that. Remove at v0.3.8, fixed in HEAD. - archs = ['-arch ppc', '-arch i386', '-arch x86_64'].join('|') + archs = %W[-arch ppc -arch i386 -arch x86_64].join('|') inreplace "src/plugins/scripts/perl/CMakeLists.txt", 'IF(PERL_FOUND)', 'IF(PERL_FOUND)' + @@ -48,12 +44,12 @@ class Weechat < Formula -DPREFIX=#{prefix} -DENABLE_GTK=OFF ] - args << '-DENABLE_LUA=OFF' unless ARGV.include? '--lua' - args << '-DENABLE_PERL=OFF' unless ARGV.include? '--perl' - args << '-DENABLE_RUBY=OFF' unless ARGV.include? '--ruby' - args << '-DENABLE_PYTHON=OFF' unless ARGV.include? '--python' - args << '-DENABLE_ASPELL=OFF' unless ARGV.include? '--aspell' - args << '-DENABLE_GUILE=OFF' unless ARGV.include? '--guile' and \ + args << '-DENABLE_LUA=OFF' unless build.include? 'lua' + args << '-DENABLE_PERL=OFF' unless build.include? 'perl' + args << '-DENABLE_RUBY=OFF' unless build.include? 'ruby' + args << '-DENABLE_PYTHON=OFF' unless build.include? 'python' + args << '-DENABLE_ASPELL=OFF' unless build.include? 'aspell' + args << '-DENABLE_GUILE=OFF' unless build.include? 'guile' and \ Formula.factory('guile').linked_keg.exist? args << '.' |
