level up Qt to 5.8.0-beta
[feed/video.git] / frameworks / qt5base / Makefile
1 #
2 # Copyright (C) 2016 OpenWrt.org
3 # Author: Mirko Vogt <mirko-openwrt@nanl.de>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 # TODO / known bugs:
9 # - plugins don't work when sstrip is used for stripping
10 # - no X11/wayland/xcb/kms support so far - primary target is linuxfb
11
12 include $(TOPDIR)/rules.mk
13
14 PKG_NAME:=qt5base
15 PKG_VERSION:=5.8.0-beta
16 PKG_RELEASE:=1
17 PKG_MD5SUM:=3f4ab8a104166270368764fb057e6581
18
19 PKG_SYS_NAME:=qtbase-opensource-src-$(PKG_VERSION)
20 PKG_SOURCE:=$(PKG_SYS_NAME).tar.xz
21 PKG_SOURCE_URL:=http://download.qt-project.org/development_releases/qt/$(basename $(PKG_VERSION))/$(PKG_VERSION)/submodules
22
23 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_SYS_NAME)
24 PKG_BUILD_PARALLEL:=1
25 PKG_BUILD_DEPENDS:=librpc
26 PKG_INSTALL:=1
27 PKG_USE_MIPS16:=0
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/nls.mk
31 include ./files/qmake.mk
32
33 PKG_CONFIG_DEPENDS:= \
34 CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg \
35 CONFIG_PACKAGE_qt5base-plugin-imageformats-png \
36 CONFIG_PACKAGE_qt5base-network \
37 CONFIG_PACKAGE_qt5base-gui \
38 CONFIG_PACKAGE_qt5base-gl \
39 CONFIG_PACKAGE_qt5base-widgets \
40 CONFIG_PACKAGE_qt5base-examples \
41 CONFIG_PACKAGE_qt5base-plugin-platforms-minimal \
42 CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \
43 # CONFIG_PACKAGE_qt5base-plugin-platforms-eglfs \
44 # CONFIG_PACKAGE_qt5base-plugin-platforms-minimalegl \
45
46 # Do not use sstrip for QT5. When sstrip is used the QT5 plugin loading does
47 # not work, because of QT''s internal elf parser, see
48 # https://bugreports.qt.io/browse/QTBUG-52567
49 # Use the code from the gcc package to use strip instaed.
50 ifneq ($(CONFIG_USE_SSTRIP),)
51 STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
52 RSTRIP:= \
53 export CROSS="$(TARGET_CROSS)" \
54 $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \
55 $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \
56 NM="$(TARGET_CROSS)nm" \
57 STRIP="$(STRIP)" \
58 STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \
59 $(SCRIPT_DIR)/rstrip.sh
60 endif
61
62 define Package/qt5base/Default
63 SECTION:=video-frameworks
64 CATEGORY:=Video
65 SUBMENU:=Frameworks and Toolkits
66 TITLE:=Qt5base
67 DEPENDS+=qt5base
68 URL:=http://qt.io
69 MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
70 endef
71
72 define Package/qt5base
73 $(call Package/qt5base/Default)
74 DEPENDS:=
75 MENU:=1
76 endef
77
78 define Package/qt5base-concurrent
79 $(call Package/qt5base/Default)
80 TITLE+=concurrent
81 DEPENDS+=+qt5base-core
82 endef
83
84 define Package/qt5base-gl
85 $(call Package/qt5base/Default)
86 TITLE+=gl
87 DEPENDS+=+qt5base-core +qt5base-gui +qt5base-widgets
88 endef
89
90 define Package/qt5base-core
91 $(call Package/qt5base/Default)
92 TITLE+=core
93 DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt +libdouble-conversion $(ICONV_DEPENDS) #+icu
94 endef
95
96 define Package/qt5base-gui
97 $(call Package/qt5base/Default)
98 TITLE+=gui
99 DEPENDS+=+qt5base-core +qt5quick2-2d-sw-renderer-GLstubs +libpng +fontconfig +libfreetype +libudev
100 endef
101
102 define Package/qt5base-network
103 $(call Package/qt5base/Default)
104 TITLE+=network
105 DEPENDS+=+qt5base-core +libopenssl
106 endef
107
108 # seems to be only present as static lib
109 # define Package/qt5base-paltformSupport
110 # $(call Package/qt5base/Default)
111 # DEPENDS+=
112 # endef
113
114 define Package/qt5base-printSupport
115 $(call Package/qt5base/Default)
116 TITLE+=print support
117 DEPENDS+=+qt5base-core +qt5base-gui +qt5base-widgets
118 endef
119
120 define Package/qt5base-sql
121 $(call Package/qt5base/Default)
122 TITLE+=sql
123 DEPENDS+=+qt5base-core
124 endef
125
126 define Package/qt5base-test
127 $(call Package/qt5base/Default)
128 TITLE+=test
129 DEPENDS+=+qt5base-core
130 endef
131
132 define Package/qt5base-widgets
133 $(call Package/qt5base/Default)
134 TITLE+=widgets
135 DEPENDS+=+qt5base-core +qt5base-gui
136 endef
137
138 define Package/qt5base-xml
139 $(call Package/qt5base/Default)
140 TITLE+=xml
141 DEPENDS+=+qt5base-core
142 endef
143
144 #### plugins
145
146 ####### bearer
147
148 define Package/qt5base-plugin-bearer-generic
149 $(call Package/qt5base/Default)
150 TITLE+=bearer (plugin)
151 DEPENDS+=+qt5base-core +qt5base-network
152 endef
153
154 ####### generic / input
155
156 define Package/qt5base-plugin-input-evdevkeyboard
157 $(call Package/qt5base/Default)
158 TITLE+=evdev keyboard (plugin)
159 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
160 endef
161
162 define Package/qt5base-plugin-input-evdevmouse
163 $(call Package/qt5base/Default)
164 TITLE+=evdev mouse (plugin)
165 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
166 endef
167
168 define Package/qt5base-plugin-input-evdevtablet
169 $(call Package/qt5base/Default)
170 TITLE+=evdev tablet (plugin)
171 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
172 endef
173
174 define Package/qt5base-plugin-input-evdevtouch
175 $(call Package/qt5base/Default)
176 TITLE+=evdev touch (plugin)
177 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
178 endef
179
180 ####### imageformats
181
182 #define Package/qt5base-plugin-imageformats-gif
183 # $(call Package/qt5base/Default)
184 #TITLE+=imageformat gif (plugin)
185 # DEPENDS+=+qt5base-core +qt5base-gui
186 #endef
187
188 define Package/qt5base-plugin-imageformats-ico
189 $(call Package/qt5base/Default)
190 TITLE+=imageformat ico (plugin)
191 DEPENDS+=+qt5base-core +qt5base-gui
192 endef
193
194 define Package/qt5base-plugin-imageformats-jpeg
195 $(call Package/qt5base/Default)
196 TITLE+=imageformat jpeg (plugin)
197 DEPENDS+=+qt5base-core +qt5base-gui +libjpeg
198 endef
199
200 ####### platforms
201
202 #define Package/qt5base-plugin-platforms-eglfs
203 # $(call Package/qt5base/Default)
204 # TITLE+=platform eglfs (plugin)
205 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
206 #endef
207
208 #define Package/qt5base-plugin-platforms-minimalegl
209 # $(call Package/qt5base/Default)
210 # TITLE+=platform minimalegl (plugin)
211 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
212 #endef
213
214 define Package/qt5base-plugin-platforms-linuxfb
215 $(call Package/qt5base/Default)
216 TITLE+=platform linuxfb (plugin)
217 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
218 endef
219
220 define Package/qt5base-plugin-platforms-minimal
221 $(call Package/qt5base/Default)
222 TITLE+=platform minimal (plugin)
223 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
224 endef
225
226 define Package/qt5base-plugin-platforms-offscreen
227 $(call Package/qt5base/Default)
228 TITLE+=platform offscreen (plugin)
229 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
230 endef
231
232 define Package/qt5base-plugin-platforms-vnc
233 $(call Package/qt5base/Default)
234 TITLE+=platform vnc (plugin)
235 DEPENDS+=+qt5base-core +qt5base-gui +qt5base-network +libfreetype +fontconfig
236 endef
237
238
239
240 ###### sql
241
242 #define Package/qt5base-plugin-sqldrivers-sqlite
243 # $(call Package/qt5base/Default)
244 # TITLE+=sqldriver sqlite (plugin)
245 # DEPENDS+=+qt5base-core +qt5base-sql +libsqlite3
246 #endef
247
248 define Package/qt5base-examples
249 $(call Package/qt5base/Default)
250 TITLE+=examples
251 DEPENDS+=\
252 +qt5base-core \
253 +qt5base-gui \
254 +qt5base-widgets \
255 +qt5base-network \
256 +qt5base-sql \
257 +qt5base-xml \
258 +qt5base-printSupport \
259 +qt5base-concurrent \
260 +qt5base-gl
261 endef
262
263 define Build/Prepare
264 $(call Build/Prepare/Default)
265 $(CP) \
266 ./files/mkspecs/linux-openwrt-g++ \
267 $(PKG_BUILD_DIR)/mkspecs/
268 endef
269
270 # TARGET_CFLAGS += \
271 # -I$(STAGING_DIR)/usr/include/freetype2 \
272 # -I$(STAGING_DIR)/usr/include/libdrm
273
274 define Build/Configure
275 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
276 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
277 # hence we use the TARGET_* nomenclature.
278 ( cd $(PKG_BUILD_DIR) ; \
279 TARGET_CROSS="$(TARGET_CROSS)" \
280 TARGET_CFLAGS="$(TARGET_CFLAGS)" \
281 TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
282 TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
283 ./configure \
284 -prefix $(QT_INSTALL_PREFIX) \
285 -extprefix $(QT_EXTPREFIX) \
286 -hostprefix $(QT_HOST_PREFIX) \
287 -no-gcc-sysroot \
288 -bindir $(QT_INSTALL_BINS) \
289 -headerdir $(QT_INSTALL_HEADERS) \
290 -libdir $(QT_INSTALL_LIBS) \
291 -archdatadir $(QT_INSTALL_ARCHDATA) \
292 -plugindir $(QT_INSTALL_PLUGINS) \
293 -libexecdir $(QT_INSTALL_LIBEXECS) \
294 -importdir $(QT_INSTALL_IMPORTS) \
295 -qmldir $(QT_INSTALL_QML) \
296 -datadir $(QT_INSTALL_DATA) \
297 -docdir $(QT_INSTALL_DOCS) \
298 -translationdir $(QT_INSTALL_TRANSLATIONS) \
299 -sysconfdir $(QT_INSTALL_CONFIGURATION) \
300 -examplesdir $(QT_INSTALL_EXAMPLES) \
301 -testsdir $(QT_INSTALL_TESTS) \
302 -hostbindir $(QT_HOST_BINS) \
303 -hostlibdir $(QT_HOST_LIBS) \
304 -hostdatadir $(QT_HOST_DATA) \
305 -verbose \
306 -opensource \
307 -confirm-license \
308 -release \
309 -no-optimized-tools \
310 -no-strip \
311 -shared \
312 -no-framework \
313 -xplatform linux-openwrt-g++ \
314 -no-sse3 \
315 -no-ssse3 \
316 -no-sse4.1 \
317 -no-sse4.2 \
318 -no-avx \
319 -no-avx2 \
320 -no-avx512 \
321 $(if $(findstring -mdsp,$(TARGET_CFLAGS)),,-no-mips_dsp) \
322 $(if $(findstring -mdspr2,$(TARGET_CFLAGS)),,-no-mips_dspr2) \
323 -no-reduce-exports \
324 -no-reduce-relocations \
325 -no-pch \
326 -no-use-gold-linker \
327 -no-warnings-are-errors \
328 -pkg-config \
329 -no-optimized-qmake \
330 -nomake tools \
331 -make examples \
332 $(if $(CONFIG_PACKAGE_qt5base-examples),-compile-examples,-no-compile-examples) \
333 $(if $(CONFIG_PACKAGE_qt5base-examples),-make examples,-nomake examples) \
334 $(if $(CONFIG_PACKAGE_qt5base-gui),-gui,-no-gui) \
335 $(if $(CONFIG_PACKAGE_qt5base-widgets),-widgets,-no-widgets) \
336 -no-dbus \
337 -accessibility \
338 -no-qml-debug \
339 -system-doubleconversion \
340 -no-glib \
341 -eventfd \
342 -no-inotify \
343 $(if $(CONFIG_BUILD_NLS),-no-iconv,-no-iconv) \
344 -no-icu \
345 -system-pcre \
346 -system-zlib \
347 -no-journald \
348 -no-syslog \
349 -ssl \
350 $(if $(CONFIG_PACKAGE_qt5base-network),-openssl-linked,-no-openssl) \
351 -system-proxies \
352 -no-cups \
353 -fontconfig \
354 -system-freetype \
355 -no-harfbuzz \
356 -no-gtk \
357 -opengl \
358 -no-xcb-xlib \
359 $(if $(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal),,-qpa minimal) \
360 $(if $(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb),,-qpa linuxfb) \
361 -system-xcb \
362 -no-directfb \
363 -no-eglfs \
364 -no-gbm \
365 -no-kms \
366 $(if $(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb),-linuxfb,-no-linuxfb) \
367 -no-mirclient \
368 -no-xcb \
369 -evdev \
370 -no-libinput \
371 -no-mtdev \
372 -no-tslib \
373 -no-xinput2 \
374 -no-xkbcommon-x11 \
375 -no-xkbcommon-evdev \
376 -no-gif \
377 $(if $(CONFIG_PACKAGE_qt5base-plugin-imageformats-ico),-ico,-no-ico) \
378 $(if $(CONFIG_PACKAGE_qt5base-gui),-system-libpng,-no-libpng) \
379 $(if $(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg),-system-libjpeg,-no-libjpeg) \
380 -no-sql-db2 \
381 -no-sql-ibase \
382 -no-sql-mysql \
383 -no-sql-oci \
384 -no-sql-odbc \
385 -no-sql-psql \
386 -no-sql-sqlite \
387 -no-sql-sqlite2 \
388 -no-sql-tds \
389 -no-libproxy \
390 -system-xkbcommon \
391 )
392 endef
393
394 define Build/InstallDev
395 $(INSTALL_DIR) \
396 $(STAGING_DIR)/host/mk
397
398 $(CP) \
399 ./files/qmake.mk \
400 $(STAGING_DIR)/host/mk/
401
402 $(call Build/Install/HostFiles,$(1))
403 $(call Build/Install/Headers,$(1))
404 $(call Build/Install/Libs,$(1),*)
405 endef
406
407 define Package/qt5base-concurrent/install
408 $(call Build/Install/Libs,$(1),libQt5Concurrent)
409 endef
410
411 define Package/qt5base-core/install
412 $(call Build/Install/Libs,$(1),libQt5Core)
413 endef
414
415 define Package/qt5base-gl/install
416 $(call Build/Install/Libs,$(1),libQt5OpenGL)
417 endef
418
419 define Package/qt5base-gui/install
420 $(call Build/Install/Libs,$(1),libQt5Gui)
421 endef
422
423 define Package/qt5base-network/install
424 $(call Build/Install/Libs,$(1),libQt5Network)
425 endef
426
427 define Package/qt5base-printSupport/install
428 $(call Build/Install/Libs,$(1),libQt5PrintSupport)
429 endef
430
431 define Package/qt5base-sql/install
432 $(call Build/Install/Libs,$(1),libQt5Sql)
433 endef
434
435 define Package/qt5base-test/install
436 $(call Build/Install/Libs,$(1),libQt5Test)
437 endef
438
439 define Package/qt5base-widgets/install
440 $(call Build/Install/Libs,$(1),libQt5Widgets)
441 endef
442
443 define Package/qt5base-xml/install
444 $(call Build/Install/Libs,$(1),libQt5Xml)
445 endef
446
447 define Package/qt5base-plugin-bearer-generic/install
448 $(call Build/Install/Plugins,$(1),bearer,libqgenericbearer)
449 endef
450
451 define Package/qt5base-plugin-input-evdevkeyboard/install
452 $(call Build/Install/Plugins,$(1),generic,libqevdevkeyboardplugin)
453 endef
454
455 define Package/qt5base-plugin-input-evdevmouse/install
456 $(call Build/Install/Plugins,$(1),generic,libqevdevmouseplugin)
457 endef
458
459 define Package/qt5base-plugin-input-evdevtablet/install
460 $(call Build/Install/Plugins,$(1),generic,libqevdevtabletplugin)
461 endef
462
463 define Package/qt5base-plugin-input-evdevtouch/install
464 $(call Build/Install/Plugins,$(1),generic,libqevdevtouchplugin)
465 endef
466
467 #define Package/qt5base-plugin-imageformats-gif/install
468 # $(call Build/Install/Plugins,$(1),imageformats,libqgif)
469 #endef
470
471 define Package/qt5base-plugin-imageformats-ico/install
472 $(call Build/Install/Plugins,$(1),imageformats,libqico)
473 endef
474
475 define Package/qt5base-plugin-imageformats-jpeg/install
476 $(call Build/Install/Plugins,$(1),imageformats,libqjpeg)
477 endef
478
479 define Package/qt5base-plugin-platforms-linuxfb/install
480 $(call Build/Install/Plugins,$(1),platforms,libqlinuxfb)
481 endef
482
483 define Package/qt5base-plugin-platforms-vnc/install
484 $(call Build/Install/Plugins,$(1),platforms,libqvnc)
485 endef
486
487 #define Package/qt5base-plugin-platforms-eglfs/install
488 # $(call Build/Install/Plugins,$(1),platforms,libqeglfs)
489 #endef
490
491 #define Package/qt5base-plugin-platforms-minimalegl/install
492 # $(call Build/Install/Plugins,$(1),platforms,libqminimalegl)
493 #endef
494
495 define Package/qt5base-plugin-platforms-minimal/install
496 $(call Build/Install/Plugins,$(1),platforms,libqminimal)
497 endef
498
499 define Package/qt5base-plugin-platforms-offscreen/install
500 $(call Build/Install/Plugins,$(1),platforms,libqoffscreen)
501 endef
502
503 #define Package/qt5base-plugin-sqldrivers-sqlite/install
504 # $(call Build/Install/Plugins,$(1),sqldrivers,libqsqlite)
505 #endef
506
507 define Package/qt5base-examples/install
508 $(call Build/Install/Examples,$(1))
509 endef
510
511 $(eval $(call BuildPackage,qt5base))
512 $(eval $(call BuildPackage,qt5base-concurrent))
513 $(eval $(call BuildPackage,qt5base-core))
514 $(eval $(call BuildPackage,qt5base-gui))
515 $(eval $(call BuildPackage,qt5base-gl))
516 $(eval $(call BuildPackage,qt5base-network))
517 $(eval $(call BuildPackage,qt5base-printSupport))
518 $(eval $(call BuildPackage,qt5base-sql))
519 $(eval $(call BuildPackage,qt5base-test))
520 $(eval $(call BuildPackage,qt5base-widgets))
521 $(eval $(call BuildPackage,qt5base-xml))
522 $(eval $(call BuildPackage,qt5base-plugin-bearer-generic))
523 $(eval $(call BuildPackage,qt5base-plugin-input-evdevkeyboard))
524 $(eval $(call BuildPackage,qt5base-plugin-input-evdevmouse))
525 $(eval $(call BuildPackage,qt5base-plugin-input-evdevtablet))
526 $(eval $(call BuildPackage,qt5base-plugin-input-evdevtouch))
527 #$(eval $(call BuildPackage,qt5base-plugin-imageformats-gif))
528 $(eval $(call BuildPackage,qt5base-plugin-imageformats-ico))
529 $(eval $(call BuildPackage,qt5base-plugin-imageformats-jpeg))
530 $(eval $(call BuildPackage,qt5base-plugin-platforms-linuxfb))
531 #$(eval $(call BuildPackage,qt5base-plugin-platforms-eglfs))
532 #$(eval $(call BuildPackage,qt5base-plugin-platforms-minimalegl))
533 $(eval $(call BuildPackage,qt5base-plugin-platforms-minimal))
534 $(eval $(call BuildPackage,qt5base-plugin-platforms-offscreen))
535 $(eval $(call BuildPackage,qt5base-plugin-platforms-vnc))
536 #$(eval $(call BuildPackage,qt5base-plugin-sqldrivers-sqlite))
537 $(eval $(call BuildPackage,qt5base-examples))