Date: Thursday, December 17, 2020 @ 00:32:46 Author: heftig Revision: 404419
4.0.0-1 Added: gtk4/trunk/PKGBUILD gtk4/trunk/gtk-query-immodules-4.0.hook gtk4/trunk/gtk4-update-icon-cache.hook gtk4/trunk/gtk4-update-icon-cache.script gtk4/trunk/gtk4.install gtk4/trunk/vulkan-fix.diff -------------------------------+ PKGBUILD | 97 ++++++++++++++++++++++++++++++++++++++++ gtk-query-immodules-4.0.hook | 11 ++++ gtk4-update-icon-cache.hook | 13 +++++ gtk4-update-icon-cache.script | 10 ++++ gtk4.install | 3 + vulkan-fix.diff | 15 ++++++ 6 files changed, 149 insertions(+) Added: PKGBUILD =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2020-12-17 00:32:46 UTC (rev 404419) @@ -0,0 +1,97 @@ +# Maintainer: Jan Alexander Steffens (heftig) <hef...@archlinux.org> + +pkgbase=gtk4 +pkgname=(gtk4 gtk4-update-icon-cache) +pkgver=4.0.0 +pkgrel=1 +pkgdesc="GObject-based multi-platform GUI toolkit" +arch=(x86_64) +url="https://www.gtk.org/" +depends=(glib2 cairo pango fribidi gdk-pixbuf2 libepoxy libgl libegl harfbuzz + libxkbcommon graphene iso-codes tracker3 colord wayland libxrandr + libx11 libxrender libxi libxext libxcursor libxdamage libxfixes + libxcomposite fontconfig libxinerama vulkan-icd-loader + libcloudproviders libcups rest json-glib ffmpeg gst-plugins-bad-libs + librsvg dconf shared-mime-info desktop-file-utils adwaita-icon-theme + cantarell-fonts) +makedepends=(git meson gtk-doc glib2-docs wayland-protocols vulkan-headers + sysprof python shaderc sassc gobject-introspection pandoc) +license=(LGPL) +_commit=591c2f05956935adbebed5fc345a309dde2d449c # tags/4.0.0^0 +source=("git+https://gitlab.gnome.org/GNOME/gtk.git#commit=$_commit" + vulkan-fix.diff + gtk-query-immodules-4.0.hook + gtk4-update-icon-cache.{hook,script}) +sha256sums=('SKIP' + 'b92488d5a0b078e1f3ec4a5f9ffd7bdb17690aca447cc2da1c9281478ac51d36' + '1e6a448b7d02d95d4ee8cdedb5052cc764a03e3cf6d7d755bff22793aba200a7' + 'f81264107299efae62932f542a5661bef8d4e9de1c8137007cf231f0cfb085c2' + 'de9d96decf15d0ce7d69616425146f5f850086a6f45cc8ac2ee74309408650cd') + +pkgver() { + cd gtk + git describe --tags | sed 's/-/+/g' +} + +prepare() { + cd gtk + + # Remove conflicting tag + git tag -d 4.0 + + # Fix build with vulkan-headers 162 + git apply -3 ../vulkan-fix.diff +} + +build() { + CFLAGS+=" -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS" + arch-meson gtk build \ + -D broadway_backend=true \ + -D cloudproviders=enabled \ + -D sysprof=enabled \ + -D tracker=enabled \ + -D colord=enabled \ + -D gtk_doc=true \ + -D man-pages=true + meson compile -C build + ninja -C build g{d,s,t}k4-doc +} + +package_gtk4() { + depends+=(gtk4-update-icon-cache) + provides+=(libgtk-4.so) + install=gtk4.install + + DESTDIR="$pkgdir" meson install -C build + + install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-4.0/settings.ini" <<END +[Settings] +gtk-icon-theme-name = Adwaita +gtk-theme-name = Adwaita +gtk-font-name = Cantarell 11 +END + + install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-query-immodules-4.0.hook + + # gtk-update-icon-cache is also used by other toolkits + mkdir -p guic/usr/{bin,share/man/man1} + mv {"$pkgdir",guic}/usr/bin/gtk4-update-icon-cache + mv {"$pkgdir",guic}/usr/share/man/man1/gtk4-update-icon-cache.1 +} + +package_gtk4-update-icon-cache() { + pkgdesc="GTK icon cache updater" + depends=(gdk-pixbuf2 librsvg hicolor-icon-theme) + provides=("gtk-update-icon-cache=$pkgver") + conflicts=(gtk-update-icon-cache) + replaces=('gtk-update-icon-cache<4.0.0') + + mv -t "$pkgdir" guic/* + ln -s gtk4-update-icon-cache "$pkgdir/usr/bin/gtk-update-icon-cache" + ln -s gtk4-update-icon-cache.1 "$pkgdir/usr/share/man/man1/gtk-update-icon-cache.1" + + install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk4-update-icon-cache.hook + install -D gtk4-update-icon-cache.script "$pkgdir/usr/share/libalpm/scripts/gtk4-update-icon-cache" +} + +# vim:set ts=2 sw=2 et: Added: gtk-query-immodules-4.0.hook =================================================================== --- gtk-query-immodules-4.0.hook (rev 0) +++ gtk-query-immodules-4.0.hook 2020-12-17 00:32:46 UTC (rev 404419) @@ -0,0 +1,11 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/gtk-4.0/4.0.0/immodules/*.so + +[Action] +Description = Probing GTK4 input method modules... +When = PostTransaction +Exec = /usr/bin/gtk-query-immodules-4.0 --update-cache Added: gtk4-update-icon-cache.hook =================================================================== --- gtk4-update-icon-cache.hook (rev 0) +++ gtk4-update-icon-cache.hook 2020-12-17 00:32:46 UTC (rev 404419) @@ -0,0 +1,13 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/share/icons/*/ +Target = !usr/share/icons/*/?* + +[Action] +Description = Updating icon theme caches... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/gtk4-update-icon-cache +NeedsTargets Added: gtk4-update-icon-cache.script =================================================================== --- gtk4-update-icon-cache.script (rev 0) +++ gtk4-update-icon-cache.script 2020-12-17 00:32:46 UTC (rev 404419) @@ -0,0 +1,10 @@ +#!/bin/bash + +while read -r f; do + if [[ -e ${f}index.theme ]]; then + gtk4-update-icon-cache -q "$f" + elif [[ -d $f ]]; then + rm -f "${f}icon-theme.cache" + rmdir --ignore-fail-on-non-empty "$f" + fi +done Added: gtk4.install =================================================================== --- gtk4.install (rev 0) +++ gtk4.install 2020-12-17 00:32:46 UTC (rev 404419) @@ -0,0 +1,3 @@ +pre_remove() { + rm -f /usr/lib/gtk-4.0/4.0.0/immodules.cache +} Added: vulkan-fix.diff =================================================================== --- vulkan-fix.diff (rev 0) +++ vulkan-fix.diff 2020-12-17 00:32:46 UTC (rev 404419) @@ -0,0 +1,15 @@ +diff --git i/gdk/gdkvulkancontext.c w/gdk/gdkvulkancontext.c +index 917b443f94..8e49fedc9a 100644 +--- i/gdk/gdkvulkancontext.c ++++ w/gdk/gdkvulkancontext.c +@@ -210,8 +210,10 @@ gdk_vulkan_strerror (VkResult result) + return "An unknown error has occurred; either the application has provided invalid input, or an implementation failure has occurred."; + #endif + #if VK_HEADER_VERSION >= 135 ++# if VK_HEADER_VERSION < 162 + case VK_ERROR_INCOMPATIBLE_VERSION_KHR: + return "Acceleration structure serialized with version as the version information is not compatible with device."; ++# endif + case VK_THREAD_IDLE_KHR: + return "A deferred operation is not complete but there is currently no work for this thread to do at the time of this call."; + case VK_THREAD_DONE_KHR: