# -*- 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                libev
version             4.33
categories          devel net
license             {BSD GPL-2+}

maintainers         {stromnov @stromnov} openmaintainer

description         asynchronous event library

long_description    libev is a full-featured and high-performance event \
                    loop that is loosely modelled after libevent.

homepage            http://software.schmorp.de/pkg/libev.html
master_sites        http://dist.schmorp.de/libev/Attic/

checksums           rmd160  125519f593ed3239ea24522d3692f13df466b8a4 \
                    sha256  507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea \
                    size    569527

if {${subport} eq ${name}} {
    PortGroup       muniversal 1.0

    epoch           1
    revision        1

    post-destroot {
        delete ${destroot}${prefix}/include/event.h
    }

    livecheck.type      regex
    livecheck.url       http://dist.schmorp.de/libev/
    livecheck.regex     ${name}-(\[0-9.\]+)\\.
} else {
    livecheck.type      none
}

subport ${name}-libevent-compat {
    revision        0
    description     libevent-compatible event.h header
    long_description \
                    ${subport} provides a {*}${description}.
    conflicts       libevent
    supported_archs noarch
    platforms       any
    depends_run     port:${name}
    use_configure   no
    build {}
    destroot {
        copy ${worksrcpath}/event.h ${destroot}${prefix}/include
    }
}
