aboutsummaryrefslogtreecommitdiffstats
path: root/testing/spdlog/APKBUILD
blob: c81595be140cf878902ce8533566f6b650041fed (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
39
40
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=spdlog
pkgver=1.3.1
pkgrel=0
pkgdesc="Fast C++ logging library"
options="!check" # Unable to run tests
url="https://github.com/gabime/spdlog"
arch="all"
license="MIT"
makedepends="cmake"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/gabime/$pkgname/archive/v$pkgver.tar.gz"

build() {
	mkdir build
	cd 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=RelWithDebInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DSPDLOG_BUILD_EXAMPLES=OFF \
		-DSPDLOG_BUILD_BENCH=OFF \
		-DSPDLOG_BUILD_TESTS=OFF \
		-DSPDLOG_SANITIZE_ADDRESS=OFF \
		-DSPDLOG_FMT_EXTERNAL=OFF \
		${CMAKE_CROSSOPTS} ..
	make
}

package() {
	mkdir -p "$pkgdir"
	make -C build DESTDIR="$pkgdir" install
}
sha512sums="a851a44b6384f493dd312ae0a611d068af46bbfe8daf1c2f61f13d8836a3801f41b339074fbe8da8e428131c82fa5c4a9e3320a55cbdd4b7aff8bb349dfff7dd  spdlog-1.3.1.tar.gz"