# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=potrace
pkgver=1.16
pkgrel=2
pkgdesc="Utility for tracing a bitmaps"
url="https://potrace.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later"
depends_dev="zlib-dev"
makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://potrace.sourceforge.net/download/$pkgver/$pkgname-$pkgver.tar.gz"

prepare(){
        default_prepare
        update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--with-libpotrace
	make
}

check() {
	make check
}

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

sha512sums="10d85ed3fada80951223c65e923b5e6ee3e76e071575971d5b09b996b477ec5ff2403e0337c44963c6b441cc3ba6c4f7009541124a25c16b7721fdebd1f774b9  potrace-1.16.tar.gz"
