aboutsummaryrefslogtreecommitdiffstats
path: root/community/qt6-qtbase/APKBUILD
blob: 4668444082044371775acc1a0a8c3442f5d4da48 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=qt6-qtbase
pkgver=6.1.2
pkgrel=2
pkgdesc="A cross-platform application and UI framework"
url="https://qt.io/"
arch="all"
license="LGPL-2.1-only AND LGPL-3.0-only AND GPL-3.0-only AND Qt-GPL-exception-1.0"
_sub="
	$pkgname-mysql
	$pkgname-odbc
	$pkgname-postgresql
	$pkgname-sqlite
	$pkgname-x11
	"
depends="xdg-utils"
# TODO: Add vulkan-loader-dev, right now it's linked wrongly
depends_dev="$_sub
	cups-dev
	dbus-dev
	double-conversion-dev
	eudev-dev
	fontconfig-dev
	freetype-dev
	glib-dev
	gtk+3.0-dev
	harfbuzz-dev
	icu-dev
	libb2-dev
	libinput-dev
	libjpeg-turbo-dev
	libpng-dev
	libproxy-dev
	libxkbcommon-dev
	mariadb-dev
	mesa-dev
	openssl-dev
	pcre2-dev
	postgresql-dev
	sqlite-dev
	tslib-dev
	unixodbc-dev
	vulkan-headers
	vulkan-loader-dev
	wayland-dev
	xcb-util-dev
	xcb-util-image-dev
	xcb-util-keysyms-dev
	xcb-util-renderutil-dev
	xcb-util-wm-dev
	zlib-dev
	"
makedepends="$depends_dev
	cmake
	perl
	samurai
	xmlstarlet
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg $_sub"
builddir="$srcdir/qtbase-everywhere-src-${pkgver/_/-}"

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

source="https://download.qt.io/$_rel/qt/${pkgver%.*}/${pkgver/_/-}/submodules/qtbase-everywhere-src-${pkgver/_/-}.tar.xz"

case "$CTARGET_ARCH" in
	arm*|aarch64) _opengl="-DQT_FEATURE_opengles2=ON" ;;
esac

[ "$CARCH" = "riscv64" ] && options="$options textrels"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DINSTALL_BINDIR=lib/qt6/bin \
		-DINSTALL_DOCDIR=share/doc/qt6 \
		-DINSTALL_ARCHDATADIR=lib/qt6 \
		-DINSTALL_DATADIR=share/qt6 \
		-DINSTALL_INCLUDEDIR=include/qt6 \
		-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
		-DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
		-DQT_FEATURE_journald=OFF \
		-DQT_FEATURE_openssl_linked=ON \
		-DQT_FEATURE_vulkan=ON \
		$_opengl
	cmake --build build --parallel
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

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

sqlite() {
	pkgdesc="SQLite driver for Qt6's SQL classes"
	cd "$pkgdir"
	amove usr/lib/qt6/plugins/sqldrivers/libqsqlite*
}

odbc() {
	pkgdesc="ODBC driver for Qt6's SQL classes"
	cd "$pkgdir"
	amove usr/lib/qt6/plugins/sqldrivers/libqsqlodbc*
}

postgresql() {
	pkgdesc="PostgreSQL driver for Qt6's SQL classes"
	cd "$pkgdir"
	amove usr/lib/qt6/plugins/sqldrivers/libqsqlpsql*
}

mysql() {
	pkgdesc="MySQL driver for Qt6's SQL classes"
	cd "$pkgdir"
	amove usr/lib/qt6/plugins/sqldrivers/libqsqlmysql*
}

x11() {
	pkgdesc="Qt6 GUI-related libraries"
	depends="hicolor-icon-theme"
	cd "$pkgdir"
	amove \
		usr/lib/libQt6EglFSDeviceIntegration.so.* \
		usr/lib/libQt6EglFsKmsSupport.so.* \
		usr/lib/libQt6Gui.so.* \
		usr/lib/libQt6OpenGL.so.* \
		usr/lib/libQt6PrintSupport.so.* \
		usr/lib/libQt6Widgets.so.* \
		usr/lib/qt6/plugins/egldeviceintegrations \
		usr/lib/qt6/plugins/generic \
		usr/lib/qt6/plugins/image* \
		usr/lib/qt6/plugins/platform* \
		usr/lib/qt6/plugins/printsupport*
}

sha512sums="
0f9bf5680268c6dc95c10c28297908c9113a7e3e498ba80ed3ba73cc98b809b38fa610ee3b15f367b6ace2f593842db8d27dc7ec2142737574cfa32cdf57ea91  qtbase-everywhere-src-6.1.2.tar.xz
"