# Maintainer: Christian Hesse <mail@eworm.de>
pkgname=lib2geom
pkgver=1.3
pkgrel=1
pkgdesc='Easy to use 2D geometry library in C++'
arch=('x86_64' 'armv7h')
url='https://gitlab.com/inkscape/lib2geom'
license=('GPL')
depends=('glib2' 'gsl' 'double-conversion' 'cairo' 'ragel')
makedepends=('cmake' 'boost' 'gtest')
source=("https://gitlab.com/inkscape/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.bz2")
sha256sums=('bd07f2a1322fcad16a55a1901207faa55dffdecebc56a00eabd4575f62e043c9')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
# "9 - elliptical-arc-test (Failed)"
[[ $CARCH == "armv7h" ]] && CFLAGS=`echo $CFLAGS | sed -e 's/neon-vfpv4/neon/'` && CXXFLAGS="$CFLAGS"
mkdir -p build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-D2GEOM_BOOST_PYTHON=NO \
-D2GEOM_BUILD_SHARED=YES \
-DCMAKE_BUILD_TYPE=Release
make
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}/build/"
make test
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}/build/"
make DESTDIR="${pkgdir}/" install
}