# -*- 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                libvterm
version             0.3.3
categories          devel
maintainers         nomaintainer
license             MIT

description         A library for a VT220/xterm/ECMA-48 terminal emulator

long_description \
    An abstract C99 library which implements a VT220 or xterm-like terminal \
    emulator. It doesn't use any particular graphics toolkit or output system, \
    instead it invokes callback function pointers that its embedding program \
    should provide it to draw on its behalf. It avoids calling malloc() during \
    normal running state, allowing it to be used in embedded kernel situations.

homepage            http://www.leonerd.org.uk/code/libvterm/

master_sites        https://launchpad.net/${name}/trunk/v0.3/+download/

checksums           rmd160  757be59cf6b79f92bd8f45c95eb47276c04b4394 \
                    sha256  09156f43dd2128bd347cbeebe50d9a571d32c64e0cf18d211197946aff7226e0 \
                    size    80024

compiler.c_standard 1999

depends_build       port:libtool \
                    path:bin/pkg-config:pkgconfig

patchfiles-append   patch-disable-silent-rules.diff

# cc1: error: unrecognized command line option "-Wpedantic"
patchfiles-append   patch-fix-pedantic.diff

use_configure no

build.args          PREFIX=${prefix}
build.env-append    CC=${configure.cc} \
                    "CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
                    "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \
                    VERBOSE=1

destroot.args       ${build.args}

livecheck.type      regex
livecheck.url       http://launchpad.net/${name}/+download
livecheck.regex     ${name}-(\[0-9.\]+)\\.tar\\.gz
