1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
13 pkgdesc="GObject-based multi-platform GUI toolkit"
14 url="https://www.gtk.org/"
69 _commit=06b3ced8e7fc936caed43379b120d75be09713ca # tags/4.10.3^0
71 "git+https://gitlab.gnome.org/GNOME/gtk.git#commit=$_commit"
72 gtk-update-icon-cache.{hook,script}
73 gtk4-querymodules.{hook,script}
76 '136bdb410c46daf769175e8e8837286576391797a4762b8cf388217e893dd6c5087c5c91c347cbdf7d3e9dcd2c978c2fb275b5af1f3425c9f7979fbc65a81324'
77 '6bcd839ef82296d864587e0cc7acc0145bdea8e5235af304747cf3c0e564c2757cc67c0373dc044bec83dccfc57dc899546c2fccea96cff2bba22f09978a3814'
78 'dd589bd1ad2b13f0e06f6899776a083f20a1aac24d4308d666ffd0d1cff38457b8257b8366f92e767b4233b3d86b6b54fa50339faf84c4801a824986366dce30'
79 '4b90eb8d582509b09aab401313d4399cc139ad21b5dd7d45d79860d0764c7494c60714e0794e09823e51d1894ac032a994f27d79d1499abf24ee6f59bdb0c243')
83 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
89 # GtkTreeListModel fixes
90 # https://gitlab.gnome.org/GNOME/gtk/-/issues/5707
91 git cherry-pick -n 4f47683710bbb4b56c286c6ee6a5c394fcf2b755 # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5873
92 git cherry-pick -n 541de3451cdaef589ab724ccf612d868455f2b31 # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5918
97 -D broadway-backend=true
98 -D cloudproviders=enabled
105 CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
106 arch-meson gtk build "${meson_options[@]}"
107 meson compile -C build
111 export XDG_RUNTIME_DIR="$PWD/runtime-dir" WAYLAND_DISPLAY=wayland-5
113 mkdir -p -m 700 "$XDG_RUNTIME_DIR"
114 weston --backend=headless-backend.so --socket=$WAYLAND_DISPLAY --idle-time=0 &
117 trap "kill $_w; wait" EXIT
119 meson test -C build --print-errorlogs
123 local p="$1" f d; shift
125 d="$srcdir/$p/${f#$pkgdir/}"
126 mkdir -p "$(dirname "$d")"
128 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
133 depends+=(gtk-update-icon-cache)
134 optdepends=('evince: Default print preview command')
135 provides=(libgtk-4.so)
137 meson install -C build --destdir "$pkgdir"
139 install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-4.0/settings.ini" <<END
141 gtk-icon-theme-name = Adwaita
142 gtk-theme-name = Adwaita
143 gtk-font-name = Cantarell 11
146 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk4-querymodules.hook
147 install -D gtk4-querymodules.script "$pkgdir/usr/share/libalpm/scripts/gtk4-querymodules"
151 _pick demo usr/bin/gtk4-{demo,demo-application,icon-browser,node-editor,print-editor,widget-factory}
152 _pick demo usr/share/applications/org.gtk.{Demo4,IconBrowser4,PrintEditor4,WidgetFactory4,gtk4.NodeEditor}.desktop
153 _pick demo usr/share/glib-2.0/schemas/org.gtk.Demo4.gschema.xml
154 _pick demo usr/share/icons/hicolor/*/apps/org.gtk.{Demo4,IconBrowser4,PrintEditor4,WidgetFactory4,gtk4.NodeEditor}[-.]*
155 _pick demo usr/share/man/man1/gtk4-{demo,demo-application,icon-browser,node-editor,widget-factory}.1
156 _pick demo usr/share/metainfo/org.gtk.{Demo4,IconBrowser4,PrintEditor4,WidgetFactory4,gtk4.NodeEditor}.appdata.xml
158 _pick docs usr/share/doc
160 # Built by GTK 4, shared with GTK 3
161 _pick guic usr/bin/gtk4-update-icon-cache
162 _pick guic usr/share/man/man1/gtk4-update-icon-cache.1
167 package_gtk4-demos() {
168 pkgdesc+=" (demo applications)"
173 package_gtk4-docs() {
174 pkgdesc+=" (documentation)"
179 package_gtk-update-icon-cache() {
180 pkgdesc="GTK icon cache updater"
181 depends=(gdk-pixbuf2 librsvg hicolor-icon-theme)
184 ln -s gtk4-update-icon-cache "$pkgdir/usr/bin/gtk-update-icon-cache"
185 ln -s gtk4-update-icon-cache.1 "$pkgdir/usr/share/man/man1/gtk-update-icon-cache.1"
187 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-update-icon-cache.hook
188 install -D gtk-update-icon-cache.script "$pkgdir/usr/share/libalpm/scripts/gtk-update-icon-cache"
191 # vim:set sw=2 sts=-1 et: