# Maintainer: Jan Alexander Steffens (heftig) # ALARM: Kevin Mihelich # - use github mirror, more reliable pkgbase=gtk4 pkgname=(gtk4 gtk-update-icon-cache gtk4-docs gtk4-demos) pkgver=4.6.0 pkgrel=1 epoch=1 pkgdesc="GObject-based multi-platform GUI toolkit" url="https://www.gtk.org/" arch=(x86_64) license=(LGPL) depends=(glib2 cairo pango fribidi gdk-pixbuf2 libpng libtiff libjpeg libepoxy libgl libegl harfbuzz libxkbcommon graphene iso-codes tracker3 libcolord wayland libxrandr libx11 libxrender libxi libxext libxcursor libxdamage libxfixes fontconfig libxinerama libcloudproviders libcups rest json-glib gst-plugins-bad-libs librsvg dconf shared-mime-info desktop-file-utils adwaita-icon-theme cantarell-fonts) makedepends=(git meson gi-docgen shaderc sassc gobject-introspection docbook-xsl wayland-protocols python-gobject python-docutils) checkdepends=(weston) _commit=70cb61fb7104c76a15bc6494a10e6ff1d470f6d8 # tags/4.6.0^0 source=("git+https://github.com/GNOME/gtk.git#commit=$_commit" gtk-update-icon-cache.{hook,script} gtk4-querymodules.hook) sha256sums=('SKIP' '2d435e3bec8b79b533f00f6d04decb1d7c299c6e89b5b175f20be0459f003fe8' 'f1d3a0dbfd82f7339301abecdbe5f024337919b48bd0e09296bb0e79863b2541' 'cd8e607eddd9941f279084e1d15309941423d26cca1897f43524a02e58e48816') pkgver() { cd gtk git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g' } prepare() { cd gtk } build() { CFLAGS+=" -DG_DISABLE_CAST_CHECKS" local meson_options=( -D broadway-backend=true -D cloudproviders=enabled -D tracker=enabled -D colord=enabled -D gtk_doc=true -D man-pages=true ) arch-meson gtk build "${meson_options[@]}" meson compile -C build } check() ( export XDG_RUNTIME_DIR="$PWD/runtime-dir" WAYLAND_DISPLAY=wayland-5 mkdir -p -m 700 "$XDG_RUNTIME_DIR" weston --backend=headless-backend.so --socket=$WAYLAND_DISPLAY --idle-time=0 & _w=$! trap "kill $_w; wait" EXIT meson test -C build --print-errorlogs ) _pick() { local p="$1" f d; shift for f; do d="$srcdir/$p/${f#$pkgdir/}" mkdir -p "$(dirname "$d")" mv "$f" "$d" rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")" done } package_gtk4() { depends+=(gtk-update-icon-cache) provides=(libgtk-4.so) meson install -C build --destdir "$pkgdir" install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-4.0/settings.ini" <