aboutsummaryrefslogtreecommitdiffstats
path: root/community/tl-expected/APKBUILD
blob: ab4f536e4ad776b3a5236de8bc31e6c52a4cf5c1 (plain)
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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=tl-expected
pkgver=1.0.0
pkgrel=1
pkgdesc="C++11/14/17 std::expected with functional-style extensions"
options="!check"
url="https://github.com/TartanLlama/expected"
arch="noarch"
license="CC0-1.0"
makedepends="cmake"
source="$pkgname-$pkgver.tar.gz::https://github.com/TartanLlama/expected/archive/v$pkgver.tar.gz"
builddir="$srcdir/expected-$pkgver"

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

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="747ea34b5540dfcf595896332851f10c52a823ab8ba3fc8152478b0a9e8ca01f0f26827348407249827f4106ff577bd6e697ea6f749c1f21bd1f0913a621075d  tl-expected-1.0.0.tar.gz"