# -*- 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
PortGroup           github 1.0
PortGroup           muniversal 1.0

github.setup        paul-j-lucas cdecl 14.2 cdecl-
revision            0
categories          devel
license             GPL-3
maintainers         lucasmail.org:paul openmaintainer

description         Composing and deciphering C (or C++) type declarations \
                    or casts.
long_description    cdecl (see-deh-kull) is a program for composing \
                    and deciphering C (or C++) type declarations or casts, \
                    a.k.a. \"gibberish.\" It can be used interactively on a \
                    terminal or accept input from either the command line \
                    or standard input.

checksums           rmd160  bb0a06f1d7b620e00b20dd502878de334d5d0b9e \
                    sha256  eacb3bbf3f3ea1ec44a7169ae656cd7988a3e75ccf28739440753e1bd5e2a84a \
                    size    831992

depends_build-append    port:autoconf \
                        port:automake

depends_lib-append      port:ncurses \
                        port:readline

# gcc-4.2 fails to build it
compiler.blacklist-append *gcc-4*

if {${os.major} == 10 && ${build_arch} eq "ppc"} {
    # Without this Rosetta uses clang, and the build fails.
    # This is only needed for Rosetta, not 10.6 PPC, but it won’t hurt.
    compiler.blacklist-append *clang*
    configure.pre_args  --build=powerpc-apple-darwin10
}

use_autoreconf      yes
autoreconf.args     -fvi

test.run            yes
test.target         check
test.env-append     TERM=xterm
