# -*- 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           legacysupport 1.1

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

github.setup        ClusterLabs libqb 2.0.8 v
revision            1
checksums           rmd160  e5b9148564e2ff1d2097f73885ea997034436c42 \
                    sha256  b42531fc20b8ac02f4c6d0a4dc49f7c4a1eef09bdb13af5f6927b7fc49522ee6 \
                    size    521600

homepage            https://clusterlabs.github.io/libqb/

description         \
    ${name} is a library providing high performance logging, tracing, IPC, \
    and poll.

long_description    {*}${description}

categories          devel
license             LGPL-2.1
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

github.tarball_from releases
use_xz              yes

patchfiles-append   patch-configure-remove-new-dtags-check.diff

compiler.c_standard 1999

# We are patching configure.ac.
use_autoreconf      yes
autoreconf.cmd      ./autogen.sh
# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr

depends_build-append \
                    port:autoconf   \
                    port:automake   \
                    path:bin/doxygen:doxygen \
                    port:libtool    \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:libxml2

post-destroot {
    file delete ${destroot}${prefix}/bin/doxygen2man
    file delete ${destroot}${prefix}/share/man/man1/doxygen2man.1.gz
}
