# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>

pkgname=libpano13
pkgver=2.9.20
pkgrel=1
pkgdesc="Basic library to calculate panoramical pictures - core functions of the panotools"
arch=(x86_64)
url="http://panotools.sourceforge.net/"
license=(GPL2)
depends=(libpng libtiff)
source=(https://downloads.sourceforge.net/sourceforge/panotools/${pkgname}-${pkgver}.tar.gz)
sha256sums=(3b532836c37b8cd75cd2227fd9207f7aca3fdcbbd1cce3b9749f056a10229b89)

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

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --mandir=/usr/share/man
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

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