# -*- 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
PortGroup           compiler_blacklist_versions 1.0

name                libdazzle
version             3.38.0
license             GPL-3+
set branch          [join [lrange [split ${version} .] 0 1] .]
description         ${name} is a companion library to GObject and Gtk+.
long_description    ${description}  It includes a collection of dazzling Gtk widgets, \
                    data structures, search engines, a shortcut engine, panels, \
                    desktop integration, and those missing pieces from common libraries \
                    that help you write cleaner and safer code

maintainers         nomaintainer
categories          gnome
platforms           darwin
homepage            https://gitlab.gnome.org/GNOME/${name}
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  dcef5df588c735a4046b63967ef1597117721561 \
                    sha256  e18af28217943bcec106585298a91ec3da48aa3ad62fd0992f23f0c70cd1678f \
                    size    447304

depends_build-append \
                    port:pkgconfig \

depends_lib-append  port:gobject-introspection \
                    port:gtk3 \
                    port:vala

compiler.c_standard 2011

if {![info exists universal_possible]} {
    set universal_possible [expr {${os.universal_supported} && [llength ${configure.universal_archs}] >= 2}]
}
# uses g-ir-scanner, which uses $CC from env
if {${universal_possible} && [variant_isset universal]} {
    foreach arch ${configure.universal_archs} {
        lappend merger_build_env(${arch})  "CC=${configure.cc} -arch ${arch}"
        lappend merger_destroot_env(${arch})  "CC=${configure.cc} -arch ${arch}"
    }
} else {
    build.env-append       "CC=${configure.cc} ${configure.cc_archflags}"
    destroot.env-append    "CC=${configure.cc} ${configure.cc_archflags}"
}

livecheck.type      gnome
