# -*- 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                pidgin-otr
version             4.0.2
revision            0
categories          security net chat
license             GPL-2
maintainers         reifferscheid.org:rsync openmaintainer
description         Off-the-Record Plugin for Pidgin
long_description    This is a pidgin plugin which implements Off-the-Record (OTR) \
                    Messaging. \
                    OTR allows you to have private conversations over IM by providing: \
                      - Encryption \
                        - No one else can read your instant messages. \
                      - Authentication \
                        - You are assured the correspondent is who you think it is. \
                      - Deniability \
                        - The messages you send do _not_ have digital signatures that are \
                          checkable by a third party.  Anyone can forge messages after a \
                          conversation to make them look like they came from you.  However, \
                          _during_ a conversation, your correspondent is assured the messages \
                          he sees are authentic and unmodified. \
                      - Perfect forward secrecy \
                        - If you lose control of your private keys, no previous conversation \
                          is compromised.
homepage            http://www.cypherpunks.ca/otr/

master_sites        ${homepage}

checksums           rmd160  707f42936139ce87562ab3b42f78d6c1a0fe8286 \
                    sha256  f4b59eef4a94b1d29dbe0c106dd00cdc630e47f18619fc754e5afbf5724ebac4 \
                    size    515627

depends_build-append \
                    port:gettext \
                    port:intltool \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:gettext-runtime \
                    port:libotr \
                    port:pidgin

patchfiles          patch-configure.ac.diff

# reconfigure using intltoolize and autoreconf (no upstream autogen.sh) for intltool 0.51 compatibility

pre-configure {
    system -W ${worksrcpath} "intltoolize --automake --copy --force"
}

use_autoreconf      yes
autoreconf.args     -fvi

destroot {
    xinstall -m 755 -d ${destroot}${prefix}/lib/pidgin/
    xinstall -m 755 ${worksrcpath}/.libs/pidgin-otr.so ${destroot}${prefix}/lib/pidgin/
    xinstall -m 755 ${worksrcpath}/.libs/pidgin-otr.la ${destroot}${prefix}/lib/pidgin/
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)" \