# -*- 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
# $Id: Portfile 106572 2013-05-31 04:39:44Z jmr@macports.org $

PortSystem         1.0
PortGroup          python 1.0

name               py-pyxmpp
version            1.1.2
categories-append  crypto devel
license            LGPL-2.1
maintainers        ram openmaintainer
platforms          darwin

description        Python Jabber/XMPP implementation
long_description   PyXMPP provides most core features of the XMPP protocol \
  and several JSF-defined extensions. PyXMPP provides building blocks for \
  creating Jabber clients and components. Developer uses them to setup \
  XMPP streams, handle incoming events and create outgoing stanzas.

homepage           http://pyxmpp.jajcus.net/
master_sites       ${homepage}downloads/
distname           pyxmpp-${version}

python.versions    25 26 27

checksums          md5 a38abf032aca0408b6055cd94296eb75 \
                   sha1 4cfb72b1c7c834926981303b42243218016ff762 \
                   rmd160 e94194d8dcf0d2e78e30de5cc92b3315c8a1ce92

if {${name} != ${subport}} {
    depends_lib-append port:py${python.version}-libxml2 \
                       port:py${python.version}-dnspython
    if {${python.version} < 26} {
        version     1.0.1
        distname    pyxmpp-${version}
        checksums   md5 b2287c1a63b1c7e5f8036d008ded7310 \
                    sha1 0ed4b347f7239bba4bf07102299a5d0d6d30b18f \
                    rmd160 946dba14eb43a4e22424d8f8a4b86af96bee64f7
        depends_lib-append port:py${python.version}-m2crypto
        patchfiles  patch-fix_muc_admin_iq.diff
    }
}

if {${name} == ${subport}} {
    livecheck.type     regex
    livecheck.url      ${master_sites}
    livecheck.regex    {pyxmpp-(\d+(?:\.\d+)*).tar.gz}
} else {
    livecheck.type     none
}
