# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 68176 2010-05-28 16:58:42Z ryandesign@macports.org $

PortSystem          1.0

name                finch
conflicts           pidgin
version             2.7.0
categories          net
platforms           darwin
maintainers         nomaintainer
description         Multi-protocol Instant Messaging client
long_description    Pidgin is an Open Source clone of America OnLine's \
                    Instant Messenger client that uses GTK+ version 2.  It \
                    features multiple groups, group chat, user information \
                    fetching and registration, time stamping, and more.  It \
                    also supports other IM protocols, including Yahoo!, MSN, \
                    ICQ, Jabber, Napster, IRC, and Zephyr via included \
                    plugins.

homepage            http://www.pidgin.im/
master_sites        sourceforge:pidgin
checksums           md5     63a36f91d29f5ac5a402ffd2d7dbbb72 \
                    sha1    7170aaae5e6f4039870eb5e0c5837d55285b758f \
                    rmd160  45e4b5a9acb9c4080ce6b33cedbf9b962883ca25

dist_subdir         pidgin
distname            pidgin-${version}
use_bzip2           yes

depends_lib         port:audiofile \
                    port:libao \
                    port:libxml2 \
                    port:nspr \
                    port:nss \
                    port:p5-xml-parser \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:intltool \
                    port:libidn

patchfiles          patch-finch_libgnt_Makefile.in.diff patch-finch_libgnt_gntwm.c gst.diff

# nss is not universal
universal_variant   no

configure.args      --disable-avahi \
                    --disable-gtkui \
                    --disable-dbus \
                    --disable-gstreamer \
                    --disable-gtkspell \
                    --disable-meanwhile \
                    --disable-nm \
                    --disable-screensaver \
                    --disable-sm \
                    --disable-startup-notification \
                    --disable-vv \
                    --enable-nss \
                    --mandir=${prefix}/share/man \
                    --with-nspr-includes=${prefix}/include/nspr \
                    --with-nspr-libs=${prefix}/lib/nspr \
                    --with-nss-includes=${prefix}/include/nss \
                    --with-nss-libs=${prefix}/lib/nss \
                    --without-x
configure.ldflags-append    -bind_at_load
configure.cppflags-append   -no-cpp-precomp

post-destroot {
    fs-traverse file ${destroot}${prefix}/lib/perl5 {
        if {[file tail ${file}] == "perllocal.pod"} {
            delete ${file}
        }
    }
}

livecheck.type      regex
livecheck.url       http://sourceforge.net/projects/pidgin/files/
livecheck.regex     {/pidgin-([0-9.]+)\.tar}
