pkgbase=gtk3 pkgname=('gtk3' 'gtk-update-icon-cache') pkgver=3.24.41 _pkgver=3.24 pkgrel=2 arch=('x86_64') url="https://www.gtk.org/" makedepends=('gobject-introspection' 'cairo' 'libcups' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage' 'pango' 'shared-mime-info' 'gdk-pixbuf2' 'colord' 'at-spi2-core' 'libepoxy' 'libxkbcommon' 'librsvg' 'wayland' 'wayland-protocols' 'iso-codes' 'sassc' 'meson' 'ninja' 'python3-packaging') options=('!libtool' '!docs') license=('LGPL') source=("https://ftp.gnome.org/pub/gnome/sources/gtk+/${_pkgver}/gtk+-${pkgver}.tar.xz" 'gtk-update-icon-cache.hook' 'gtk-update-icon-cache.script' 'gcc11.diff') sha256sums=('47da61487af3087a94bc49296fd025ca0bc02f96ef06c556e7c8988bd651b6fa' '2d435e3bec8b79b533f00f6d04decb1d7c299c6e89b5b175f20be0459f003fe8' 'bbe06e1b4e1ad5d61a4e703445a2bb93c6be918964d6dd76c0420c6667fa11eb' 'f62d5e7f7ae9694021ba87e232dbcd3ba402987132708baff282b34c508c1b53') prepare() { cd gtk+-${pkgver} #patch -p1 -i ${srcdir}/gcc11.diff } build() { mkdir -p build cd build meson setup ../gtk+-${pkgver} \ --prefix=/usr \ --buildtype=release \ --sysconfdir=/etc \ --localstatedir=/var \ -Dgtk_doc=false \ -Dintrospection=true \ -Ddemos=false \ -Dexamples=false \ -Dtests=false \ -Dinstalled_tests=false ninja } package_gtk3() { pkgdesc="The GTK+ Toolkit (v3)" depends=('cairo' 'libcups' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libxcomposite' 'libxdamage' 'pango' 'shared-mime-info' 'colord' 'at-spi2-core' 'libepoxy' 'libxkbcommon' 'wayland' 'wayland-protocols' 'iso-codes' 'gtk-update-icon-cache') install="gtk3.install" cd build DESTDIR=${pkgdir} ninja install # avoid gtk2 conflict, used for both gtk2 & 3 this way rm $pkgdir/usr/bin/gtk-update-icon-cache } package_gtk-update-icon-cache() { pkgdesc="The GTK+ update icon cache tool" depends=('gdk-pixbuf2') cd build/gtk install -Dm755 gtk-update-icon-cache ${pkgdir}/usr/bin/gtk-update-icon-cache install -Dm644 ../../gtk-update-icon-cache.hook ${pkgdir}/usr/share/libalpm/hooks/gtk-update-icon-cache.hook install -Dm755 ../../gtk-update-icon-cache.script ${pkgdir}/usr/share/libalpm/scripts/gtk-update-icon-cache }