# -*- 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.18.1
categories          devel
platforms           any
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
use_xz              yes
checksums           rmd160 1eba40f1d15ac6bd31454acbfe22dc8e39c1bc23 \
                    sha256 168aa363278351b89af56684448f525a5bce5079d0b6842bd910fdd3f1646887

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       https://ftp.gnu.org/gnu/${name}/?C=M&O=D
livecheck.regex     automake-(\[0-9\\\.]+\[0-9\])\\.
