1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
5 pkgname=(gtk3 gtk3-docs gtk3-demos)
6 pkgver=3.24.34+r156+g812b3930d0
9 pkgdesc="GObject-based multi-platform GUI toolkit"
10 url="https://www.gtk.org/"
12 depends=(atk cairo libxcursor libxinerama libxrandr libxi libepoxy gdk-pixbuf2
13 dconf libxcomposite libxdamage pango shared-mime-info at-spi2-atk
14 wayland libxkbcommon adwaita-icon-theme librsvg desktop-file-utils
15 mesa cantarell-fonts libcolord libcups fribidi iso-codes
16 libcloudproviders tracker3 gtk-update-icon-cache)
17 makedepends=(gobject-introspection gtk-doc git glib2-docs sassc meson
21 _commit=812b3930d0bb11d67d4a2c159d037c8c0d440c50 # gtk-3-24
22 source=("git+https://gitlab.gnome.org/GNOME/gtk.git#commit=$_commit"
23 gtk-query-immodules-3.0.hook)
25 'a0319b6795410f06d38de1e8695a9bf9636ff2169f40701671580e60a108e229')
29 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
35 # https://bugs.archlinux.org/task/76018
36 # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4381#note_1465559
37 git revert -n da4066774b926880631af099469d308714b5606c
41 CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
43 -D broadway_backend=true
44 -D cloudproviders=true
51 arch-meson gtk build "${meson_options[@]}"
52 meson compile -C build
56 local p="$1" f d; shift
58 d="$srcdir/$p/${f#$pkgdir/}"
59 mkdir -p "$(dirname "$d")"
61 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
66 optdepends=('evince: Default print preview command')
67 provides=(gtk3-print-backends libgtk-3.so libgdk-3.so libgailutil-3.so)
68 conflicts=(gtk3-print-backends)
69 replaces=("gtk3-print-backends<=3.22.26-1")
72 meson install -C build --destdir "$pkgdir"
74 install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-3.0/settings.ini" <<END
76 gtk-icon-theme-name = Adwaita
77 gtk-theme-name = Adwaita
78 gtk-font-name = Cantarell 11
81 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-query-immodules-3.0.hook
85 rm usr/bin/gtk-update-icon-cache
86 rm usr/share/man/man1/gtk-update-icon-cache.1
88 _pick docs usr/share/gtk-doc
90 _pick demo usr/bin/gtk3-{demo,demo-application,icon-browser,widget-factory}
91 _pick demo usr/share/applications/gtk3-{demo,icon-browser,widget-factory}.desktop
92 _pick demo usr/share/glib-2.0/schemas/org.gtk.{Demo,exampleapp}.gschema.xml
93 _pick demo usr/share/icons/hicolor/*/apps/gtk3-{demo,widget-factory}[-.]*
94 _pick demo usr/share/man/man1/gtk3-{demo,demo-application,icon-browser,widget-factory}.1
98 pkgdesc+=" (documentation)"
103 package_gtk3-demos() {
104 pkgdesc+=" (demo applications)"