# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem              1.0
PortGroup               github 1.0

github.setup            bakulf libmrss 0.19.4
github.tarball_from     archive

categories              textproc devel
license                 LGPL-2.1+
maintainers             {sethm.id.au:dev @McDaMastR} \
                        openmaintainer

description             Small library for parsing RSS
long_description        mRSS is a C library for parsing, writing, and creating \
                        RSS (Rich Site Summary or Really Simple Syndication, \
                        but not RDF Site Summary) files or streams.

depends_build-append    port:pkgconfig
depends_lib-append      port:curl \
                        port:libnxml

checksums               rmd160  809072d1afdee289b7f3f3cca9e4b3467c15c723 \
                        sha256  28022247056b04ca3f12a9e21134d42304526b2a67b7d6baf139e556af1151c6 \
                        size    43963

patch {
    # Fix "Makefile.am: error: required file './NEWS' not found"
    touch ${worksrcpath}/NEWS
}

use_autoreconf          yes

# <https://trac.macports.org/wiki/WimplicitFunctionDeclaration>
configure.checks.implicit_function_declaration.whitelist-append \
                        alignof

test.run                yes
test.target             check

post-destroot {
    set destdocdir  ${destroot}${prefix}/share/doc/${name}

    xinstall -d ${destdocdir}
    xinstall -m 644 \
        ${worksrcpath}/AUTHORS \
        ${worksrcpath}/COPYING \
        ${worksrcpath}/ChangeLog \
        ${worksrcpath}/README \
        ${destdocdir}
}
