# -*- 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                cook
version             2.34
categories          devel
maintainers         nomaintainer
license             GPL-3+

description         Cook is a replacement for the traditional make(1) tool.
long_description    \
    Cook is a tool for constructing files. It is given \
    a set of files to create, and recipes of how to create \
    them. In any non-trivial program there will be \
    prerequisites to performing the actions necessary to \
    creating any file, such as include files. Cook provides \
    a mechanism to define these.

homepage            http://miller.emu.id.au/pmiller/software/cook/
master_sites        ${homepage}

checksums           rmd160  4b7c8cadc10a788e5e4651bb72039d6de7a14894 \
                    sha256  dca3c2339c2e079df9ee861d20916ec3cfe650386ed42bf23f34508c2d569a80 \
                    size    917897

depends_build-append \
                    port:gettext
depends_lib-append  port:gettext-runtime \
                    port:libiconv
patchfiles          patch-common__help.c.diff

# https://trac.macports.org/ticket/68959
patchfiles-append   patch-fix-iswprint.diff

# expr_gram.y:92: error: expected identifier or ‘(’ before numeric constant
# y.tab.c:1332: error: called object ‘256’ is not a function
compiler.blacklist-append \
                    *gcc-4.0 *gcc-4.2

pre-configure {
    reinplace "s|__PREFIX__|${prefix}|g" \
        "${worksrcpath}/common/help.c"
}

use_parallel_build  no
build.env-append    RPM_BUILD_ROOT=${destroot}
destroot.env-append RPM_BUILD_ROOT=${destroot}
configure.args      --infodir=${prefix}/share/info --mandir=${prefix}/share/man \
                    --datadir=${prefix}/share

livecheck.type      none
