# Maintainer: Jan Alexander Steffens (heftig) pkgbase=gtk4 pkgname=( gtk4 gtk4-demos gtk4-docs gtk-update-icon-cache ) pkgver=4.10.3 pkgrel=2 epoch=1 pkgdesc="GObject-based multi-platform GUI toolkit" url="https://www.gtk.org/" arch=(x86_64) license=(LGPL) depends=( adwaita-icon-theme cairo cantarell-fonts dconf desktop-file-utils fontconfig fribidi gdk-pixbuf2 glib2 graphene gst-plugins-bad-libs harfbuzz iso-codes libcloudproviders libcolord libcups libegl libepoxy libgl libjpeg libpng librsvg libtiff libx11 libxcursor libxdamage libxext libxfixes libxi libxinerama libxkbcommon libxrandr libxrender pango shared-mime-info tracker3 wayland ) makedepends=( docbook-xsl gi-docgen git gobject-introspection meson python-docutils python-gobject sassc shaderc wayland-protocols ) checkdepends=(weston) _commit=06b3ced8e7fc936caed43379b120d75be09713ca # tags/4.10.3^0 source=( "git+https://gitlab.gnome.org/GNOME/gtk.git#commit=$_commit" gtk-update-icon-cache.{hook,script} gtk4-querymodules.{hook,script} ) b2sums=('SKIP' '136bdb410c46daf769175e8e8837286576391797a4762b8cf388217e893dd6c5087c5c91c347cbdf7d3e9dcd2c978c2fb275b5af1f3425c9f7979fbc65a81324' '6bcd839ef82296d864587e0cc7acc0145bdea8e5235af304747cf3c0e564c2757cc67c0373dc044bec83dccfc57dc899546c2fccea96cff2bba22f09978a3814' 'dd589bd1ad2b13f0e06f6899776a083f20a1aac24d4308d666ffd0d1cff38457b8257b8366f92e767b4233b3d86b6b54fa50339faf84c4801a824986366dce30' '4b90eb8d582509b09aab401313d4399cc139ad21b5dd7d45d79860d0764c7494c60714e0794e09823e51d1894ac032a994f27d79d1499abf24ee6f59bdb0c243') pkgver() { cd gtk git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g' } prepare() { cd gtk # GtkTreeListModel fixes # https://gitlab.gnome.org/GNOME/gtk/-/issues/5707 git cherry-pick -n 4f47683710bbb4b56c286c6ee6a5c394fcf2b755 # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5873 git cherry-pick -n 541de3451cdaef589ab724ccf612d868455f2b31 # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5918 } build() { local meson_options=( -D broadway-backend=true -D cloudproviders=enabled -D colord=enabled -D gtk_doc=true -D man-pages=true -D tracker=enabled ) CFLAGS+=" -DG_DISABLE_CAST_CHECKS" 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) optdepends=('evince: Default print preview command') provides=(libgtk-4.so) meson install -C build --destdir "$pkgdir" install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-4.0/settings.ini" <