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

# Xcode 4.3 provides the Apple libtool
# This is not the same, but as a result we must install these as glibtool etc.

class Libtool < Formula
  homepage 'http://www.gnu.org/software/libtool/'
  url 'http://ftpmirror.gnu.org/libtool/libtool-2.4.tar.gz'
  md5 'b32b04148ecdd7344abc6fe8bd1bb021'

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

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}", "--program-prefix=g",
                          "--enable-ltdl-install"
    system "make install"
  end

  def caveats; <<-EOS.undent
    In order to prevent conflicts with Apple's own libtool we have prepended a "g"
    so, you have instead: glibtool and glibtoolize.
    EOS
  end

  def test
    system "#{HOMEBREW_PREFIX}/bin/glibtoolize --version"
  end
end