aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ode.rb
blob: 03c42b20b8fc782f1c3d8bc2132e05d1617e6954 (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
require 'formula'

class Ode < Formula
  homepage 'http://www.ode.org/'
  url 'http://sourceforge.net/projects/opende/files/ODE/0.12/ode-0.12.tar.bz2'
  sha1 '10e7aae6cc6b1afe523ed52e76afd5e06461ea93'

  head 'http://opende.svn.sourceforge.net/svnroot/opende/trunk'

  depends_on 'pkg-config' => :build

  if build.head?
    # Requires newer automake and libtool
    depends_on 'automake' => :build
    depends_on 'libtool' => :build
  end

  def install
    if build.head?
      ENV['LIBTOOLIZE'] = 'glibtoolize'
      inreplace 'autogen.sh', 'libtoolize', '$LIBTOOLIZE'
      system "./autogen.sh"
    end
    system "./configure", "--prefix=#{prefix}", "--disable-demos"
    system "make"
    system "make install"
  end
end