2012-02-27 00:41:17 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2013-01-27 22:38:37 +00:00
|
|
|
# Xcode 4.3 provides the Apple libtool.
|
|
|
|
# This is not the same so as a result we must install this as glibtool.
|
2012-02-27 00:41:17 +00:00
|
|
|
|
|
|
|
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"
|
2013-01-27 22:38:37 +00:00
|
|
|
keg_only "Xcode 4.2 and below provide glibtool."
|
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
|
|
|
|
|
2013-01-27 22:38:37 +00:00
|
|
|
test do
|
|
|
|
system "#{bin}/glibtool", 'execute', '/usr/bin/true'
|
2012-02-27 00:41:17 +00:00
|
|
|
end
|
|
|
|
end
|