# -*- 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
# $Id$

PortSystem          1.0
PortGroup           perl5 1.0

name                snownews
version             1.5.12
revision            6
perl5.branches      5.24
platforms           darwin
categories          net www
license             GPL-2
maintainers         nomaintainer

description         Text mode RSS newsreader
long_description    Snownews is a text mode RSS/RDF newsreader. It supports all versions \
                    of RSS natively and supports other formats via plugins.

homepage            http://kiza.kcore.de/software/snownews/
master_sites        ${homepage}download/

checksums           rmd160  dbe9c6b88e77ce37bb23e4d3ddc8d63f8bd66151 \
                    sha256  26dd96e9345d9cbc1c0c9470417080dd0c3eb31e7ea944f78f3302d7060ecb90

depends_lib         port:gettext \
                    port:libgcc \
                    port:libiconv \
                    port:libxml2 \
                    port:ncurses \
                    path:lib/libssl.dylib:openssl \
                    port:p${perl5.major}-xml-libxml \
                    port:zlib

post-patch {
    # We want to use perl from MacPorts.
    reinplace s|/usr/bin/perl|${perl5.bin}| ${worksrcpath}/opml2snow
}

build.args          EXTRA_CFLAGS="-I${prefix}/include" \
                    EXTRA_LDFLAGS="-L${prefix}/lib -lintl" \
                    PREFIX=${prefix}

destroot.args       PREFIX=${prefix}