aboutsummaryrefslogtreecommitdiffstats
path: root/community/qt5-qtdeclarative/APKBUILD
blob: e45cda834397a4aaed93759f5600c18d825df9b8 (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
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=qt5-qtdeclarative
pkgver=5.15.3_git20210104
pkgrel=0
_commit="e203a185cfab199a89a33b903096d6d0023a8a88"
pkgdesc="Qt5 - QtDeclarative component"
# Broken on armhf, upstream bug report https://bugreports.qt.io/browse/QTBUG-65246
arch="all"
url="https://www.qt.io/developers/"
license="LGPL-2.1-only AND LGPL-3.0-only AND GPL-3.0-only AND Qt-GPL-exception-1.0"
makedepends="
	python3
	qt5-qtbase-dev
	vulkan-headers
	"
subpackages="$pkgname-dev $pkgname-dbg"
builddir="$srcdir/qtdeclarative-$_commit"

case $pkgver in
	*_beta*|*_rc*) _rel=development_releases;;
	*) _rel=official_releases;;
esac

source="https://invent.kde.org/qt/qt/qtdeclarative/-/archive/$_commit/qtdeclarative-$_commit.tar.gz
	qt-musl-stackbottom.patch
	"

_qt5_prefix=/usr/lib/qt5

prepare() {
	default_prepare

	# We need to make the build system think we're running in a git repository
	# so it correctly symlinks during the build
	mkdir .git
}

build() {
	# HACK so calls to "python" get what we want
	ln -s /usr/bin/python3 python
	export PATH="$(pwd):$PATH"

	qmake-qt5
	make
}

check() {
	make check
}

package() {
	make install INSTALL_ROOT="$pkgdir"

	mkdir -p "$pkgdir"/usr/bin/
	for i in "$pkgdir"/"$_qt5_prefix"/bin/*; do
		ln -s ../lib/qt5/bin/${i##*/} "$pkgdir"/usr/bin/${i##*/}-qt5
	done

	# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
	find "$pkgdir/usr/lib" -type f -name '*.prl' \
		-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
}

dev() {
	default_dev

	find "$pkgdir"/"$_qt5_prefix"/bin/ -type f -not -name "qmlscene" | while read -r f; do
		file=$(basename $f)
		amove "${_qt5_prefix#/}"/bin/$file
		amove usr/bin/$file-qt5
	done
}

sha512sums="e19285d66904246dadfd6b0742db03ce4f5f0dff33b7761d5b1da9d4adc3451f65ebb1f1ed7db8b123dd5362f832c2e439d9fd225932c8d2d48ea91c6b6a1ea1  qtdeclarative-e203a185cfab199a89a33b903096d6d0023a8a88.tar.gz
235091cc1da51c31165a99932c95543d999c0f21b2c6b4318306b647662d420f88d7270ec21db7417fe9f8d87bfa3e5f01b6465c3542da024dd1623ef0a87681  qt-musl-stackbottom.patch"