# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Brian Galey <bkgaley at gmail dot com>
# Contributor: Pietro Zambelli <peter.zamb at gmail dot com>

pkgname=libspatialite
pkgver=5.1.0
pkgrel=2
pkgdesc="SQLite extension to support spatial data types and operations"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://www.gaia-gis.it/fossil/libspatialite"
license=(MPL GPL LGPL)
depends=(geos libfreexl librttopo libxml2 minizip proj sqlite)
source=(https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-$pkgver.tar.gz)
sha256sums=('43be2dd349daffe016dd1400c5d11285828c22fea35ca5109f21f3ed50605080')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --build=${CHOST}
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
