# $Id$

PortSystem 1.0

name            tf
version         5.0b8
revision        4
categories      net games
maintainers     gmail.com:darren.bane
description     popular and powerful MUD client
long_description \
    TinyFugue is a powerful, programmable MUD \
    client with macro support and multi-worlding support.
homepage        http://tinyfugue.sourceforge.net/
platforms       darwin linux
license         GPL-2

master_sites    sourceforge:tinyfugue
regsub -all     "\\." $version "" distVersion
distname        ${name}-${distVersion}
checksums       md5 3e994e791966d274f63b0e61abf2ef59

configure.args  --mandir=\\\${prefix}/share/man \
                --enable-manpage \
                --enable-getaddrinfo \
                --enable-termcap=ncurses \
                --disable-ssl

patchfiles      patch-src-malloc.c.diff patch-src__signals.c \
                patch-src__socket.c amd64_vSprintf_fix.patch \
                tf-508b-Fix-build-with-PCRE-8.30.patch

post-configure {
    system "ed - ${worksrcpath}/src/tfconfig.h < ${filespath}/tfconfig.h.ed"
}

destroot.destdir prefix=${destroot}${prefix}

depends_lib     port:ncurses port:pcre port:zlib

variant ssl description "Enable SSL support" {
    configure.args-delete   --disable-ssl
    depends_lib-append      path:lib/libssl.dylib:openssl
}