gwenhywfar: clean up options
This commit is contained in:
parent
83c69ba14e
commit
0e2e41ff13
1 changed files with 8 additions and 22 deletions
|
@ -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
|
||||
guis << "gtk2" if build.with? "gtk+"
|
||||
guis << "qt4" if build.with? "qt"
|
||||
|
||||
configure_args = [
|
||||
"--prefix=#{prefix}",
|
||||
"--disable-debug",
|
||||
"--disable-dependency-tracking",
|
||||
"--with-guis='#{guis.flatten.join(' ')}'"
|
||||
]
|
||||
|
||||
system "./configure", *configure_args
|
||||
system "./configure", "--disable-debug",
|
||||
"--disable-dependency-tracking",
|
||||
"--prefix=#{prefix}",
|
||||
"--with-guis=#{guis.join(' ')}"
|
||||
system "make install"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue