# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Brian Galey <bkgaley at gmail dot com>
# Contributor: Pietro Zambelli <peter.zamb at gmail dot com>

pkgname=libspatialite
pkgver=4.3.0.a
pkgrel=5
pkgdesc="SQLite extension to support spatial data types and operations"
arch=('x86_64')
url="https://www.gaia-gis.it/fossil/libspatialite"
license=('MPL' 'GPL' 'LGPL')
depends=('geos' 'libfreexl' 'libxml2' 'proj' 'sqlite')
source=(https://www.gaia-gis.it/gaia-sins/$pkgname-4.3.0a.tar.gz)
sha256sums=('88900030a4762904a7880273f292e5e8ca6b15b7c6c3fb88ffa9e67ee8a5a499')

build() {
  cd "${srcdir}"/$pkgname-4.3.0a

  ./configure --prefix=/usr --enable-libxml2 CFLAGS="$CFLAGS -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"
  make
}

package() {
  cd "${srcdir}"/$pkgname-4.3.0a

  make DESTDIR="${pkgdir}" install
}
