# -*- 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                loudmouth
version             1.4.3
revision            4
maintainers         nomaintainer
categories          net devel
license             LGPL-2+
platforms           darwin

description         A lightweight C library for the jabber protocol.
long_description    Loudmouth is a lightweight and easy-to-use C \
                    library for programming with the Jabber protocol. \
                    It's designed to be easy to get started with and yet \
                    extensible to let you do anything the Jabber protocol allows.

homepage            https://launchpad.net/loudmouth
master_sites        http://ftp.imendio.com/pub/imendio/loudmouth/src/
checksums           rmd160  f19851a1f6aa4d1501710b76cb2a5373fcd01708 \
                    sha256  db252747e974b6be3e31d1b11089dc6aec3780989083df9bd75d76ddae7fb613

# gtk-doc is needed for m4 files due to the use of use_autoreconf below
depends_build       port:pkgconfig port:gtk-doc
depends_lib         port:gnutls path:lib/pkgconfig/glib-2.0.pc:glib2

# Use pkg-config to detect gnutls now
# https://groups.google.com/group/loudmouth-dev/browse_thread/thread/3f78255837048daf
patchfiles          patch-configure.ac.diff \
                    patch-automake-1.13.diff \
                    patch-loudmouth-lm-error.c.diff

platform darwin {
    if {${os.major} >= 13} {
        #On Mavericks, TCP constants are declared, apart from TCP_KEEPIDLE
        patchfiles-append   patch-keepidle.diff
    } else {
        #On ML and lower, TCP constants are not declared, so force deactivation
        patchfiles-append   patch-configure-tcp.diff
    }
}

use_autoreconf      yes

configure.args      --without-check