aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/geda-gaf.rb
blob: 0e80e9ed997dc66466046e0a6fc13144a785846b (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
36
37
38
39
40
41
42
43
44
require 'formula'

class GedaGaf < Formula
  homepage 'http://www.geda-project.org/'
  url 'http://ftp.geda-project.org/geda-gaf/stable/v1.8/1.8.2/geda-gaf-1.8.2.tar.gz'
  sha1 'c61edc04997fc12398534a346dac32d8fcdabcc1'

  devel do
    url 'http://ftp.geda-project.org/geda-gaf/unstable/v1.9/1.9.0/geda-gaf-1.9.0.tar.gz'
    sha1 '2b6732238ca5ed6693695d737e52aef1bdb2a589'
  end

  depends_on 'pkg-config' => :build
  depends_on 'gettext'
  depends_on 'gtk+'
  depends_on 'guile'
  depends_on 'gawk'
  depends_on :x11

  def install
    gettext = Formula['gettext']

    args = [
      "--prefix=#{prefix}",
      "--with-gettext=#{gettext.prefix}",
      "--disable-update-xdg-database",
      "--with-pcb-datadir=#{HOMEBREW_PREFIX}/share/pcb"
    ]

    if build.stable?
      pcb = Formula['pcb']
      args << "--with-pcb-confdir=#{pcb.etc}/pcb"
    end

    system "./configure", *args
    system "make"
    system "make install"
  end

  def caveats
    "This software runs under X11."
  end
end