# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=process-cpp
pkgver=2.0.1
pkgrel=0
_commit="2923b597f6fc5b49133be8c4f2ba3cbaacdb9540"
pkgdesc="C++11 library for handling processes"
url="https://launchpad.net/process-cpp"
arch="x86_64"
license="LGPL3"
depends="boost properties-cpp"
makedepends="boost-dev cmake cmake-extras doxygen properties-cpp-dev libexecinfo-dev musl-dev"
checkdepends="gtest-dev gmock"
install=""
subpackages="$pkgname-dev"
source="https://github.com/lib-cpp/process-cpp/archive/$_commit.tar.gz
	0001-Musl-libc-fixes.patch" # https://github.com/lib-cpp/process-cpp/pull/1
builddir="$srcdir/$pkgname-$_commit"

build() {
	mkdir "$builddir"/build
	cd "$builddir"/build
	cmake .. \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DPROCESS_CPP_ENABLE_DOC_GENERATION=no
	make
}

check() {
	cd "$builddir"/build
	make test
}

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

sha512sums="8787f9bbfb157c30c2a6ff072735344104f609ebae3385b41539fa7b24aa45eff5465ae8edf0479030ef7061256e7f1f7354621b172fa6ba196d59d275f2fad6  2923b597f6fc5b49133be8c4f2ba3cbaacdb9540.tar.gz
97b2a54e52b8f6a1839cfcdc6fb401768d731bacbe6bc920b511777e72806d844cded9ad9222b570e46cdbf692def363128c4cb4e2e291fcd4f66c081ad0c5cd  0001-Musl-libc-fixes.patch"
