# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer:
pkgname=planarity
pkgver=3.0.2.0
pkgrel=2
pkgdesc="Library for the edge addition planar graph embedding algorithm and related algorithms"
url="https://github.com/graph-algorithms/edge-addition-planarity-suite"
arch="all"
license="BSD-3-Clause"
makedepends="autoconf automake libtool"
source="https://github.com/graph-algorithms/edge-addition-planarity-suite/archive/Version_$pkgver/planarity-$pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-libs $pkgname-doc"
builddir="$srcdir/edge-addition-planarity-suite-Version_$pkgver"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	export CFLAGS="${CFLAGS/-Os/-O3}" # gotta go fast

	./configure \
		--target="$CTARGET" \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr \
		--disable-static
	make
}

check() {
	make check
}

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

sha512sums="
26d003196b5300d49b126fe159f4ed219ee3cb3396ad939ceacaa53bcfa5049ea891f3e7f323e810fe43a20aeaa68fefbe43828e9e75b10792f4cf8bbf9594f3  planarity-3.0.2.0.tar.gz
"
