APP=gtk3
VERSION=3.24.13
BUILD=1sml
HOMEPAGE="https://gtk.org"
DOWNLOAD="https://gitlab.gnome.org/GNOME/gtk/-/archive/3.24.13/gtk-3.24.13.tar.bz2"
DESC="GObject-based multi-platform GUI toolkit"
REQUIRES="fribidi iso-codes wayland libxkbcommon libepoxy shared-mime-info cairo gobject-introspection atk pango gdk-pixbuf librsvg at-spi2-atk "

build() {
  mkandenterbuilddir
  rm -rf "gtk+-$VERSION"

  tar xf $SRCDIR/gtk+-$VERSION.tar.?z
  cd "gtk+-$VERSION"
  fixbuilddirpermissions

  mkdir -p smbuild && cd smbuild
  meson .. \
    --prefix="/" \
    -Dgtk_doc=false \
    -Dman=false \
    -Dbroadway_backend=true

  ninja
  DESTDIR="$PKG" ninja install

  cp ../COPYING $PKGDOCS/

  # Install basic startup file
  echo 'gtk-theme-name="Adwaita"' > $PKG/etc/gtk-3.0/gtkrc.new

  # Don't clobber im-multipress.conf
  mv $PKG/etc/gtk-3.0/im-multipress.conf $PKG/etc/gtk-3.0/im-multipress.conf.new

  mkfinalpkg
}

SHA512SUMS="
739ea8c764d3afc52417cadc9b2f69965441325cd001694fedf63de9a4a80b90e6f2b82ea6a3b6255b6c4f842652cd6090f8896b724bd6d4b4d808870968be93  gtk+-3.24.13.tar.lz
"
