# -*- 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           meson 1.0

name                libgnt
version             2.14.3
revision            1
categories          devel
license             GPL-2+
maintainers         {devans @dbevans} openmaintainer
description         GNT: The GLib Ncurses Toolkit
long_description    GNT is an ncurses toolkit for creating text-mode graphical user interfaces \
                    in a fast and easy way. It is based on GNOME glib2 and ncurses

homepage            https://www.pidgin.im/
master_sites        sourceforge:project/pidgin/libgnt/${version}

checksums           rmd160  e2310fd6a6db4601a999d19be1025fee76a5ed0f \
                    sha256  57f5457f72999d0bb1a139a37f2746ec1b5a02c094f2710a339d8bcea4236123 \
                    size    106388

use_xz              yes

depends_build-append \
                    port:pkgconfig \
                    port:gtk-doc

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:libxml2 \
                    port:ncurses \
                    port:python27

patchfiles          ncurses-sys-prefix.patch

# gntwm.c: error: dereferencing pointer to incomplete type
# https://keep.imfreedom.org/libgnt/libgnt/rev/2da723f790d6
patchfiles-append   patch-PANEL.diff

post-patch {
    reinplace "s|@@MP_PREFIX@@|${prefix}|" ${worksrcpath}/meson.build
}

livecheck.url       https://sourceforge.net/projects/pidgin/files/${name}/
livecheck.regex     "${name}\/(\\d+(?:\\.\\d+)*)\/"
