# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4
# $Id$

PortSystem          1.0

name                prosody
version             0.9.10
maintainers         g5pw openmaintainer

categories          net chat
description         Prosody is a modern flexible communications server for \
                    Jabber/XMPP written in Lua.
long_description    ${description} It aims to be easy to set up and configure, \
                    and light on resources. For developers it aims to be easy \
                    to extend and give a flexible system on which to rapidly \
                    develop added functionality, or prototype new protocols.

platforms           darwin

homepage            http://prosody.im
license             MIT

master_sites        ${homepage}/downloads/source/

depends_lib         port:lua-luasocket \
                    port:lua-luasec \
                    port:lua-luaexpat \
                    port:libidn

checksums           rmd160  adee85a03e80b8953c55ec6dc5e89773c342bc5a \
                    sha256  4836eefed4d9bbb632cba24ac5bd8e9bc7c029a79d06084b00ffc70858d1662f

configure.cflags-append  -fPIC
configure.ldflags-append -bundle -undefined dynamic_lookup

configure.args-append \
                    --ostype=macosx \
                    --with-lua=${prefix} \
                    --with-lua-include=${prefix}/include \
                    --with-lua-lib=${prefix}/lib \
                    --c-compiler=${configure.cc} \
                    --linker=${configure.cc} \
                    --cflags=\"${configure.cflags}\" \
                    --ldflags=\"${configure.ldflags}\"

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "${name}-(\\d+\\.\\d+\\.\\d+)"