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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
|
#
# Copyright (C) 2026 OpenWrt
# Author: Mirko Vogt <mirko-openwrt@nanl.de>
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# some parts of the journey documented here:
# https://bugreports.qt.io/browse/QTBUG-136244
# https://bugreports.qt.io/browse/QTBUG-136582
# https://bugreports.qt.io/browse/QTBUG-136446
include $(TOPDIR)/rules.mk
PKG_NAME:=qt6base
PKG_RELEASE:=1
PKG_HASH:=c5a1a2f660356ec081febfa782998ae5ddbc5925117e64f50e4be9cd45b8dc6e
PKG_MAINTAINER:=Mirko Vogt <mirko-openwrt@nanl.de>
PKG_LICENSE:=LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# Qt's own licenses, followed by those of the bundled third-party code
# compiled into the target packages with the options below
PKG_LICENSE_FILES:= \
LICENSES/LicenseRef-Qt-Commercial.txt \
LICENSES/LGPL-3.0-only.txt \
LICENSES/GPL-2.0-only.txt \
LICENSES/GPL-3.0-only.txt \
LICENSES/Apache-2.0.txt \
LICENSES/BSD-2-Clause.txt \
LICENSES/BSD-3-Clause.txt \
LICENSES/BSD-4-Clause.txt \
LICENSES/CC0-1.0.txt \
LICENSES/FTL.txt \
LICENSES/HPND.txt \
LICENSES/Imlib2.txt \
LICENSES/LicenseRef-ICC-License.txt \
LICENSES/LicenseRef-SHA1-Public-Domain.txt \
LICENSES/Linux-syscall-note.txt \
LICENSES/MIT.txt \
LICENSES/MPL-2.0.txt \
LICENSES/Unicode-3.0.txt \
LICENSES/X11.txt
QT_MODULE:=qtbase
include ../common.mk
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include ../cmake.mk
PKG_CONFIG_DEPENDS:= \
CONFIG_BUILD_qt6base-core_ICU \
CONFIG_BUILD_qt6base-core_INOTIFY \
CONFIG_BUILD_qt6base-gui_DRM \
CONFIG_BUILD_qt6base-gui_OPENGL_NONE \
CONFIG_BUILD_qt6base-gui_OPENGL_OPENGLES2 \
CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_EGLFS \
CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_LINUXFB \
CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_VNC \
CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_OFFSCREEN \
CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_MINIMAL \
CONFIG_BUILD_qt6base-gui_UDEV \
CONFIG_BUILD_qt6base-network_SSL \
CONFIG_PACKAGE_qt6base-gui \
CONFIG_PACKAGE_qt6base-widgets \
CONFIG_PACKAGE_qt6base-plugin-platforms-linuxfb \
CONFIG_PACKAGE_qt6base-plugin-platforms-vnc \
CONFIG_PACKAGE_qt6base-plugin-imageformats-gif
HOST_BUILD_DEPENDS:=pcre2/host libdouble-conversion/host
# Forced features fail configure if their library is not staged:
# FEATURE_libudev is forced on whenever UDEV is enabled, FEATURE_kms whenever
# DRM is enabled. Neither is guaranteed through the DEPENDS of the selected
# subpackages.
PKG_BUILD_DEPENDS:=qt6base/host BUILD_qt6base-gui_UDEV:libudev-zero BUILD_qt6base-gui_DRM:libdrm
# KMS-based EGLFS integrations require both OpenGL ES and DRM
QT6BASE_EGLFS_KMS:=$(and $(CONFIG_BUILD_qt6base-gui_OPENGL_OPENGLES2),$(CONFIG_BUILD_qt6base-gui_DRM))
QT6BASE_QPA_DEFAULT_PLATFORM:=$(strip \
$(if $(CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_EGLFS),eglfs) \
$(if $(CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_LINUXFB),linuxfb) \
$(if $(CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_VNC),vnc) \
$(if $(CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_OFFSCREEN),offscreen) \
$(if $(CONFIG_BUILD_qt6base-gui_QPA_DEFAULT_MINIMAL),minimal))
define Package/qt6base/Default
SECTION:=video-frameworks
CATEGORY:=Video
SUBMENU:=Frameworks and Toolkits
TITLE:=Qt6base
DEPENDS:=
URL:=https://www.qt.io
endef
define Package/qt6base-concurrent
$(call Package/qt6base/Default)
TITLE+=concurrent
DEPENDS+=+qt6base-core
endef
define Package/qt6base-core
$(call Package/qt6base/Default)
TITLE+=core
DEPENDS+=+zlib +libzstd +libstdcpp $(ATOMIC64_DEPENDS) +libpcre2-16 +libdouble-conversion +BUILD_qt6base-core_ICU:icu
endef
define Package/qt6base-core/config
source "$(SOURCE)/Config_qt6base-core.in"
endef
define Package/qt6base-gui
$(call Package/qt6base/Default)
TITLE+=gui
DEPENDS+=+qt6base-core +libpng +libfreetype +BUILD_qt6base-gui_OPENGL_OPENGLES2:libmesa
endef
define Package/qt6base-gui/config
source "$(SOURCE)/Config_qt6base-gui.in"
endef
define Package/qt6base-network
$(call Package/qt6base/Default)
TITLE+=network
DEPENDS+=+qt6base-core +BUILD_qt6base-network_SSL:libopenssl
endef
define Package/qt6base-network/config
source "$(SOURCE)/Config_qt6base-network.in"
endef
define Package/qt6base-test
$(call Package/qt6base/Default)
TITLE+=test
DEPENDS+=+qt6base-core
endef
define Package/qt6base-widgets
$(call Package/qt6base/Default)
TITLE+=widgets
DEPENDS+=+qt6base-gui
endef
define Package/qt6base-openglwidgets
$(call Package/qt6base/Default)
TITLE+=opengl widgets
DEPENDS+=+qt6base-opengl +qt6base-widgets @BUILD_qt6base-gui_OPENGL_OPENGLES2
endef
define Package/qt6base-xml
$(call Package/qt6base/Default)
TITLE+=xml
DEPENDS+=+qt6base-core
endef
define Package/qt6base-opengl
$(call Package/qt6base/Default)
TITLE+=opengl
DEPENDS+=+qt6base-gui +libmesa @BUILD_qt6base-gui_OPENGL_OPENGLES2
endef
#### plugins
####### generic / input
define Package/qt6base-plugin-input-evdevkeyboard
$(call Package/qt6base/Default)
TITLE+=evdev keyboard (plugin)
DEPENDS+=+qt6base-core +qt6base-gui +BUILD_qt6base-gui_UDEV:libudev
endef
define Package/qt6base-plugin-input-evdevmouse
$(call Package/qt6base/Default)
TITLE+=evdev mouse (plugin)
DEPENDS+=+qt6base-core +qt6base-gui +BUILD_qt6base-gui_UDEV:libudev
endef
define Package/qt6base-plugin-input-evdevtablet
$(call Package/qt6base/Default)
TITLE+=evdev tablet (plugin)
DEPENDS+=+qt6base-core +qt6base-gui +BUILD_qt6base-gui_UDEV:libudev
endef
define Package/qt6base-plugin-input-evdevtouch
$(call Package/qt6base/Default)
TITLE+=evdev touch (plugin)
DEPENDS+=+qt6base-core +qt6base-gui +BUILD_qt6base-gui_UDEV:libudev
endef
####### imageformats
define Package/qt6base-plugin-imageformats-gif
$(call Package/qt6base/Default)
TITLE+=imageformat gif (plugin)
DEPENDS+=+qt6base-core +qt6base-gui
endef
define Package/qt6base-plugin-imageformats-jpeg
$(call Package/qt6base/Default)
TITLE+=imageformat jpeg (plugin)
DEPENDS+=+qt6base-core +qt6base-gui +libjpeg
endef
####### platforms
define Package/qt6base-plugin-platforms-minimal
$(call Package/qt6base/Default)
TITLE+=platform minimal (plugin)
DEPENDS+=+qt6base-gui
endef
define Package/qt6base-plugin-platforms-offscreen
$(call Package/qt6base/Default)
TITLE+=platform offscreen (plugin)
DEPENDS+=+qt6base-gui
endef
define Package/qt6base-plugin-platforms-linuxfb
$(call Package/qt6base/Default)
TITLE+=platform linuxfb (plugin)
DEPENDS+=+qt6base-core +qt6base-gui +BUILD_qt6base-gui_UDEV:libudev +BUILD_qt6base-gui_DRM:libdrm
endef
define Package/qt6base-plugin-platforms-vnc
$(call Package/qt6base/Default)
TITLE+=platform vnc (plugin)
DEPENDS+=+qt6base-core +qt6base-gui +qt6base-network +libfreetype +BUILD_qt6base-gui_UDEV:libudev
endef
define Package/qt6base-plugin-platforms-eglfs
$(call Package/qt6base/Default)
TITLE+=platform eglfs (plugin)
DEPENDS+=+qt6base-gui +qt6base-opengl +BUILD_qt6base-gui_UDEV:libudev +BUILD_qt6base-gui_DRM:libdrm
endef
define Build/Prepare
$(call Build/Prepare/Default)
# qt6base takes custom mkspecs only from its source dir, see:
# https://bugreports.qt.io/browse/QTBUG-136244
# Installed from there, linux-openwrt-g++ ends up in the target staging dir.
$(CP) \
./files/mkspecs/* \
$(PKG_BUILD_DIR)/mkspecs/
endef
define Host/Prepare
$(call Host/Prepare/Default)
# Installed from the source dir, linux-openwrt-host-g++ ends up in the host
# staging dir for host qmake builds, see ../qmake.mk
$(CP) \
./files/mkspecs/* \
$(HOST_BUILD_DIR)/mkspecs/
endef
# mkspecs are not actually used/read when compiling via cmake,
# but at least the respective mkspec-dir still needs to be present.
# ../cmake.mk sets linux-openwrt-g++ as mkspec, which eventually
# needs to be present in the *target*-staging-dir for other modules
# to find and include it.
# qt6base itself, though, expects all custom mkspecs to be present in
# its own source dir.
CMAKE_OPTIONS += \
-DINSTALL_PREFIX=$(QT_INSTALL_PREFIX) \
-DINSTALL_ARCHDATADIR=$(QT_INSTALL_ARCHDATA) \
-DINSTALL_BINDIR=$(QT_INSTALL_BINS) \
-DINSTALL_DATADIR=$(QT_INSTALL_DATA) \
-DINSTALL_DOCDIR=$(QT_INSTALL_DOCS) \
-DINSTALL_EXAMPLESDIR=$(QT_INSTALL_EXAMPLES) \
-DINSTALL_INCLUDEDIR=$(QT_INSTALL_HEADERS) \
-DINSTALL_LIBDIR=$(QT_INSTALL_LIBS) \
-DINSTALL_LIBEXECDIR=$(QT_INSTALL_LIBEXECS) \
-DINSTALL_PLUGINSDIR=$(QT_INSTALL_PLUGINS) \
-DINSTALL_QMLDIR=$(QT_INSTALL_QML) \
-DINSTALL_SYSCONFDIR=$(QT_INSTALL_SYSCONF) \
-DINSTALL_TESTSDIR=$(QT_INSTALL_TESTS) \
-DINSTALL_TRANSLATIONSDIR=$(QT_INSTALL_TRANSLATIONS) \
-DINSTALL_MKSPECSDIR=$(QT_INSTALL_MKSPECS) \
-DBUILD_WITH_PCH=OFF \
-DQT_USE_CCACHE=OFF \
-DQT_USE_VCPKG=OFF \
-DQT_BUILD_EXAMPLES=FALSE \
-DQT_BUILD_TESTS=FALSE \
-DFEATURE_optimize_size=ON \
-DFEATURE_reduce_exports=OFF \
-DFEATURE_reduce_relocations=OFF \
-DFEATURE_rpath=OFF \
-DQT_GENERATE_SBOM=OFF \
-DFEATURE_intelcet=OFF \
-DFEATURE_stack_protector=OFF \
-DFEATURE_stack_clash_protection=OFF \
-DFEATURE_glibc_fortify_source=OFF \
-DFEATURE_libstdcpp_assertions=OFF \
-DFEATURE_valgrind=OFF \
-DINPUT_linker=bfd \
-DFEATURE_pkg_config=ON \
-DFEATURE_gui=$(if $(CONFIG_PACKAGE_qt6base-gui),ON,OFF) \
-DFEATURE_widgets=$(if $(CONFIG_PACKAGE_qt6base-widgets),ON,OFF) \
-DFEATURE_printsupport=OFF \
-DFEATURE_dbus=OFF \
-DFEATURE_accessibility=ON \
-DFEATURE_accessibility_atspi_bridge=OFF \
-DINPUT_doubleconversion=system \
-DFEATURE_glib=OFF \
-DFEATURE_inotify=$(if $(CONFIG_BUILD_qt6base-core_INOTIFY),ON,OFF) \
-DFEATURE_icu=$(if $(CONFIG_BUILD_qt6base-core_ICU),ON,OFF) \
-DINPUT_pcre=system \
-DFEATURE_system_zlib=ON \
-DFEATURE_zstd=ON \
-DFEATURE_system_libb2=OFF \
-DFEATURE_backtrace=OFF \
-DFEATURE_journald=OFF \
-DFEATURE_syslog=OFF \
-DFEATURE_slog2=OFF \
-DFEATURE_ssl=$(if $(CONFIG_BUILD_qt6base-network_SSL),ON,OFF) \
-DINPUT_openssl=$(if $(CONFIG_BUILD_qt6base-network_SSL),linked,no) \
-DFEATURE_sctp=OFF \
-DFEATURE_libproxy=OFF \
-DFEATURE_gssapi=OFF \
-DFEATURE_libresolv=OFF \
-DFEATURE_brotli=OFF \
-DFEATURE_system_proxies=ON \
-DFEATURE_cups=OFF \
-DFEATURE_emojisegmenter=OFF \
-DFEATURE_fontconfig=OFF \
-DINPUT_freetype=system \
-DFEATURE_harfbuzz=OFF \
-DFEATURE_system_harfbuzz=OFF \
-DFEATURE_system_textmarkdownreader=OFF \
-DFEATURE_gtk3=OFF \
-DINPUT_opengl=$(if $(CONFIG_BUILD_qt6base-gui_OPENGL_OPENGLES2),es2,no) \
-DFEATURE_opengl_desktop=OFF \
-DFEATURE_egl=$(if $(CONFIG_BUILD_qt6base-gui_OPENGL_OPENGLES2),ON,OFF) \
-DFEATURE_vulkan=OFF \
-DQT_QPA_PLATFORMS=$(QT6BASE_QPA_DEFAULT_PLATFORM) \
-DQT_QPA_DEFAULT_PLATFORM=$(QT6BASE_QPA_DEFAULT_PLATFORM) \
-DFEATURE_directfb=OFF \
-DFEATURE_eglfs=$(if $(CONFIG_BUILD_qt6base-gui_OPENGL_OPENGLES2),ON,OFF) \
-DFEATURE_eglfs_gbm=$(if $(QT6BASE_EGLFS_KMS),ON,OFF) \
-DFEATURE_eglfs_egldevice=$(if $(QT6BASE_EGLFS_KMS),ON,OFF) \
-DFEATURE_eglfs_vsp2=OFF \
-DFEATURE_gbm=$(if $(QT6BASE_EGLFS_KMS),ON,OFF) \
-DFEATURE_kms=$(if $(CONFIG_BUILD_qt6base-gui_DRM),ON,OFF) \
-DFEATURE_drm_atomic=$(if $(CONFIG_BUILD_qt6base-gui_DRM),ON,OFF) \
-DFEATURE_linuxfb=$(if $(CONFIG_PACKAGE_qt6base-plugin-platforms-linuxfb),ON,OFF) \
-DFEATURE_vnc=$(if $(CONFIG_PACKAGE_qt6base-plugin-platforms-vnc),ON,OFF) \
-DFEATURE_wayland=OFF \
-DFEATURE_xcb=OFF \
-DFEATURE_libudev=$(if $(CONFIG_BUILD_qt6base-gui_UDEV),ON,OFF) \
-DFEATURE_evdev=ON \
-DFEATURE_tuiotouch=OFF \
-DFEATURE_libinput=OFF \
-DFEATURE_mtdev=OFF \
-DFEATURE_tslib=OFF \
-DFEATURE_xkbcommon=OFF \
-DFEATURE_xkbcommon_x11=OFF \
-DFEATURE_xlib=OFF \
-DFEATURE_xcb_xlib=OFF \
-DFEATURE_gif=$(if $(CONFIG_PACKAGE_qt6base-plugin-imageformats-gif),ON,OFF) \
-DFEATURE_ico=OFF \
-DINPUT_libpng=system \
-DINPUT_libjpeg=system \
-DFEATURE_sql=OFF \
-DFEATURE_sqlmodel=OFF
# BUILD_SHARED_LIBS=ON (set in ../cmake.mk) is needed for the host build:
# qtdeclarative builds qmltime and qmlscene only with shared libraries, and its
# cross build requires host versions of all tools its target build defines.
# FEATURE_gui=ON for the host build is required, as qtshadertools builds
# nothing without Qt GUI, and its qsb tool is needed to build qtdeclarative
# for the target.
# The host build only provides what is needed to build Qt and Qt based
# software for the target: everything else is disabled, except evdev, which
# is needed for Qt::InputSupportPrivate used by tools like kmap2qmap.
#
# Files/dirs within most install paths are properly versioned and can be
# distinguished among versions (e.g. qt5 and qt6). Some are not, though, and
# are set to version specific paths explicitly.
CMAKE_HOST_OPTIONS += \
-DINSTALL_PREFIX=$(QT_HOSTPKG_PREFIX) \
-DINSTALL_ARCHDATADIR=$(QT_HOSTPKG_ARCHDATA) \
-DINSTALL_BINDIR=$(QT_HOSTPKG_BINS) \
-DINSTALL_DATADIR=$(QT_HOSTPKG_DATA) \
-DINSTALL_DOCDIR=$(QT_HOSTPKG_DOCS) \
-DINSTALL_EXAMPLESDIR=$(QT_HOSTPKG_EXAMPLES) \
-DINSTALL_INCLUDEDIR=$(QT_HOSTPKG_HEADERS) \
-DINSTALL_LIBDIR=$(QT_HOSTPKG_LIBS) \
-DINSTALL_LIBEXECDIR=$(QT_HOSTPKG_LIBEXECS) \
-DINSTALL_PLUGINSDIR=$(QT_HOSTPKG_PLUGINS) \
-DINSTALL_QMLDIR=$(QT_HOSTPKG_QML) \
-DINSTALL_SYSCONFDIR=$(QT_HOSTPKG_SYSCONF) \
-DINSTALL_TESTSDIR=$(QT_HOSTPKG_TESTS) \
-DINSTALL_TRANSLATIONSDIR=$(QT_HOSTPKG_TRANSLATIONS) \
-DINSTALL_MKSPECSDIR=$(QT_HOSTPKG_MKSPECS) \
-DBUILD_WITH_PCH=ON \
-DQT_USE_CCACHE=OFF \
-DQT_USE_VCPKG=OFF \
-DQT_BUILD_EXAMPLES=FALSE \
-DQT_BUILD_TESTS=FALSE \
-DFEATURE_optimize_size=ON \
-DFEATURE_reduce_exports=OFF \
-DFEATURE_reduce_relocations=OFF \
-DQT_GENERATE_SBOM=OFF \
-DFEATURE_intelcet=OFF \
-DFEATURE_stack_protector=OFF \
-DFEATURE_stack_clash_protection=OFF \
-DFEATURE_glibc_fortify_source=OFF \
-DFEATURE_libstdcpp_assertions=OFF \
-DFEATURE_valgrind=OFF \
-DFEATURE_androiddeployqt=OFF \
-DFEATURE_vkgen=OFF \
-DINPUT_linker=bfd \
-DFEATURE_pkg_config=ON \
-DFEATURE_gui=ON \
-DFEATURE_widgets=OFF \
-DFEATURE_printsupport=OFF \
-DFEATURE_dbus=OFF \
-DFEATURE_accessibility=OFF \
-DFEATURE_accessibility_atspi_bridge=OFF \
-DINPUT_doubleconversion=system \
-DFEATURE_glib=OFF \
-DFEATURE_inotify=OFF \
-DFEATURE_icu=OFF \
-DINPUT_pcre=system \
-DFEATURE_system_zlib=ON \
-DFEATURE_zstd=ON \
-DFEATURE_system_libb2=OFF \
-DFEATURE_backtrace=OFF \
-DFEATURE_journald=OFF \
-DFEATURE_syslog=OFF \
-DFEATURE_slog2=OFF \
-DFEATURE_ssl=OFF \
-DINPUT_openssl=no \
-DFEATURE_sctp=OFF \
-DFEATURE_libproxy=OFF \
-DFEATURE_gssapi=OFF \
-DFEATURE_libresolv=OFF \
-DFEATURE_brotli=OFF \
-DFEATURE_system_proxies=ON \
-DFEATURE_cups=OFF \
-DFEATURE_emojisegmenter=OFF \
-DFEATURE_fontconfig=OFF \
-DFEATURE_freetype=OFF \
-DFEATURE_harfbuzz=OFF \
-DFEATURE_system_harfbuzz=OFF \
-DFEATURE_system_textmarkdownreader=OFF \
-DFEATURE_gtk3=OFF \
-DINPUT_opengl=no \
-DFEATURE_opengl_desktop=OFF \
-DFEATURE_egl=OFF \
-DFEATURE_vulkan=OFF \
-DFEATURE_directfb=OFF \
-DFEATURE_eglfs=OFF \
-DFEATURE_eglfs_vsp2=OFF \
-DFEATURE_gbm=OFF \
-DFEATURE_kms=OFF \
-DFEATURE_drm_atomic=OFF \
-DFEATURE_linuxfb=OFF \
-DFEATURE_vnc=OFF \
-DFEATURE_wayland=OFF \
-DFEATURE_xcb=OFF \
-DFEATURE_libudev=OFF \
-DFEATURE_evdev=ON \
-DFEATURE_tuiotouch=OFF \
-DFEATURE_libinput=OFF \
-DFEATURE_mtdev=OFF \
-DFEATURE_tslib=OFF \
-DFEATURE_xkbcommon=OFF \
-DFEATURE_xkbcommon_x11=OFF \
-DFEATURE_xlib=OFF \
-DFEATURE_xcb_xlib=OFF \
-DFEATURE_gif=OFF \
-DFEATURE_ico=OFF \
-DINPUT_libpng=no \
-DINPUT_libjpeg=no \
-DFEATURE_sql=OFF \
-DFEATURE_sqlmodel=OFF
define Build/InstallDev
$(call Build/InstallDev/Qt,$(1))
# target specific host tool `qmake`
$(INSTALL_DIR) \
$(1)/host/etc/qt6 \
$(1)/host/$(subst $(QT_HOST_PREFIX),,$(QT_HOST_BINS)) \
$(1)/host/$(subst $(QT_HOST_PREFIX),,$(QT_HOST_LIBS)) \
$(1)/host/$(subst $(QT_HOST_PREFIX),,$(QT_HOST_LIBEXECS)) \
$(1)/host/$(subst $(QT_HOST_PREFIX),,$(QT_HOST_DATA)) \
# while there were 2 qmakes in qt5, one for the host, one for the target,
# it's the same binary but with different configs for qt6.
# the config is generated at build time and contains relative paths to its own location
# which assumptions are poor and don't allow for moving around.
# so we generate the qmake6 wrapper for the target and modify the config ourselves.
# (Sub)paths are computed based on Prefix and HostPrefix and derived from config/cmake
# INSTALL_*DIR-args.
# HostData is where qmake reads the mkspecs, qconfig.pri and the module
# .pri files from. For target builds it has to be the target's ArchData,
# otherwise qmake uses the configuration and modules of the host build.
# HostSpec makes host parts (host_build) of target builds use OpenWrt's
# host compiler and flags.
sed \
-e 's#\(^Prefix=\).*#\1$(STAGING_DIR)/$(QT_INSTALL_PREFIX)#' \
-e 's#\(^HostPrefix=\).*#\1$(QT_HOST_PREFIX)#' \
-e 's#\(^HostBinaries=\).*#\1$(subst $(QT_HOST_PREFIX)/,,$(QT_HOST_BINS))#' \
-e 's#\(^HostLibraries=\).*#\1$(subst $(QT_HOST_PREFIX)/,,$(QT_HOST_LIBS))#' \
-e 's#\(^HostLibraryExecutables=\).*#\1$(subst $(QT_HOST_PREFIX)/,,$(QT_HOST_LIBEXECS))#' \
-e 's#\(^HostData=\).*#\1$(STAGING_DIR)$(QT_INSTALL_ARCHDATA)#' \
-e 's#\(^HostSpec=\).*#\1linux-openwrt-host-g++#' \
$(PKG_INSTALL_DIR)/$(QT_INSTALL_BINS)/target_qt.conf \
> $(1)/host/etc/qt6/qmake-cross.conf
printf '%s\n' \
'#!/bin/sh' \
'exec $(QT_HOSTPKG_BINS)/qmake6 -qtconf "$(STAGING_DIR)/host/etc/qt6/qmake-cross.conf" "$$$$@"' \
> $(1)/host/bin/qt6/qmake
chmod +x $(1)/host/bin/qt6/qmake
endef
define Package/qt6base-concurrent/install
$(call Build/Install/Libs,$(1),libQt6Concurrent)
endef
define Package/qt6base-core/install
$(call Build/Install/Libs,$(1),libQt6Core)
endef
define Package/qt6base-gui/install
$(call Build/Install/Libs,$(1),libQt6Gui)
endef
define Package/qt6base-network/install
$(call Build/Install/Libs,$(1),libQt6Network)
$(if $(CONFIG_BUILD_qt6base-network_SSL),$(call Build/Install/Plugins,$(1),tls,*),)
endef
define Package/qt6base-test/install
$(call Build/Install/Libs,$(1),libQt6Test)
endef
define Package/qt6base-widgets/install
$(call Build/Install/Libs,$(1),libQt6Widgets)
endef
define Package/qt6base-openglwidgets/install
$(call Build/Install/Libs,$(1),libQt6OpenGLWidgets)
endef
define Package/qt6base-xml/install
$(call Build/Install/Libs,$(1),libQt6Xml)
endef
define Package/qt6base-opengl/install
$(call Build/Install/Libs,$(1),libQt6OpenGL)
endef
define Package/qt6base-plugin-platforms-eglfs/install
$(call Build/Install/Libs,$(1),libQt6EglFSDeviceIntegration)
$(call Build/Install/Plugins,$(1),platforms,libqeglfs)
$(if $(QT6BASE_EGLFS_KMS),$(call Build/Install/Libs,$(1),libQt6EglFsKmsSupport))
$(if $(QT6BASE_EGLFS_KMS),$(call Build/Install/Libs,$(1),libQt6EglFsKmsGbmSupport))
$(if $(QT6BASE_EGLFS_KMS),$(call Build/Install/Plugins,$(1),egldeviceintegrations,libqeglfs-kms-egldevice-integration))
$(if $(QT6BASE_EGLFS_KMS),$(call Build/Install/Plugins,$(1),egldeviceintegrations,libqeglfs-kms-integration))
endef
define Package/qt6base-plugin-input-evdevkeyboard/install
$(call Build/Install/Plugins,$(1),generic,libqevdevkeyboardplugin)
endef
define Package/qt6base-plugin-input-evdevmouse/install
$(call Build/Install/Plugins,$(1),generic,libqevdevmouseplugin)
endef
define Package/qt6base-plugin-input-evdevtablet/install
$(call Build/Install/Plugins,$(1),generic,libqevdevtabletplugin)
endef
define Package/qt6base-plugin-input-evdevtouch/install
$(call Build/Install/Plugins,$(1),generic,libqevdevtouchplugin)
endef
define Package/qt6base-plugin-imageformats-gif/install
$(call Build/Install/Plugins,$(1),imageformats,libqgif)
endef
define Package/qt6base-plugin-imageformats-jpeg/install
$(call Build/Install/Plugins,$(1),imageformats,libqjpeg)
endef
define Package/qt6base-plugin-platforms-minimal/install
$(call Build/Install/Plugins,$(1),platforms,libqminimal)
endef
define Package/qt6base-plugin-platforms-linuxfb/install
$(call Build/Install/Plugins,$(1),platforms,libqlinuxfb)
endef
define Package/qt6base-plugin-platforms-offscreen/install
$(call Build/Install/Plugins,$(1),platforms,libqoffscreen)
endef
define Package/qt6base-plugin-platforms-vnc/install
$(call Build/Install/Plugins,$(1),platforms,libqvnc)
endef
# $(eval $(call BuildPackage,qt6base))
$(eval $(call BuildPackage,qt6base-concurrent))
$(eval $(call BuildPackage,qt6base-core))
$(eval $(call BuildPackage,qt6base-gui))
$(eval $(call BuildPackage,qt6base-opengl))
$(eval $(call BuildPackage,qt6base-network))
$(eval $(call BuildPackage,qt6base-test))
$(eval $(call BuildPackage,qt6base-widgets))
$(eval $(call BuildPackage,qt6base-openglwidgets))
$(eval $(call BuildPackage,qt6base-xml))
$(eval $(call BuildPackage,qt6base-plugin-input-evdevkeyboard))
$(eval $(call BuildPackage,qt6base-plugin-input-evdevmouse))
$(eval $(call BuildPackage,qt6base-plugin-input-evdevtablet))
$(eval $(call BuildPackage,qt6base-plugin-input-evdevtouch))
$(eval $(call BuildPackage,qt6base-plugin-imageformats-gif))
$(eval $(call BuildPackage,qt6base-plugin-imageformats-jpeg))
$(eval $(call BuildPackage,qt6base-plugin-platforms-minimal))
$(eval $(call BuildPackage,qt6base-plugin-platforms-linuxfb))
$(eval $(call BuildPackage,qt6base-plugin-platforms-offscreen))
$(eval $(call BuildPackage,qt6base-plugin-platforms-vnc))
$(eval $(call BuildPackage,qt6base-plugin-platforms-eglfs))
$(eval $(call HostBuild))
|