# Maintainer: Jesus E. _pkgbase=gtk+ pkgbase=gtk pkgname=(gtk gtk-update-icon-cache) pkgver=3.24.24 _debver=$pkgver _debrel=4 pkgrel=6 pkgdesc="GObject-based multi-platform GUI toolkit" arch=('i686' 'x86_64') license=('LGPL-2') url='https://www.gtk.org/' depends=('atk' 'cairo' 'libxcursor' 'libxinerama' 'libxrandr' 'libxi' 'libepoxy' 'gdk-pixbuf2' 'libxcomposite' 'libxdamage' 'pango' 'shared-mime-info' 'libxkbcommon' 'arc-icon-theme' 'xcursor-premium' 'json-glib' 'librsvg-legacy' 'desktop-file-utils' 'mesa' 'cantarell-fonts' 'libcups' 'fribidi' 'iso-codes') makedepends=('gobject-introspection' 'sassc' 'meson' 'docbook-xsl' 'quilt') source=("https://download.gnome.org/sources/$_pkgbase/${pkgver:0:4}/${_pkgbase}-${pkgver}.tar.xz" "https://deb.debian.org/debian/pool/main/g/gtk+3.0/gtk+3.0_${_debver}-${_debrel}+deb11u4.debian.tar.xz" "settings.ini" "gtk-query-immodules-3.0.hook" "gtk-update-icon-cache.hook" "gtk-update-icon-cache.script" "optionalize-at-spi2-atk-dependency.patch") sha512sums=('f4e22d7c78d7c641ac7c3beeb3181000b72b025c65074bab6bd51b9a86ec4f6a2e25f06ad7671a908be421c064f4c26e2185febb424f310a2530561aebde8520' '35c7e94ff0e7951aae09c2f27a5e562428cb41477bfe6334efb135eecd1ed58797c46e65510955a51f4850b438cbd8e9769007a19e806d6bd9206abcf0df8fe2' '1070d7f42cee3517f356ef57d0b1e1d8ca0af00ac8e86ca35a7109e5d0d8845d2f04e3ec81453e00aa4a4b0e9915d010bf7d9014ec44ef9bebe362c4e497704d' 'f0ffd95544863f2e10fda81488b4727aa9a8a35a7d39fb96872db6664d03442db2b58af788b5990825c7b3a83681f7220ca481409cca5421dfb39b9a3bbac9ac' 'abfd73de4faa6f53784182800395aa3c39bb98e15a0eb300fb4142073ff7ce565a0836a2363393b2f132060b5293dbc0c30c380a023f38d5bd39c62cb58389c2' '5cd50d93bb6bc203438a2a0764bd717409658e124058b18a1da26a21f10ef7564a16f32fc0633a68b45b2e303fa63a5efefeadd6b0bf1d7f474556df8cdb6c58' '9a1dccd0764fafa2a29edd317301b46eb1771d2e4b02c7b259ce6129944284ba30209dff8dd842b6be0d08f3af322cec49d3b821c3eaa96c15684b41e32a6a6c') prepare() { cd $_pkgbase-$pkgver if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . quilt push -av fi # optionalize at-spi2-atk dependency # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194460 # https://svnweb.freebsd.org/ports?view=revision&revision=538187 patch -p1 -i $srcdir/optionalize-at-spi2-atk-dependency.patch } build() { CFLAGS+=" -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS" hyperbola-meson $_pkgbase-$pkgver build \ -D wayland_backend=false \ -D broadway_backend=true \ -D colord=no \ -D gtk_doc=false \ -D man=true \ -D tests=false \ -D atk-bridge=false ninja -C build } package_gtk() { depends+=(gtk-update-icon-cache) replaces=('gtk3') conflicts=('gtk3') provides=('gtk3') install=gtk.install DESTDIR="$pkgdir" meson install -C build install -Dm644 settings.ini "$pkgdir/usr/share/gtk-3.0/settings.ini" install -Dm644 gtk-query-immodules-3.0.hook "$pkgdir/usr/share/libalpm/hooks/gtk-query-immodules-3.0.hook" # split this out to use with gtk2 too mv "$pkgdir/usr/bin/gtk-update-icon-cache" "$srcdir" install -Dm644 $_pkgbase-$pkgver/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" } package_gtk-update-icon-cache() { pkgdesc="GTK+ icon cache updater" depends=(gdk-pixbuf2 librsvg-legacy hicolor-icon-theme) cd $_pkgbase-$pkgver install -D ../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 -D ../gtk-update-icon-cache.script "$pkgdir/usr/share/libalpm/scripts/gtk-update-icon-cache" install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" }