aboutsummaryrefslogtreecommitdiffstats
path: root/testing/process-cpp/APKBUILD
blob: 46fb170fe884070ac1c813e0acb3d895acb65f91 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=process-cpp
pkgver=3.0.1
pkgrel=1
pkgdesc="A simple convenience library for handling processes in C++11"
url="https://gitlab.com/ubports/core/lib-cpp/process-cpp"
arch="all"
license="LGPL-3.0-only"
depends_dev="properties-cpp-dev"
makedepends="$depends_dev cmake cmake-extras boost-dev libexecinfo-dev gtest-dev"
subpackages="$pkgname-dev"
source="https://gitlab.com/ubports/core/lib-cpp/process-cpp/-/archive/$pkgver/process-cpp-$pkgver.tar.gz
	0001-Musl-libc-fixes.patch"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "linux_process_test"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="4a96d57ea211a264f088c3bebd42a8a5603ed6652d7731ff9b05190c2c71b4e4c9e65164475530fbe5cf6a77f6441cf92b00680ea61b9274a91921bb76c11e88  process-cpp-3.0.1.tar.gz
97b2a54e52b8f6a1839cfcdc6fb401768d731bacbe6bc920b511777e72806d844cded9ad9222b570e46cdbf692def363128c4cb4e2e291fcd4f66c081ad0c5cd  0001-Musl-libc-fixes.patch"