# Maintainer: Alisson Lauffer # Contributor: Jan Alexander Steffens (heftig) # Contributor: Fabian Bornschein pkgname=gtk4-paper-plane pkgver=4.14.3 pkgrel=1 pkgdesc="GObject-based multi-platform GUI toolkit (Version required by Paper Plane)" url="https://www.gtk.org/" arch=('i686' 'x86_64' 'armv7h' 'aarch64') license=(LGPL-2.1-or-later) depends=( adwaita-icon-theme bash cairo cantarell-fonts dconf desktop-file-utils fontconfig fribidi gcc-libs gdk-pixbuf2 glib2 glibc graphene gst-plugins-base-libs gst-plugins-bad-libs gstreamer gtk-update-icon-cache 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 vulkan-icd-loader wayland ) makedepends=( git gobject-introspection meson python-docutils python-gobject sassc shaderc vulkan-headers wayland-protocols ) optdepends=('evince: Default print preview command') conflicts=(gtk4) provides=(gtk4=$pkgver libgtk-4.so) checkdepends=(weston) source=("git+https://gitlab.gnome.org/GNOME/gtk.git#tag=$pkgver" gtk-reversed-list-${pkgver}.patch::'https://raw.githubusercontent.com/paper-plane-developers/paper-plane/main/build-aux/gtk-reversed-list.patch' gtk4-querymodules.{hook,script}) sha256sums=('SKIP' 'a6ec54e8c7c082d6ca0bef0feb9da785044e6cde5dfda24959e6697a28763d5f' 'a5074ffc057a3041a4f851b4b4674cfc21f3cb9cc90c5414c3e91816a5d205e9' '92d08db5aa30bda276bc3d718e7ff9dd01dc40dcab45b359182dcc290054e24e') prepare() { cd gtk patch --forward --strip=1 --input="$srcdir/gtk-reversed-list-${pkgver}.patch" } build() { CFLAGS+=" -DG_DISABLE_CAST_CHECKS" local meson_options=( -D broadway-backend=true -D cloudproviders=enabled -D tracker=enabled -D colord=enabled -D documentation=false -D man-pages=true -D build-tests=false -D build-demos=false -D build-examples=false -D build-testsuite=false -D tracker=enabled ) arch-meson gtk build "${meson_options[@]}" meson compile -C build } package() { meson install -C build --destdir "$pkgdir" # files belonging to gtk-update-icon-cache, the official package is used instead rm "$pkgdir/usr/bin/gtk4-update-icon-cache" rm "$pkgdir/usr/share/man/man1/gtk4-update-icon-cache.1" # files belonging to gtk4-demos, the official package is used instead rm "$pkgdir/usr/share/man/man1/gtk4-"{demo-application,demo,icon-browser,node-editor,widget-factory}".1" install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-4.0/settings.ini" <