automake@1.12: import from homebrew/versions.

This commit is contained in:
Mike McQuaid 2017-01-01 20:19:32 +00:00
parent 8a1de5006f
commit a56d72ea8c
2 changed files with 52 additions and 0 deletions

51
Formula/automake@1.12.rb Normal file
View file

@ -0,0 +1,51 @@
class AutomakeAT112 < Formula
desc "Tool for generating GNU Standards-compliant Makefiles"
homepage "https://www.gnu.org/software/automake/"
url "https://ftpmirror.gnu.org/automake/automake-1.12.6.tar.gz"
mirror "https://ftp.gnu.org/gnu/automake/automake-1.12.6.tar.gz"
sha256 "0cbe570db487908e70af7119da85ba04f7e28656b26f717df0265ae08defd9ef"
keg_only :provided_until_xcode43
depends_on "autoconf" => :run
def install
system "./configure", "--prefix=#{prefix}", "--program-suffix=112"
system "make", "install"
# Fix aclocal not escaping @ character correctly.
inreplace "#{bin}/aclocal112",
"\"#{share}/aclocal-$APIVERSION\"",
"\"#{HOMEBREW_CELLAR}/automake\\@1.12/#{pkg_version}/share/aclocal-$APIVERSION\""
# Our aclocal must go first. See:
# https://github.com/Homebrew/homebrew/issues/10618
(share/"aclocal/dirlist").write <<-EOS.undent
#{HOMEBREW_PREFIX}/share/aclocal
/usr/share/aclocal
EOS
end
test do
(testpath/"test.c").write <<-EOS.undent
int main() { return 0; }
EOS
(testpath/"configure.ac").write <<-EOS.undent
AC_INIT(test, 1.0)
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
EOS
(testpath/"Makefile.am").write <<-EOS.undent
bin_PROGRAMS = test
test_SOURCES = test.c
EOS
system bin/"aclocal112"
system bin/"automake112", "--add-missing", "--foreign"
system "autoconf"
system "./configure"
system "make"
system "./test"
end
end

View file

@ -8,6 +8,7 @@
"apache-spark16": "apache-spark@16",
"autoconf213": "autoconf@213",
"autoconf264": "autoconf@264",
"automake112": "automake@112",
"beanstalk": "beanstalkd",
"cloog-ppl015": "cloog@0.15",
"cloog018": "cloog",