# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                automake

# IMPORTANT
# On future version bumps, make sure you also revbump the libtool port
# Otherwise glibtoolize will provide an incompatible version of aclocal.m4
# from the older version of automake.
# cf: ${prefix}/share/libtool/aclocal.m4
version             1.15.1

categories          devel
platforms           darwin freebsd
supported_archs     noarch
license             {GPL-2+ Permissive}
maintainers         nomaintainer

description         the gnu automake utility for generating Makefile.in
long_description    Automake is a tool for automatically generating \
                    Makefile.in files from files called Makefile.am. \
                    Each Makefile.am is basically a series of make \
                    variable definitions, with rules being thrown in \
                    occasionally. The generated Makefile.in files are \
                    compliant with the GNU Makefile standards.
homepage            https://www.gnu.org/software/automake

depends_build       port:autoconf
installs_libs       no

master_sites        gnu
checksums           rmd160  3dfd5d5aa037db5aae281829539eef328694cd75 \
                    sha256  988e32527abe052307d21c8ca000aa238b914df363a617e38f4fb89f5abf6260

patchfiles          test-glibtool.patch

# It should be safe to use the system Perl, since Automake only uses
# core modules. The configure script recommends 5.8.2 or later, and
# Tiger has 5.8.6.
configure.perl      /usr/bin/perl
configure.args      --disable-silent-rules

test.run            yes
test.env            CC=${configure.cc}
test.target         check

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -m 755 -d $docdir
    xinstall -m 644 -W ${worksrcpath} \
            AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README THANKS \
            $docdir
}

livecheck.type      regex
livecheck.url       http://ftp.gnu.org/gnu/${name}/?C=M&O=D
livecheck.regex     automake-(\[0-9\\\.]+\[0-9\])\\.