# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Samuel Fernando Mesa <samuelmesa dot linuxmail.org>

pkgname=librttopo
pkgver=1.1.0
pkgrel=6
pkgdesc="RT Topology Library"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://git.osgeo.org/gitea/rttopo/librttopo"
license=(GPL2)
depends=(geos)
source=(https://git.osgeo.org/gitea/rttopo/$pkgname/archive/$pkgname-$pkgver.tar.gz
        postgis-15444-security-fix.patch)
sha256sums=('2e2fcabb48193a712a6c76ac9a9be2a53f82e32f91a2bc834d9f1b4fa9cd879f'
            '759e5137b49b01af7ccb4d40dcc673a004c6b1461b74d624be18787a960863fb')

prepare() {
  cd $pkgname
  patch -p1 < ../postgis-15444-security-fix.patch
  ./autogen.sh
}

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

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