aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/automake.rb
blob: 3f04e6d48653a37a29fca2e1f72d8288d73ded09 (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
require 'formula'

class Automake < Formula
  homepage 'http://www.gnu.org/software/automake/'
  url 'http://ftpmirror.gnu.org/automake/automake-1.12.tar.gz'
  mirror 'http://ftp.gnu.org/gnu/automake/automake-1.12.tar.gz'
  sha1 '735e5a755dd4ba24dbb345901198873b2686804d'

  depends_on "autoconf" => :build

  if MacOS.xcode_version.to_f < 4.3 or File.file? "/usr/bin/automake"
    keg_only "Xcode (up to and including 4.2) provides (a rather old) Automake."
  end

  def install
    system "./configure", "--prefix=#{prefix}"
    system "make install"

    # our aclocal must go first: https://github.com/mxcl/homebrew/issues/10618
    (share/"aclocal/dirlist").write <<-EOS.undent
      #{HOMEBREW_PREFIX}/share/aclocal
      /usr/share/aclocal
      EOS
  end

  def test
    system "#{bin}/automake", "--version"
  end
end