2012-02-27 00:41:17 +00:00
|
|
|
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/'
|
2012-03-01 06:45:25 +00:00
|
|
|
url 'http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz'
|
|
|
|
mirror 'http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz'
|
|
|
|
sha1 '22b71a8b5ce3ad86e1094e7285981cae10e6ff88'
|
2012-02-27 00:41:17 +00:00
|
|
|
|
2012-07-11 01:25:16 +00:00
|
|
|
if MacOS::Xcode.provides_autotools? or File.file? "/usr/bin/glibtoolize"
|
2012-02-27 20:08:58 +00:00
|
|
|
keg_only "Xcode (up to and including 4.2) provides (a rather old) Libtool."
|
2012-02-27 00:41:17 +00:00
|
|
|
end
|
|
|
|
|
2012-08-12 17:56:27 +00:00
|
|
|
option :universal
|
2012-06-22 07:14:23 +00:00
|
|
|
|
2012-02-27 00:41:17 +00:00
|
|
|
def install
|
2012-08-12 17:56:27 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2012-02-28 17:34:31 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--program-prefix=g",
|
2012-02-27 00:41:17 +00:00
|
|
|
"--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
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/glibtoolize", "--version"
|
2012-02-27 00:41:17 +00:00
|
|
|
end
|
|
|
|
end
|