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.
9 # - plugins don't work when sstrip is used for stripping
10 # - no X11/wayland/xcb/kms support so far - primary target is linuxfb
12 include $(TOPDIR
)/rules.mk
17 PKG_HASH
:=bc9a21e9f6fff9629019fdf9f989f064751d5073c3a28dc596def92f4d4275c6
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
/official_releases
/qt
/$(basename $(PKG_VERSION
))/$(PKG_VERSION
)/submodules
23 PKG_BUILD_DIR
=$(BUILD_DIR
)/$(PKG_SYS_NAME
)
24 HOST_BUILD_DIR
=$(BUILD_DIR
)/host
/$(PKG_SYS_NAME
)
26 HOST_BUILD_PARALLEL
:=1
27 PKG_BUILD_DEPENDS
:=librpc
30 # Yes, the host build depends on the target build. This is not a mistake!
31 # The target build provides the (target specific) qmake.mk file which
32 # is also used for host builds.
33 # Host projects depend on qt5base/host which however don't build
34 # if qt5base didn't install the qmake.mk file before.
35 # Benefit of the target build providing qmake.mk instead of the host build
36 # is that the host build really only needs to be built, if there're targets
37 # which actually depend on it. At the time of this writing, only qt5tools
38 # makes use of the host build.
39 HOST_BUILD_DEPENDS
:=qt5base
41 include $(INCLUDE_DIR
)/package.mk
42 include $(INCLUDE_DIR
)/host-build.mk
43 include $(INCLUDE_DIR
)/nls.mk
44 include .
/files
/qmake.mk
46 PKG_CONFIG_DEPENDS
:= \
47 CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg \
48 CONFIG_PACKAGE_qt5base-plugin-imageformats-png \
49 CONFIG_PACKAGE_qt5base-network \
50 CONFIG_PACKAGE_qt5base-gui \
51 CONFIG_PACKAGE_qt5base-gl \
52 CONFIG_PACKAGE_qt5base-widgets \
53 CONFIG_PACKAGE_qt5base-examples \
54 CONFIG_PACKAGE_qt5base-plugin-platforms-minimal \
55 CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \
56 CONFIG_PACKAGE_qt5base-plugin-input-libinput \
57 # CONFIG_PACKAGE_qt5base-plugin-platforms-eglfs \
58 # CONFIG_PACKAGE_qt5base-plugin-platforms-minimalegl \
60 # Do not use sstrip for QT5. When sstrip is used the QT5 plugin loading does
61 # not work, because of QT''s internal elf parser, see
62 # https://bugreports.qt.io/browse/QTBUG-52567
63 # Use the code from the gcc package to use strip instaed.
64 ifneq ($(CONFIG_USE_SSTRIP
),)
65 STRIP
:=$(TARGET_CROSS
)strip $(call qstrip
,$(CONFIG_STRIP_ARGS
))
67 export CROSS
="$(TARGET_CROSS)" \
68 $(if
$(CONFIG_KERNEL_KALLSYMS
),NO_RENAME
=1) \
69 $(if
$(CONFIG_KERNEL_PROFILING
),KEEP_SYMBOLS
=1); \
70 NM
="$(TARGET_CROSS)nm" \
72 STRIP_KMOD
="$(SCRIPT_DIR)/strip-kmod.sh" \
73 $(SCRIPT_DIR
)/rstrip.sh
76 define Package
/qt5base
/Default
77 SECTION
:=video-frameworks
79 SUBMENU
:=Frameworks and Toolkits
82 MAINTAINER
:=Mirko Vogt
<mirko@openwrt.org
>
85 # define Package/qt5base
86 # $(call Package/qt5base/Default)
91 define Package
/qt5base-concurrent
92 $(call Package
/qt5base
/Default
)
94 DEPENDS
+=+qt5base-core
97 define Package
/qt5base-gl
98 $(call Package
/qt5base
/Default
)
100 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
103 define Package
/qt5base-core
104 $(call Package
/qt5base
/Default
)
106 DEPENDS
+=+libpthread
+zlib
+libpcre2-16
+libstdcpp
+librt
+libdouble-conversion
$(ICONV_DEPENDS
) #+icu
109 define Package
/qt5base-gui
110 $(call Package
/qt5base
/Default
)
112 DEPENDS
+=+qt5base-core
+qt5quick2-2d-sw-renderer-GLstubs
+libpng
+fontconfig
+libfreetype
115 define Package
/qt5base-network
116 $(call Package
/qt5base
/Default
)
118 DEPENDS
+=+qt5base-core
+libopenssl
121 # seems to be only present as static lib
122 # define Package/qt5base-paltformSupport
123 # $(call Package/qt5base/Default)
127 define Package
/qt5base-printSupport
128 $(call Package
/qt5base
/Default
)
130 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
133 define Package
/qt5base-sql
134 $(call Package
/qt5base
/Default
)
136 DEPENDS
+=+qt5base-core
139 define Package
/qt5base-test
140 $(call Package
/qt5base
/Default
)
142 DEPENDS
+=+qt5base-core
145 define Package
/qt5base-widgets
146 $(call Package
/qt5base
/Default
)
148 DEPENDS
+=+qt5base-core
+qt5base-gui
151 define Package
/qt5base-xml
152 $(call Package
/qt5base
/Default
)
154 DEPENDS
+=+qt5base-core
161 define Package
/qt5base-plugin-bearer-generic
162 $(call Package
/qt5base
/Default
)
163 TITLE
+=bearer
(plugin
)
164 DEPENDS
+=+qt5base-core
+qt5base-network
167 ####### generic / input
169 define Package
/qt5base-plugin-input-libinput
170 $(call Package
/qt5base
/Default
)
171 TITLE
+=libinput
(plugin
)
172 DEPENDS
+=+qt5base-core
+qt5base-gui
+libinput
175 define Package
/qt5base-plugin-input-evdevkeyboard
176 $(call Package
/qt5base
/Default
)
177 TITLE
+=evdev keyboard
(plugin
)
178 DEPENDS
+=+qt5base-core
+qt5base-gui
+libudev
+PACKAGE_qt5base-plugin-input-libinput
:libinput
181 define Package
/qt5base-plugin-input-evdevmouse
182 $(call Package
/qt5base
/Default
)
183 TITLE
+=evdev mouse
(plugin
)
184 DEPENDS
+=+qt5base-core
+qt5base-gui
+libudev
+PACKAGE_qt5base-plugin-input-libinput
:libinput
187 define Package
/qt5base-plugin-input-evdevtablet
188 $(call Package
/qt5base
/Default
)
189 TITLE
+=evdev tablet
(plugin
)
190 DEPENDS
+=+qt5base-core
+qt5base-gui
+libudev
+PACKAGE_qt5base-plugin-input-libinput
:libinput
193 define Package
/qt5base-plugin-input-evdevtouch
194 $(call Package
/qt5base
/Default
)
195 TITLE
+=evdev touch
(plugin
)
196 DEPENDS
+=+qt5base-core
+qt5base-gui
+libudev
+PACKAGE_qt5base-plugin-input-libinput
:libinput
201 #define Package/qt5base-plugin-imageformats-gif
202 # $(call Package/qt5base/Default)
203 #TITLE+=imageformat gif (plugin)
204 # DEPENDS+=+qt5base-core +qt5base-gui
207 define Package
/qt5base-plugin-imageformats-ico
208 $(call Package
/qt5base
/Default
)
209 TITLE
+=imageformat ico
(plugin
)
210 DEPENDS
+=+qt5base-core
+qt5base-gui
213 define Package
/qt5base-plugin-imageformats-jpeg
214 $(call Package
/qt5base
/Default
)
215 TITLE
+=imageformat jpeg
(plugin
)
216 DEPENDS
+=+qt5base-core
+qt5base-gui
+libjpeg
221 #define Package/qt5base-plugin-platforms-eglfs
222 # $(call Package/qt5base/Default)
223 # TITLE+=platform eglfs (plugin)
224 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
227 #define Package/qt5base-plugin-platforms-minimalegl
228 # $(call Package/qt5base/Default)
229 # TITLE+=platform minimalegl (plugin)
230 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
233 define Package
/qt5base-plugin-platforms-linuxfb
234 $(call Package
/qt5base
/Default
)
235 TITLE
+=platform linuxfb
(plugin
)
236 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
+libudev
+PACKAGE_qt5base-plugin-input-libinput
:libinput
239 define Package
/qt5base-plugin-platforms-minimal
240 $(call Package
/qt5base
/Default
)
241 TITLE
+=platform minimal
(plugin
)
242 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
245 define Package
/qt5base-plugin-platforms-offscreen
246 $(call Package
/qt5base
/Default
)
247 TITLE
+=platform offscreen
(plugin
)
248 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
251 define Package
/qt5base-plugin-platforms-vnc
252 $(call Package
/qt5base
/Default
)
253 TITLE
+=platform vnc
(plugin
)
254 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-network
+libfreetype
+fontconfig
+libudev
+PACKAGE_qt5base-plugin-input-libinput
:libinput
261 #define Package/qt5base-plugin-sqldrivers-sqlite
262 # $(call Package/qt5base/Default)
263 # TITLE+=sqldriver sqlite (plugin)
264 # DEPENDS+=+qt5base-core +qt5base-sql +libsqlite3
267 define Package
/qt5base-examples
268 $(call Package
/qt5base
/Default
)
277 +qt5base-printSupport \
278 +qt5base-concurrent \
283 $(call Build
/Prepare
/Default
)
285 .
/files
/mkspecs
/linux-openwrt-g
++ \
286 $(PKG_BUILD_DIR
)/mkspecs
/
290 # -I$(STAGING_DIR)/usr/include/freetype2 \
291 # -I$(STAGING_DIR)/usr/include/libdrm
293 define Build
/Configure
294 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
295 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
296 # hence we use the TARGET_* nomenclature.
297 ( cd
$(PKG_BUILD_DIR
) ; \
298 TARGET_CROSS
="$(TARGET_CROSS)" \
299 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
300 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
301 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
303 -prefix $(QT_INSTALL_PREFIX
) \
304 -extprefix
$(QT_EXTPREFIX
) \
305 -hostprefix
$(QT_HOST_PREFIX
) \
306 -hostdatadir
$(QT_HOST_PREFIX
)/share \
308 -bindir $(QT_INSTALL_BINS
) \
309 -headerdir
$(QT_INSTALL_HEADERS
) \
310 -libdir $(QT_INSTALL_LIBS
) \
311 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
312 -plugindir
$(QT_INSTALL_PLUGINS
) \
313 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
314 -importdir
$(QT_INSTALL_IMPORTS
) \
315 -qmldir
$(QT_INSTALL_QML
) \
316 -datadir $(QT_INSTALL_DATA
) \
317 -docdir
$(QT_INSTALL_DOCS
) \
318 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
319 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
320 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
321 -testsdir
$(QT_INSTALL_TESTS
) \
322 -hostbindir
$(QT_HOST_BINS
) \
323 -hostlibdir
$(QT_HOST_LIBS
) \
324 -hostdatadir
$(QT_HOST_DATA
) \
329 -no-optimized-tools \
333 -xplatform linux-openwrt-g
++ \
341 $(if
$(findstring -mdsp
,$(TARGET_CFLAGS
)),,-no-mips_dsp
) \
342 $(if
$(findstring -mdspr2
,$(TARGET_CFLAGS
)),,-no-mips_dspr2
) \
344 -no-reduce-relocations \
346 -no-use-gold-linker \
347 -no-warnings-are-errors \
349 -no-optimized-qmake \
352 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-compile-examples
,-no-compile-examples
) \
353 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-make examples
,-nomake examples
) \
354 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-gui
,-no-gui
) \
355 $(if
$(CONFIG_PACKAGE_qt5base-widgets
),-widgets
,-no-widgets
) \
359 -system-doubleconversion \
363 $(if
$(CONFIG_BUILD_NLS
),-no-iconv
,-no-iconv
) \
370 $(if
$(CONFIG_PACKAGE_qt5base-network
),-openssl-linked
,-no-openssl
) \
379 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
),,-qpa minimal
) \
380 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),,-qpa linuxfb
) \
386 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),-linuxfb
,-no-linuxfb
) \
391 $(if
$(CONFIG_PACKAGE_qt5base-plugin-input-libinput
),-libinput
,-no-libinput
) \
396 -no-xkbcommon-evdev \
398 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-ico
),-ico
,-no-ico
) \
399 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-system-libpng
,-no-libpng
) \
400 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg
),-system-libjpeg
,-no-libjpeg
) \
416 define Host
/Configure
417 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
418 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
419 # hence we use the TARGET_* nomenclature.
420 ( cd
$(HOST_BUILD_DIR
) ; \
421 TARGET_CFLAGS
="$(HOST_CFLAGS)" \
422 TARGET_CXXFLAGS
="$(HOST_CFLAGS) $(HOST_CXXFLAGS)" \
423 TARGET_LDFLAGS
="$(HOST_LDFLAGS)" \
425 -prefix $(STAGING_DIR_HOST
) \
426 -hostprefix
$(STAGING_DIR_HOST
) \
427 -hostdatadir
$(STAGING_DIR_HOST
)/share \
428 -datadir $(STAGING_DIR_HOST
)/share \
429 -archdatadir
$(STAGING_DIR_HOST
)/lib \
435 -no-optimized-tools \
441 -no-compile-examples \
447 -qt-doubleconversion \
479 -no-xkbcommon-evdev \
498 define Build
/InstallDev
500 $(STAGING_DIR
)/host
/mk
504 $(STAGING_DIR
)/host
/mk
/
506 $(call Build
/Install
/HostFiles
,$(1))
507 $(call Build
/Install
/Headers
,$(1))
508 $(call Build
/Install
/Libs
,$(1),*)
512 $(call Host
/Install
/Default
)
515 $(STAGING_DIR_HOST
)/bin \
516 $(STAGING_DIR_HOST
)/lib \
517 $(STAGING_DIR_HOST
)/include \
518 $(STAGING_DIR_HOST
)/share
521 $(HOST_INSTALL_DIR
)/lib
/* \
522 $(STAGING_DIR_HOST
)/lib
/
525 $(HOST_INSTALL_DIR
)/include/* \
526 $(STAGING_DIR_HOST
)/include/
529 $(HOST_INSTALL_DIR
)/share
/* \
530 $(STAGING_DIR_HOST
)/share
/
533 $(HOST_INSTALL_DIR
)/bin
/* \
534 $(STAGING_DIR_HOST
)/bin
/
537 define Package
/qt5base-concurrent
/install
538 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
541 define Package
/qt5base-core
/install
542 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
545 define Package
/qt5base-gl
/install
546 $(call Build
/Install
/Libs
,$(1),libQt5OpenGL
)
549 define Package
/qt5base-gui
/install
550 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
553 define Package
/qt5base-network
/install
554 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
557 define Package
/qt5base-printSupport
/install
558 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
561 define Package
/qt5base-sql
/install
562 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
565 define Package
/qt5base-test
/install
566 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
569 define Package
/qt5base-widgets
/install
570 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
573 define Package
/qt5base-xml
/install
574 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
577 define Package
/qt5base-plugin-bearer-generic
/install
578 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
581 define Package
/qt5base-plugin-input-libinput
/install
582 $(call Build
/Install
/Plugins
,$(1),generic
,libqlibinputplugin
)
585 define Package
/qt5base-plugin-input-evdevkeyboard
/install
586 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
589 define Package
/qt5base-plugin-input-evdevmouse
/install
590 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
593 define Package
/qt5base-plugin-input-evdevtablet
/install
594 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
597 define Package
/qt5base-plugin-input-evdevtouch
/install
598 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
601 #define Package/qt5base-plugin-imageformats-gif/install
602 # $(call Build/Install/Plugins,$(1),imageformats,libqgif)
605 define Package
/qt5base-plugin-imageformats-ico
/install
606 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
609 define Package
/qt5base-plugin-imageformats-jpeg
/install
610 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
613 define Package
/qt5base-plugin-platforms-linuxfb
/install
614 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
617 define Package
/qt5base-plugin-platforms-vnc
/install
618 $(call Build
/Install
/Plugins
,$(1),platforms
,libqvnc
)
621 #define Package/qt5base-plugin-platforms-eglfs/install
622 # $(call Build/Install/Plugins,$(1),platforms,libqeglfs)
625 #define Package/qt5base-plugin-platforms-minimalegl/install
626 # $(call Build/Install/Plugins,$(1),platforms,libqminimalegl)
629 define Package
/qt5base-plugin-platforms-minimal
/install
630 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
633 define Package
/qt5base-plugin-platforms-offscreen
/install
634 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
637 #define Package/qt5base-plugin-sqldrivers-sqlite/install
638 # $(call Build/Install/Plugins,$(1),sqldrivers,libqsqlite)
641 define Package
/qt5base-examples
/install
642 $(call Build
/Install
/Examples
,$(1))
645 # $(eval $(call BuildPackage,qt5base))
646 $(eval
$(call BuildPackage
,qt5base-concurrent
))
647 $(eval
$(call BuildPackage
,qt5base-core
))
648 $(eval
$(call BuildPackage
,qt5base-gui
))
649 $(eval
$(call BuildPackage
,qt5base-gl
))
650 $(eval
$(call BuildPackage
,qt5base-network
))
651 $(eval
$(call BuildPackage
,qt5base-printSupport
))
652 $(eval
$(call BuildPackage
,qt5base-sql
))
653 $(eval
$(call BuildPackage
,qt5base-test
))
654 $(eval
$(call BuildPackage
,qt5base-widgets
))
655 $(eval
$(call BuildPackage
,qt5base-xml
))
656 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
657 $(eval
$(call BuildPackage
,qt5base-plugin-input-libinput
))
658 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
659 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
660 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
661 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
662 #$(eval $(call BuildPackage,qt5base-plugin-imageformats-gif))
663 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
664 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
665 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
666 #$(eval $(call BuildPackage,qt5base-plugin-platforms-eglfs))
667 #$(eval $(call BuildPackage,qt5base-plugin-platforms-minimalegl))
668 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
669 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
670 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-vnc
))
671 #$(eval $(call BuildPackage,qt5base-plugin-sqldrivers-sqlite))
672 $(eval
$(call BuildPackage
,qt5base-examples
))
673 $(eval
$(call HostBuild
))