aboutsummaryrefslogtreecommitdiffstats
path: root/testing/valhalla/APKBUILD
blob: 7d207cf033121e30f37ce94588f626536f0a5546 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=valhalla
pkgver=3.1.0_git20210304
pkgrel=1
pkgdesc="Open Source Routing Engine for OpenStreetMap "
url="https://valhalla.readthedocs.io/"
# s390x blocked by prime_server
# mips64 blocked by libspatialite
arch="all !s390x !mips64"
license="MIT"
depends_dev="
	boost-dev
	curl-dev
	libspatialite-dev
	luajit-dev
	prime_server-dev
	protobuf-dev
	python3-dev
	sqlite-dev
	zeromq-dev
	zlib-dev
	"
makedepends="$depends_dev
	cmake
	"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/pmsourcedump/tarballs/raw/master/valhalla-vendored-$pkgver.tar.gz
	0001-guard-linking-tests-against-geos.patch
	0002-libvalhalla-configuring.patch
	0003-disable-werror.patch
	"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=TRUE \
		-DENABLE_WERROR=OFF \
		-DENABLE_TOOLS=OFF \
		-DENABLE_DATA_TOOLS=OFF \
		-DENABLE_SERVICES=OFF \
		-DENABLE_HTTP=ON \
		-DENABLE_PYTHON_BINDINGS=OFF \
		-DENABLE_CCACHE=OFF \
		-DENABLE_COVERAGE=OFF \
		-DENABLE_COMPILER_WARNINGS=ON \
		-DENABLE_SANITIZERS=OFF \
		-DENABLE_ADDRESS_SANITIZER=OFF \
		-DENABLE_UNDEFINED_SANITIZER=OFF \
		-DENABLE_TESTS=ON \
		-DENABLE_WERROR=OFF \
		-DENABLE_BENCHMARKS=OFF \
		-DENABLE_THREAD_SAFE_TILE_REF_COUNT=OFF
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

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

	# We don't need gtest related files, those are already available from
	# the gtest package
	rm -r \
		"$pkgdir"/usr/lib/pkgconfig/gmock.pc \
		"$pkgdir"/usr/lib/pkgconfig/gmock_main.pc \
		"$pkgdir"/usr/lib/pkgconfig/gtest.pc \
		"$pkgdir"/usr/lib/pkgconfig/gtest_main.pc \
		"$pkgdir"/usr/lib/cmake \
		"$pkgdir"/usr/lib/libgmock.so \
		"$pkgdir"/usr/lib/libgmock_main.so \
		"$pkgdir"/usr/lib/libgtest.so \
		"$pkgdir"/usr/lib/libgtest_main.so \
		"$pkgdir"/usr/include/gmock \
		"$pkgdir"/usr/include/gtest
}

sha512sums="2c6fad21c65e995f09b25b762337e942c5e42e25e80e96f2869ce90ebcf09c11a599b6ee066243b4948d79a592d1c3dec9f6716507a8cd67717ad23ce4923f12  valhalla-vendored-3.1.0_git20210304.tar.gz
90f0a5e0c505c96212ae05f7e9f114b443800c00e3af35e027f3fdfce8e5c6cf6cc801efcacef724ee6b0f4d554f86a676dffc8ca113c861651aeab1912ce582  0001-guard-linking-tests-against-geos.patch
22fd1bcbfef2540751a0e19fcb41e4699fa8d951e958bd3895785247ca414000037c3585eab59fe93557298244746cd0028d12f374c5dc51d7e377e1d9250ad8  0002-libvalhalla-configuring.patch
416a5e1fbddd861d091e4c9dde6df082090a341116a58fb43d056e29d82a3c78c7409d5cf4631484077476b4857bd69e23898af28061dbff8e3b1f16034afb6a  0003-disable-werror.patch"