# -*- 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                autogen
version             5.18.16
revision            7
checksums           rmd160  789d4932f1704508cedf3bee6718778cfb587175 \
                    sha256  f8a13466b48faa3ba99fe17a069e71c9ab006d9b1cfabe699f8c60a47d5bb49a \
                    size    1046276

categories          devel
maintainers         nomaintainer
license             GPL-3
description         tool to simplify the creation and maintenance of programs
long_description    AutoGen is a tool designed to simplify the creation \
                    and maintenance of programs that contain large amounts \
                    of repetitious text. It is especially valuable in \
                    programs that have several blocks of text that must \
                    be kept synchronized.

homepage            https://www.gnu.org/software/autogen/
master_sites        gnu:autogen/rel${version}
use_xz              yes

depends_build       path:bin/pkg-config:pkgconfig \
                    path:libexec/coreutils/libstdbuf.so:coreutils

depends_lib         port:gettext \
                    port:guile-2.2 \
                    port:libxml2

# guile is not universal
universal_variant   no

patchfiles-append   mktemp.patch
patchfiles-append   Werror.patch
patchfiles-append   Wno-format-contains-nul.patch
patchfiles-append   configure.patch

# https://sourceforge.net/p/autogen/bugs/187/
configure.args-append \
                    ac_cv_func_utimensat=no

# config.status: error: Something went wrong bootstrapping makefile fragments
# for automatic dependency tracking.  Try re-running configure with the
# '--disable-dependency-tracking' option to at least be able to build
# the package (albeit without support for automatic dependency tracking).
configure.args-append \
                    --disable-dependency-tracking

test.run            yes
test.target         check

livecheck.type      regex
livecheck.url       https://ftp.gnu.org/gnu/${name}/?C=M&O=D
livecheck.regex     rel(\\d+(?:\\.\\d+)*)
