homebrew-core/Formula/libtool.rb
Jack Nagel c1fd9b501e Use cellar paths in tests
This lets `brew test` work when these are keg-only, etc. Also fix a
couple of typos and style things.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-27 14:11:01 -06:00

32 lines
1,022 B
Ruby

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'
mirror 'http://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz'
md5 'b32b04148ecdd7344abc6fe8bd1bb021'
if MacOS.xcode_version.to_f < 4.3 or File.file? "/usr/bin/glibtoolize"
keg_only "Xcode (up to and including 4.2) provides (a rather old) Libtool."
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 "#{bin}/glibtoolize --version"
end
end