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

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

checksums           rmd160  46a1fdcbcaca6b0652ea523b37447fc7219b77e4 \
                    sha256  8d55441ddfc2e7d49ad3ff36c384ad4c1533de97d92a9fcaf3f6753b49b37c7c \
                    size    229676

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}
