# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=adwaita-icon-theme-legacy
pkgver=46.2
pkgrel=3
pkgdesc="GNOME fallback icons for legacy apps"
url="https://gitlab.gnome.org/GNOME/adwaita-icon-theme-legacy"
arch=(any)
license=("CC-BY-SA-3.0 OR LGPL-3.0-only")
depends=(hicolor-icon-theme)
makedepends=(
  git
  gtk-update-icon-cache
  meson
)
source=("git+https://gitlab.gnome.org/GNOME/adwaita-icon-theme-legacy.git#tag=${pkgver/[a-z]/.&}"
        adwaita-icon-theme-legacy-unique-license-directory.patch)
b2sums=('0b36191ec591db2cd6d2d1943a0139cc95e7ac7ba2ad1828a8d104544d264d58eaac9acf8c1c6c6cc4a648bd302711d8aba7ea33b3eee9bf3e3d5a0751782b25'
        'da4a2fe70e29be583f2d8c23772059c94f90ad71509f459b1c8b37ec69d870cfd2e4cfb792dc3302506a496d8a140f61f073a09ed3200702200d51241fd7d65d')

prepare() {
  cd $pkgname

  # Add missing icons needed by GNOME Flashback
  # https://gitlab.gnome.org/GNOME/adwaita-icon-theme-legacy/-/merge_requests/2
  git cherry-pick -n 2b2eb1bbf215e73f3e6f1be79ee679b17dc43eb3

  # Use a unique licenses directory
  # https://gitlab.gnome.org/GNOME/adwaita-icon-theme-legacy/-/merge_requests/1
  git apply -3 ../adwaita-icon-theme-legacy-unique-license-directory.patch
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
