1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
4 pkgname=(gtk4 gtk-update-icon-cache gtk4-docs gtk4-demos)
8 pkgdesc="GObject-based multi-platform GUI toolkit"
10 url="https://www.gtk.org/"
11 depends=(glib2 cairo pango fribidi gdk-pixbuf2 libepoxy libgl libegl harfbuzz
12 libxkbcommon graphene iso-codes tracker3 libcolord wayland libxrandr
13 libx11 libxrender libxi libxext libxcursor libxdamage libxfixes
14 fontconfig libxinerama libcloudproviders libcups rest json-glib
15 gst-plugins-bad-libs librsvg dconf shared-mime-info desktop-file-utils
16 adwaita-icon-theme cantarell-fonts)
17 makedepends=(git meson gi-docgen shaderc sassc gobject-introspection docbook-xsl
20 _commit=3090fbac82d86543cd198ddf38d4044e05c87d91 # tags/4.4.1^0
21 source=("git+https://gitlab.gnome.org/GNOME/gtk.git#commit=$_commit"
22 gtk-update-icon-cache.{hook,script} gtk4-querymodules.hook)
24 '2d435e3bec8b79b533f00f6d04decb1d7c299c6e89b5b175f20be0459f003fe8'
25 'f1d3a0dbfd82f7339301abecdbe5f024337919b48bd0e09296bb0e79863b2541'
26 'cd8e607eddd9941f279084e1d15309941423d26cca1897f43524a02e58e48816')
30 git describe --tags | sed 's/-/+/g'
38 CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
40 -D broadway-backend=true
41 -D cloudproviders=enabled
48 arch-meson gtk build "${meson_options[@]}"
49 meson compile -C build
53 local p="$1" f d; shift
55 d="$srcdir/$p/${f#$pkgdir/}"
56 mkdir -p "$(dirname "$d")"
58 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
63 depends+=(gtk-update-icon-cache)
64 provides=(libgtk-4.so)
66 meson install -C build --destdir "$pkgdir"
68 install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-4.0/settings.ini" <<END
70 gtk-icon-theme-name = Adwaita
71 gtk-theme-name = Adwaita
72 gtk-font-name = Cantarell 11
75 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk4-querymodules.hook
79 _pick guic usr/bin/gtk4-update-icon-cache
80 _pick guic usr/share/man/man1/gtk4-update-icon-cache.1
82 _pick docs usr/share/doc
84 _pick demo usr/bin/gtk4-{demo,demo-application,icon-browser,print-editor,widget-factory}
85 _pick demo usr/share/applications/org.gtk.{Demo,IconBrowser,PrintEditor,WidgetFactory}4.desktop
86 _pick demo usr/share/glib-2.0/schemas/org.gtk.Demo4.gschema.xml
87 _pick demo usr/share/icons/hicolor/*/apps/org.gtk.{Demo,IconBrowser,PrintEditor,WidgetFactory}4[-.]*
88 _pick demo usr/share/man/man1/gtk4-{demo,demo-application,icon-browser,widget-factory}.1
89 _pick demo usr/share/metainfo/org.gtk.{Demo,IconBrowser,PrintEditor,WidgetFactory}4.appdata.xml
92 package_gtk-update-icon-cache() {
93 pkgdesc="GTK icon cache updater"
94 depends=(gdk-pixbuf2 librsvg hicolor-icon-theme)
97 ln -s gtk4-update-icon-cache "$pkgdir/usr/bin/gtk-update-icon-cache"
98 ln -s gtk4-update-icon-cache.1 "$pkgdir/usr/share/man/man1/gtk-update-icon-cache.1"
100 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-update-icon-cache.hook
101 install -D gtk-update-icon-cache.script "$pkgdir/usr/share/libalpm/scripts/gtk-update-icon-cache"
104 package_gtk4-docs() {
105 pkgdesc+=" (documentation)"
110 package_gtk4-demos() {
111 pkgdesc+=" (demo applications)"
116 # vim:set ts=2 sw=2 et: