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

name                libshumate
version             1.2.2
revision            0

categories          gnome gis x11
license             LGPL-2.1+
maintainers         nomaintainer

description         GTK-4 widget to display maps
long_description    ${name} is a C library providing a GtkWidget to display maps.
homepage            https://www.gnome.org

set branch          [join [lrange [split ${version} .] 0 1] .]
master_sites        gnome:sources/${name}/${branch}/
use_xz              yes

checksums           rmd160  072367f92b12217c5eb0491aa82e6f6198d58ebd \
                    sha256  6f587579f7f2d60b38d3f4727eb1a8d2feac9cbdc018e53ff5f772a8608fa44b \
                    size    321216

meson.wrap_mode     nodownload

depends_build-append \
                    port:gettext \
                    path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection \
                    port:gperf \
                    path:bin/pkg-config:pkgconfig \
                    path:bin/vala:vala

depends_lib-append  path:lib/pkgconfig/cairo.pc:cairo \
                    path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
                    port:gettext-runtime \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:graphene \
                    path:lib/pkgconfig/gtk4.pc:gtk4 \
                    port:json-glib \
                    path:lib/pkgconfig/libsoup-3.0.pc:libsoup \
                    port:protobuf-c \
                    port:sqlite3

configure.args-append \
                    -Dgir=true \
                    -Dgtk_doc=false \
                    -Dsysprof=disabled \
                    -Dvapi=true

# gskpathpoint.h: error: redefinition of typedef ‘GskPathPoint’
# gtkbuilderscope.h: error: redefinition of typedef ‘GtkBuilderScope’
compiler.blacklist-append \
                    {*gcc-[34].*} {clang < 421}
