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'
92 -D broadway-backend=true
93 -D cloudproviders=enabled
100 CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
101 arch-meson gtk build "${meson_options[@]}"
102 meson compile -C build
106 export XDG_RUNTIME_DIR="$PWD/runtime-dir" WAYLAND_DISPLAY=wayland-5
108 mkdir -p -m 700 "$XDG_RUNTIME_DIR"
109 weston --backend=headless-backend.so --socket=$WAYLAND_DISPLAY --idle-time=0 &
112 trap "kill $_w; wait" EXIT
114 meson test -C build --print-errorlogs
118 local p="$1" f d; shift
120 d="$srcdir/$p/${f#$pkgdir/}"
121 mkdir -p "$(dirname "$d")"
123 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
128 depends+=(gtk-update-icon-cache)
129 optdepends=('evince: Default print preview command')
130 provides=(libgtk-4.so)
132 meson install -C build --destdir "$pkgdir"
134 install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-4.0/settings.ini" <<END
136 gtk-icon-theme-name = Adwaita
137 gtk-theme-name = Adwaita
138 gtk-font-name = Cantarell 11
141 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk4-querymodules.hook
142 install -D gtk4-querymodules.script "$pkgdir/usr/share/libalpm/scripts/gtk4-querymodules"
146 _pick demo usr/bin/gtk4-{demo,demo-application,icon-browser,node-editor,print-editor,widget-factory}
147 _pick demo usr/share/applications/org.gtk.{Demo4,IconBrowser4,PrintEditor4,WidgetFactory4,gtk4.NodeEditor}.desktop
148 _pick demo usr/share/glib-2.0/schemas/org.gtk.Demo4.gschema.xml
149 _pick demo usr/share/icons/hicolor/*/apps/org.gtk.{Demo4,IconBrowser4,PrintEditor4,WidgetFactory4,gtk4.NodeEditor}[-.]*
150 _pick demo usr/share/man/man1/gtk4-{demo,demo-application,icon-browser,node-editor,widget-factory}.1
151 _pick demo usr/share/metainfo/org.gtk.{Demo4,IconBrowser4,PrintEditor4,WidgetFactory4,gtk4.NodeEditor}.appdata.xml
153 _pick docs usr/share/doc
155 # Built by GTK 4, shared with GTK 3
156 _pick guic usr/bin/gtk4-update-icon-cache
157 _pick guic usr/share/man/man1/gtk4-update-icon-cache.1
162 package_gtk4-demos() {
163 pkgdesc+=" (demo applications)"
168 package_gtk4-docs() {
169 pkgdesc+=" (documentation)"
174 package_gtk-update-icon-cache() {
175 pkgdesc="GTK icon cache updater"
176 depends=(gdk-pixbuf2 librsvg hicolor-icon-theme)
179 ln -s gtk4-update-icon-cache "$pkgdir/usr/bin/gtk-update-icon-cache"
180 ln -s gtk4-update-icon-cache.1 "$pkgdir/usr/share/man/man1/gtk-update-icon-cache.1"
182 install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-update-icon-cache.hook
183 install -D gtk-update-icon-cache.script "$pkgdir/usr/share/libalpm/scripts/gtk-update-icon-cache"
186 # vim:set sw=2 sts=-1 et: