# Maintainer (arch): Fabian Bornschein <fabiscafe-at-mailbox-dot-org>
# Maintainer (arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Maintainer: Andreas Grapentin <andreas@grapentin.org>
# Contributor: André Silva <emulatorman@hyperbola.info>


# parabola changes and rationale:
# privacy:
#   - removed geoclue support
# technical:
#   - build from versioned source-ball, rather than VCS sources


pkgname=gnome-weather
pkgver=45.0
pkgrel=1
pkgrel+=.nonprism1
pkgdesc="Access current weather conditions and forecasts"
pkgdesc+=", without geoclue support"
url="https://wiki.gnome.org/Apps/Weather"
arch=(any)
license=(GPL)
depends=(
  geoclue
  gjs
  gtk4
  libadwaita
  libgweather-4
)
depends=( ${depends[*]/geoclue/} ) # privacy
makedepends=(
  appstream-glib
  git
  gobject-introspection
  meson
)
makedepends=( ${makedepends[*]/git/} )
groups=(gnome)
source=(https://download.gnome.org/sources/gnome-weather/45/gnome-weather-45.0.tar.xz)
source+=(nonprism.patch)
sha256sums=('30c0029702883dc8d8160e6de1d6116877cd6c25bc950d4e4902a6ab467b2fa4')
sha256sums+=('226c05dfc345ab4d8ed6b21686d10799a98e65a7050602d944d70208d718d19a')


prepare() {
  cd ${pkgname}-${pkgver}

  echo "applying nonprism.patch"
  patch -p1 -i ${srcdir}/nonprism.patch
}

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

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

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

