name=gsettings-desktop-schemas
version=46.0
revision=1
tarball_url="https://download.gnome.org/sources/gsettings-desktop-schemas/46/gsettings-desktop-schemas-${version}.tar.xz"
tarball_blake2b="537b37640c17aa8338e2bb520fb1a8184c74a5cb28d6b7d9fa35393c0a76a4a144f6518b58546393c39a9f57889bcb99decc0e9bfbf4a1969c44ecf89462c4ee"
imagedeps="meson ninja"
hostdeps="gcc pkg-config"
deps="core-libs glib"

regenerate() {
    sed -i -r 's:"(/system):"/org/gnome\1:g' schemas/*.in
}

build() {
    meson_configure \
        -Dintrospection=false

    ninja -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" ninja install

    glib-compile-schemas "${dest_dir}${prefix}"/share/glib-2.0/schemas
    rm "${dest_dir}${prefix}"/share/glib-2.0/schemas/gschemas.compiled

    post_package_strip
}
