# -*- 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.31 newsraft-
revision            0

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

checksums           rmd160  0eca28d379a5b0833daaf214dae86f16659eb2e4 \
                    sha256  de0d96664d9a276dbe58cf4b44a6861bc18b6fd4c0f41a97450c5b3509904ae8 \
                    size    224575

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}
