# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
pkgname=muparser
pkgver=2.2.5
pkgrel=0
pkgdesc="Fast math parser library"
url="http://beltoforion.de/article.php?a=muparser"
arch="all"
options="!check"  # No test suite.
license="MIT"
depends=""
makedepends="cmake"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/beltoforion/$pkgname/archive/v$pkgver.tar.gz
	muparser-buildsystem.patch"

build() {
        cd "$builddir/build"

        cmake \
		-DBUILD_SHARED_LIBS=ON \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_VERBOSE_MAKEFILE=ON \
		$cmake_opts \
		../
        make
}

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

sha512sums="d89380ebdc0ce91d0ea38fe43419ab6ed06c47d352b9ee20e1edcce48337b464366153493e0241c373ba2880a8b419fb9541e56cda0d14915daf9b98136ee682  muparser-2.2.5.tar.gz
2acdf0bb2db7d11583ea4512d0422cc5ac577f074de7f0dbc28df879f821c6904a6bda5c9a68f2836459623544cb7af69a7fa664788d8cae98f83adaac3ae3a2  muparser-buildsystem.patch"