name=gtk+-3
version=3.24.41
revision=1
tarball_url="https://download.gnome.org/sources/gtk%2B/3.24/gtk%2B-${version}.tar.xz"
tarball_blake2b="fbded114fe2b5c1c7bffe79d0a22d559f97081eb972baf31b5c9bd7190bd1ea2875f1c632d3f3be8233377299f1df15bbffbe45d50cc7ff588e034eb41eb8f6e"
imagedeps="meson ninja gdk-pixbuf2 python-packaging"
hostdeps="gcc pkg-config"
deps="core-libs at-spi2-core cairo glib gdk-pixbuf libx11 libxext libxcb libxinerama libxrender libxrandr libxfixes libxdamage pango fribidi libepoxy libxkbcommon fontconfig freetype2 libxi harfbuzz libxcursor gsettings-desktop-schemas dbus"

build() {
    meson_configure \
        -Dprint_backends=file \
        -Dintrospection=false \
        -Dx11_backend=true \
        -Dbroadway_backend=true \
        -Dwayland_backend=false \
        -Dcolord=no

    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
}
