blob: 2ff17ef3ae8235d658d9c9ba95a973e2a917560a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  | 
require 'formula'
class Gwenhywfar <Formula
  url 'http://www2.aquamaniac.de/sites/download/download.php?package=01&release=54&file=01&dummy=gwenhywfar-4.0.1.tar.gz'
  homepage 'http://gwenhywfar.sourceforge.net/'
  md5 '513ea7b5b22edf512fa7d825ef544954'
  depends_on 'pkg-config'
  depends_on 'gettext'
  depends_on 'gnutls'
  def options
    [
      ['--with-gui=XX,...', "Install gui support XX where XX is the name of the gui toolkit\n\te.g.: --with-gui=gtk\n\tAvailable gui toolkits are: qt, gtk"],
    ]
  end
  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(' ')}'"
    ]
    system "./configure", *configure_args
    system "make install"
  end
end
  |