# $Id: Portfile 92197 2012-04-21 21:34:52Z dports@macports.org $

PortSystem 1.0

name            irssi
version         0.8.15
revision        2
categories      irc
maintainers     nomaintainer
license         {GPL-2+ OpenSSLException}
description     modular IRC client
long_description \
    Irssi is a modular IRC client that currently has only text mode user    \
    interface, but 80-90% of the code is not text mode specific, so other   \
    UIs could be created pretty easily. Also, Irssi is not really even IRC  \
    specific anymore, there's already a working SILC module available.      \
    Support for other protocols like ICQ could be created some day too.

homepage        http://irssi.org/
platforms       darwin
master_sites    http://mirror.irssi.org/
checksums       md5     1dcb3f511b88df94b0c996f36668c7da \
                sha1    b79ce8c2c98a76b004f63706e7868cd363000d89 \
                rmd160  0c8fba8cf3409621f6c1883127e14538a58c3359
use_bzip2       yes
conflicts       irssi-devel

depends_build   port:pkgconfig
depends_lib     port:gettext path:lib/pkgconfig/glib-2.0.pc:glib2 port:libiconv port:ncurses \
                port:openssl port:zlib

patchfiles      patch-docs_irssi.1.diff
post-patch {
   reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/docs/irssi.1
}

configure.args  --without-socks \
                --without-bot \
                --with-proxy \
                --with-modules \
                --enable-ipv6 \
                --enable-ssl \
                --with-perl=no \
                --mandir=${prefix}/share/man

variant perl description {Add Perl support} {
    depends_lib-append port:perl5
    configure.args-delete   --with-perl=no
    configure.args-append   --with-perl=yes \
                            --with-perl-lib=${prefix}/lib/perl5/darwin
}

default_variants +perl

livecheck.type  regex
livecheck.url   ${homepage}download
livecheck.regex {Latest release version: <strong>(\d+\.\d+\.[0-9a-z]+)</strong>}
