From 810454e61e30e084dd52c932d6097e3e7aa33f80 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 2 Feb 2013 18:10:31 -0600 Subject: gwenhywfar: clean up options --- Library/Formula/gwenhywfar.rb | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/gwenhywfar.rb b/Library/Formula/gwenhywfar.rb index b31f2faa1..4fd7af23a 100644 --- a/Library/Formula/gwenhywfar.rb +++ b/Library/Formula/gwenhywfar.rb @@ -11,32 +11,18 @@ class Gwenhywfar < Formula depends_on 'gettext' depends_on 'gnutls' depends_on 'libgcrypt' - - def options - [[ - "--with-gui=XX,...", <<-EOS.undent - Install gui support XX where XX is the name of the gui toolkit - \te.g.: --with-gui=gtk - \tAvailable gui toolkits are: qt, gtk" - EOS - ]] - end - + depends_on 'gtk+' => :optional + depends_on 'qt' => :optional def install guis = [] - ARGV.options_only.select { |v| v =~ /--with-gui=/ }.uniq.each do |opt| - guis << opt.split('=')[1].split(',') - end - - configure_args = [ - "--prefix=#{prefix}", - "--disable-debug", - "--disable-dependency-tracking", - "--with-guis='#{guis.flatten.join(' ')}'" - ] + guis << "gtk2" if build.with? "gtk+" + guis << "qt4" if build.with? "qt" - system "./configure", *configure_args + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--with-guis=#{guis.join(' ')}" system "make install" end end -- cgit v1.2.3