# -*- 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
PortGroup           codeberg 1.0
PortGroup           legacysupport 1.1
PortGroup           makefile 1.0

codeberg.setup      newsraft newsraft 0.35 newsraft-
revision            0

categories          net
license             ISC
maintainers         {@sikmir disroot.org:sikmir} openmaintainer
description         Feed reader for terminal
long_description    {*}${description}

checksums           rmd160  69a68e1170350dcec697e5867b68d4398272bbff \
                    sha256  6a87c8a9b8556650d18443baf827cf930aa4a5c5361a36397b95f275e28d540d \
                    size    233339

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:curl \
                    port:expat \
                    port:gumbo-parser \
                    port:sqlite3

configure.cflags-append \
                    -D_DARWIN_C_SOURCE

# Otherwise linking to LegacySupport is not done,
# and build fails on systems where it is needed.
patchfiles-append   patch-makefile.diff

post-patch {
    reinplace "s|@CFLAGS@|${configure.cflags} [get_canonical_archflags cc]|" ${worksrcpath}/makefile
    reinplace "s|@LDFLAGS@|${configure.ldflags} [get_canonical_archflags ld]|" ${worksrcpath}/makefile
}

destroot.args       PREFIX=${prefix}
