aboutsummaryrefslogtreecommitdiffstats
path: root/community/maplibre-gl-native/APKBUILD
blob: 0b02f1ee930ed9f7ff5236842cec3639014bf048 (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
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=maplibre-gl-native
pkgver=1.6.0_git20220315
pkgrel=3
_commit="59fa32e96a8e24d439afc1bcba503e87852a4644"
pkgdesc="Open-source alternative to Mapbox GL Native"
url="https://maplibre.org/"
arch="all"
license="BSD-2-Clause"
makedepends="
	cmake
	icu-dev
	qt5-qtbase-dev
	rapidjson-dev
	samurai
	"
source="https://dev.alpinelinux.org/archive/maplibre-gl-native/maplibre-gl-native-$pkgver.tar.gz
	eternal.patch.noauto
	"
options="!check" # No tests
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname"

provides="mapbox-gl-native=$pkgver-r$pkgrel"
replaces="mapbox-gl-native"

_disturl="dev.alpinelinux.org:/archive/$pkgname/"

snapshot() {
	clean
	deps
	mkdir -p "$srcdir" && cd "$srcdir"
	git clone https://github.com/maplibre/maplibre-gl-native -b $_commit --recursive
	tar czvf $SRCDEST/$pkgname-$pkgver.tar.gz maplibre-gl-native
	rsync --progress -La $SRCDEST/$pkgname-$pkgver.tar.gz $_disturl
}

prepare() {
	default_prepare

	patch -Np1 -d vendor/eternal < "$srcdir"/eternal.patch.noauto

	# We prefer to build with our system version
	rm -r vendor/mapbox-base/extras/rapidjson
}

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=TRUE \
		-DMBGL_WITH_WERROR=OFF \
		-DMBGL_WITH_QT=ON \
		-DMBGL_WITH_QT_LIB_ONLY=ON \
		-DMBGL_WITH_QT_HEADLESS=OFF
	cmake --build build
}

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

sha512sums="
fa69b83aefbebd85b2eb2cc859fad521c819fc4a4bda7583b89af69fd530b0aa5ec1b0a154745bffe98daaa3ccb0fc68e69d8d55ea539c142b4229ff32b02289  maplibre-gl-native-1.6.0_git20220315.tar.gz
ecf926e9707ab9c6fa5864cb1066b901da39344f10cae3c5c9fb152fb049453d01a3f96bf2c28121b53dcd038b9dd1dd6dc419865ef74c7c0d0e26c9aef249a5  eternal.patch.noauto
"