# -*- 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                gsettings-desktop-schemas
version             50.0
license             LGPL-2.1
set branch          [lindex [split ${version} .] 0]

description         gsettings-desktop-schemas contains a collection of GSettings schemas \
                    for settings shared by various components of a desktop.

long_description    {*}${description}

maintainers         {devans @dbevans} openmaintainer
categories          gnome
platforms           any
homepage            https://www.gnome.org
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  7ab90cf92934e4a816cbe5fb5dadc72c21bc24ec \
                    sha256  358f07cb253727650e132805df3c69f7bf90448040bce171b6f6f2cb1b9c37ef \
                    size    897860

supported_archs     noarch

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection

# gobject-introspection 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}"
}

post-activate {
    system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
}

livecheck.type      gnome
