# -*- 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                slrn
version             1.0.3
revision            2
categories          news net
platforms           darwin
homepage            http://slrn.sourceforge.net/
license             GPL-2
maintainers         nomaintainer

description         A powerful console-based newsreader
long_description    slrn is an easy to use but powerful NNTP/spool based \
    newsreader.  It is highly customizable, supports \
    scoring, free key bindings, and can be extended using \
    the SLang macro language.
            
master_sites        http://jedsoft.org/releases/slrn/ \
                    http://jedsoft.org/releases/slrn/old/

distname            ${name}-${version}a
worksrcdir          ${name}-${version}

checksums           sha1    898d09685f5fe159f23829cd21e15308f5dce822 \
                    rmd160  dd5f5df5d508b8e0c5b136093f24121af31d3432 \
                    sha256  3ba8a4d549201640f2b82d53fb1bec1250f908052a7983f0061c983c634c2dac

use_bzip2           yes

depends_lib         port:gettext \
                    port:libiconv \
                    port:slang2

patchfiles          implicit.patch

configure.args      --with-libiconv-prefix=${prefix} \
                    --mandir=${prefix}/share/man \
                    --with-slang-library=${prefix}/lib \
                    --with-slang-includes=${prefix}/include

post-destroot {
    file copy ${worksrcpath}/contrib/cleanscore ${destroot}${prefix}/bin
    file copy ${worksrcpath}/contrib/README.cleanscore ${destroot}${prefix}/share/doc/${name}
}

# adds slrnpull
variant pull description {spool outgoing postings to let slrnpull send them instead of contacting the newsserver itself} {
    configure.args-append --with-slrnpull
}

variant ssl description {Add SSL support} {
    configure.args-append \
        --with-ssl=${prefix} \
        --with-ssl-includes=${prefix}/include/openssl
    depends_lib-append  path:lib/libssl.dylib:openssl
}

variant uudeview description {Use uudeview library to decode uuencoded articles} {
    # build dependency because uudeview provides only the static library libuu.a
    depends_build-append    port:uudeview
    configure.args-append   --with-uu=${prefix}
}
