# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
pkgname=cpd
pkgver=0.5.1
pkgrel=0
pkgdesc="C++ implementation of the Coherent Point Drift point set registration algorithm."
url="https://github.com/gadomski/cpd"
arch="all"
license="GPL-2.0-or-later"
makedepends="cmake eigen-dev fgt-dev"
install=""
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/gadomski/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
        cd "$builddir"

        mkdir build && cd build
        cmake .. \
                -DCMAKE_INSTALL_PREFIX=/usr \
                -DCMAKE_BUILD_TYPE=Release \
                -DWITH_TESTS=OFF \
                -DBUILD_SHARED_LIBS=ON \
                -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3
        make
}

package() {
        cd "$builddir"/build
        make DESTDIR="$pkgdir" install
}

sha512sums="ec9725e82f3a28aa1d5b3b5c01cd5875fbb1096cb78bf40d5ee7c7d38efbb066faa3a9081621a5dffe299b984ec502119a4d79c67fc8ef83939c269188b7b2a2  cpd-0.5.1.tar.gz"
