40 lines
1.3 KiB
Ruby
40 lines
1.3 KiB
Ruby
class AutoconfArchive < Formula
|
|
desc "A collection of over 500 reusable autoconf macros"
|
|
homepage "http://savannah.gnu.org/projects/autoconf-archive/"
|
|
url "http://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2015.02.24.tar.xz"
|
|
mirror "https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2015.02.24.tar.xz"
|
|
sha1 "3b85294775df75acce4b89d99ad268a6e7219d9c"
|
|
|
|
bottle do
|
|
sha1 "379b87f4f2a0ab895b98566a9d846e39143febb9" => :yosemite
|
|
sha1 "57aa4726af450fa77e509a29aeb03d6c819706cf" => :mavericks
|
|
sha1 "5c2d27e4a970cdc0ef102e0404a5eb13cc1f0543" => :mountain_lion
|
|
end
|
|
|
|
# autoconf-archive is useless without autoconf
|
|
depends_on "autoconf" => :run
|
|
|
|
def install
|
|
system "./configure", "--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.m4").write <<-EOS.undent
|
|
AC_INIT(myconfig, version-0.1)
|
|
AC_MSG_NOTICE([Hello, world.])
|
|
|
|
m4_include([#{share}/aclocal/ax_have_select.m4])
|
|
|
|
# from http://www.gnu.org/software/autoconf-archive/ax_have_select.html
|
|
AX_HAVE_SELECT(
|
|
[AX_CONFIG_FEATURE_ENABLE(select)],
|
|
[AX_CONFIG_FEATURE_DISABLE(select)])
|
|
AX_CONFIG_FEATURE(
|
|
[select], [This platform supports select(7)],
|
|
[HAVE_SELECT], [This platform supports select(7).])
|
|
EOS
|
|
|
|
system "#{Formula["autoconf"].bin}/autoconf", "test.m4"
|
|
end
|
|
end
|