# -*- 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                libut
version             2.0
revision            0
checksums           rmd160  0b636b8d122182bce3cf8c05e8b93611f0b32f66 \
                    sha256  4f9d44d178c7c35b7c6817d464bd2e07ddf47b37e9b410cddb88df979c143090 \
                    size    191223

categories          devel
license             BSD
maintainers         nomaintainer

description         library for writing Unix servers or daemon processes

long_description    libut is a C library for writing Unix servers or daemon \
                    processes. It invokes callbacks for I/O, signals, or timer \
                    activity. It supports logging, profiling, configuration, and \
                    runtime administration through an interactive control port.

homepage            http://libut.sourceforge.net/
master_sites        sourceforge:project/libut/libut2/libut-${version}

use_bzip2           yes

# configure.patch: misuse of AC_TRY_LINK produces broken code; missing includes
# others: function return type bugs and missing includes/prototypes
patchfiles          configure.patch \
                    connect.c.patch \
                    fd.c.patch \
                    hash.h.patch \
                    init.c.patch \
                    iob.c.patch \
                    listen.c.patch \
                    log.c.patch \
                    log_shl.c.patch \
                    mem.c.patch \
                    mem_shl.c.patch \
                    prf_shl.c.patch \
                    request.c.patch \
                    shl.c.patch \
                    loop.c.patch \
                    tmr.c.patch \
                    var.c.patch \
                    var_shl.c.patch \
                    coproc.c.patch \
                    coproc_shl.c.patch \
                    memperf.c.patch \
                    mlperf.c.patch \
                    coprocess.c.patch \
                    rqst.c.patch \
                    upld.c.patch \
                    srvr.c.patch \
                    int.c.patch \
                    timer.c.patch

configure.args      --mandir=${prefix}/share/man

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} README LICENSE \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
