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-platforms-eglfs \
57 # CONFIG_PACKAGE_qt5base-plugin-platforms-minimalegl \
59 # Do not use sstrip for QT5. When sstrip is used the QT5 plugin loading does
60 # not work, because of QT''s internal elf parser, see
61 # https://bugreports.qt.io/browse/QTBUG-52567
62 # Use the code from the gcc package to use strip instaed.
63 ifneq ($(CONFIG_USE_SSTRIP
),)
64 STRIP
:=$(TARGET_CROSS
)strip $(call qstrip
,$(CONFIG_STRIP_ARGS
))
66 export CROSS
="$(TARGET_CROSS)" \
67 $(if
$(CONFIG_KERNEL_KALLSYMS
),NO_RENAME
=1) \
68 $(if
$(CONFIG_KERNEL_PROFILING
),KEEP_SYMBOLS
=1); \
69 NM
="$(TARGET_CROSS)nm" \
71 STRIP_KMOD
="$(SCRIPT_DIR)/strip-kmod.sh" \
72 $(SCRIPT_DIR
)/rstrip.sh
75 define Package
/qt5base
/Default
76 SECTION
:=video-frameworks
78 SUBMENU
:=Frameworks and Toolkits
81 MAINTAINER
:=Mirko Vogt
<mirko@openwrt.org
>
84 # define Package/qt5base
85 # $(call Package/qt5base/Default)
90 define Package
/qt5base-concurrent
91 $(call Package
/qt5base
/Default
)
93 DEPENDS
+=+qt5base-core
96 define Package
/qt5base-gl
97 $(call Package
/qt5base
/Default
)
99 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
102 define Package
/qt5base-core
103 $(call Package
/qt5base
/Default
)
105 DEPENDS
+=+libpthread
+zlib
+libpcre2-16
+libstdcpp
+librt
+libdouble-conversion
$(ICONV_DEPENDS
) #+icu
108 define Package
/qt5base-gui
109 $(call Package
/qt5base
/Default
)
111 DEPENDS
+=+qt5base-core
+qt5quick2-2d-sw-renderer-GLstubs
+libpng
+fontconfig
+libfreetype
114 define Package
/qt5base-network
115 $(call Package
/qt5base
/Default
)
117 DEPENDS
+=+qt5base-core
+libopenssl
120 # seems to be only present as static lib
121 # define Package/qt5base-paltformSupport
122 # $(call Package/qt5base/Default)
126 define Package
/qt5base-printSupport
127 $(call Package
/qt5base
/Default
)
129 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
132 define Package
/qt5base-sql
133 $(call Package
/qt5base
/Default
)
135 DEPENDS
+=+qt5base-core
138 define Package
/qt5base-test
139 $(call Package
/qt5base
/Default
)
141 DEPENDS
+=+qt5base-core
144 define Package
/qt5base-widgets
145 $(call Package
/qt5base
/Default
)
147 DEPENDS
+=+qt5base-core
+qt5base-gui
150 define Package
/qt5base-xml
151 $(call Package
/qt5base
/Default
)
153 DEPENDS
+=+qt5base-core
160 define Package
/qt5base-plugin-bearer-generic
161 $(call Package
/qt5base
/Default
)
162 TITLE
+=bearer
(plugin
)
163 DEPENDS
+=+qt5base-core
+qt5base-network
166 ####### generic / input
168 define Package
/qt5base-plugin-input-libinput
169 $(call Package
/qt5base
/Default
)
170 TITLE
+=libinput
(plugin
)
171 DEPENDS
+=+qt5base-core
+qt5base-gui
+libinput
174 define Package
/qt5base-plugin-input-evdevkeyboard
175 $(call Package
/qt5base
/Default
)
176 TITLE
+=evdev keyboard
(plugin
)
177 DEPENDS
+=+qt5base-core
+qt5base-gui
+libinput
180 define Package
/qt5base-plugin-input-evdevmouse
181 $(call Package
/qt5base
/Default
)
182 TITLE
+=evdev mouse
(plugin
)
183 DEPENDS
+=+qt5base-core
+qt5base-gui
+libinput
186 define Package
/qt5base-plugin-input-evdevtablet
187 $(call Package
/qt5base
/Default
)
188 TITLE
+=evdev tablet
(plugin
)
189 DEPENDS
+=+qt5base-core
+qt5base-gui
+libinput
192 define Package
/qt5base-plugin-input-evdevtouch
193 $(call Package
/qt5base
/Default
)
194 TITLE
+=evdev touch
(plugin
)
195 DEPENDS
+=+qt5base-core
+qt5base-gui
+libinput
200 #define Package/qt5base-plugin-imageformats-gif
201 # $(call Package/qt5base/Default)
202 #TITLE+=imageformat gif (plugin)
203 # DEPENDS+=+qt5base-core +qt5base-gui
206 define Package
/qt5base-plugin-imageformats-ico
207 $(call Package
/qt5base
/Default
)
208 TITLE
+=imageformat ico
(plugin
)
209 DEPENDS
+=+qt5base-core
+qt5base-gui
212 define Package
/qt5base-plugin-imageformats-jpeg
213 $(call Package
/qt5base
/Default
)
214 TITLE
+=imageformat jpeg
(plugin
)
215 DEPENDS
+=+qt5base-core
+qt5base-gui
+libjpeg
220 #define Package/qt5base-plugin-platforms-eglfs
221 # $(call Package/qt5base/Default)
222 # TITLE+=platform eglfs (plugin)
223 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
226 #define Package/qt5base-plugin-platforms-minimalegl
227 # $(call Package/qt5base/Default)
228 # TITLE+=platform minimalegl (plugin)
229 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
232 define Package
/qt5base-plugin-platforms-linuxfb
233 $(call Package
/qt5base
/Default
)
234 TITLE
+=platform linuxfb
(plugin
)
235 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
+libinput
238 define Package
/qt5base-plugin-platforms-minimal
239 $(call Package
/qt5base
/Default
)
240 TITLE
+=platform minimal
(plugin
)
241 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
244 define Package
/qt5base-plugin-platforms-offscreen
245 $(call Package
/qt5base
/Default
)
246 TITLE
+=platform offscreen
(plugin
)
247 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
250 define Package
/qt5base-plugin-platforms-vnc
251 $(call Package
/qt5base
/Default
)
252 TITLE
+=platform vnc
(plugin
)
253 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-network
+libfreetype
+fontconfig
+libinput
260 #define Package/qt5base-plugin-sqldrivers-sqlite
261 # $(call Package/qt5base/Default)
262 # TITLE+=sqldriver sqlite (plugin)
263 # DEPENDS+=+qt5base-core +qt5base-sql +libsqlite3
266 define Package
/qt5base-examples
267 $(call Package
/qt5base
/Default
)
276 +qt5base-printSupport \
277 +qt5base-concurrent \
282 $(call Build
/Prepare
/Default
)
284 .
/files
/mkspecs
/linux-openwrt-g
++ \
285 $(PKG_BUILD_DIR
)/mkspecs
/
289 # -I$(STAGING_DIR)/usr/include/freetype2 \
290 # -I$(STAGING_DIR)/usr/include/libdrm
292 define Build
/Configure
293 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
294 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
295 # hence we use the TARGET_* nomenclature.
296 ( cd
$(PKG_BUILD_DIR
) ; \
297 TARGET_CROSS
="$(TARGET_CROSS)" \
298 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
299 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
300 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
302 -prefix $(QT_INSTALL_PREFIX
) \
303 -extprefix
$(QT_EXTPREFIX
) \
304 -hostprefix
$(QT_HOST_PREFIX
) \
305 -hostdatadir
$(QT_HOST_PREFIX
)/share \
307 -bindir $(QT_INSTALL_BINS
) \
308 -headerdir
$(QT_INSTALL_HEADERS
) \
309 -libdir $(QT_INSTALL_LIBS
) \
310 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
311 -plugindir
$(QT_INSTALL_PLUGINS
) \
312 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
313 -importdir
$(QT_INSTALL_IMPORTS
) \
314 -qmldir
$(QT_INSTALL_QML
) \
315 -datadir $(QT_INSTALL_DATA
) \
316 -docdir
$(QT_INSTALL_DOCS
) \
317 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
318 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
319 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
320 -testsdir
$(QT_INSTALL_TESTS
) \
321 -hostbindir
$(QT_HOST_BINS
) \
322 -hostlibdir
$(QT_HOST_LIBS
) \
323 -hostdatadir
$(QT_HOST_DATA
) \
328 -no-optimized-tools \
332 -xplatform linux-openwrt-g
++ \
340 $(if
$(findstring -mdsp
,$(TARGET_CFLAGS
)),,-no-mips_dsp
) \
341 $(if
$(findstring -mdspr2
,$(TARGET_CFLAGS
)),,-no-mips_dspr2
) \
343 -no-reduce-relocations \
345 -no-use-gold-linker \
346 -no-warnings-are-errors \
348 -no-optimized-qmake \
351 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-compile-examples
,-no-compile-examples
) \
352 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-make examples
,-nomake examples
) \
353 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-gui
,-no-gui
) \
354 $(if
$(CONFIG_PACKAGE_qt5base-widgets
),-widgets
,-no-widgets
) \
358 -system-doubleconversion \
362 $(if
$(CONFIG_BUILD_NLS
),-no-iconv
,-no-iconv
) \
369 $(if
$(CONFIG_PACKAGE_qt5base-network
),-openssl-linked
,-no-openssl
) \
378 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
),,-qpa minimal
) \
379 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),,-qpa linuxfb
) \
385 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),-linuxfb
,-no-linuxfb
) \
394 -no-xkbcommon-evdev \
396 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-ico
),-ico
,-no-ico
) \
397 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-system-libpng
,-no-libpng
) \
398 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg
),-system-libjpeg
,-no-libjpeg
) \
414 define Host
/Configure
415 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
416 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
417 # hence we use the TARGET_* nomenclature.
418 ( cd
$(HOST_BUILD_DIR
) ; \
419 TARGET_CFLAGS
="$(HOST_CFLAGS)" \
420 TARGET_CXXFLAGS
="$(HOST_CFLAGS) $(HOST_CXXFLAGS)" \
421 TARGET_LDFLAGS
="$(HOST_LDFLAGS)" \
423 -prefix $(STAGING_DIR_HOST
) \
424 -hostprefix
$(STAGING_DIR_HOST
) \
425 -hostdatadir
$(STAGING_DIR_HOST
)/share \
426 -datadir $(STAGING_DIR_HOST
)/share \
427 -archdatadir
$(STAGING_DIR_HOST
)/lib \
433 -no-optimized-tools \
439 -no-compile-examples \
445 -qt-doubleconversion \
477 -no-xkbcommon-evdev \
496 define Build
/InstallDev
498 $(STAGING_DIR
)/host
/mk
502 $(STAGING_DIR
)/host
/mk
/
504 $(call Build
/Install
/HostFiles
,$(1))
505 $(call Build
/Install
/Headers
,$(1))
506 $(call Build
/Install
/Libs
,$(1),*)
510 $(call Host
/Install
/Default
)
513 $(STAGING_DIR_HOST
)/bin \
514 $(STAGING_DIR_HOST
)/lib \
515 $(STAGING_DIR_HOST
)/include \
516 $(STAGING_DIR_HOST
)/share
519 $(HOST_INSTALL_DIR
)/lib
/* \
520 $(STAGING_DIR_HOST
)/lib
/
523 $(HOST_INSTALL_DIR
)/include/* \
524 $(STAGING_DIR_HOST
)/include/
527 $(HOST_INSTALL_DIR
)/share
/* \
528 $(STAGING_DIR_HOST
)/share
/
531 $(HOST_INSTALL_DIR
)/bin
/* \
532 $(STAGING_DIR_HOST
)/bin
/
535 define Package
/qt5base-concurrent
/install
536 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
539 define Package
/qt5base-core
/install
540 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
543 define Package
/qt5base-gl
/install
544 $(call Build
/Install
/Libs
,$(1),libQt5OpenGL
)
547 define Package
/qt5base-gui
/install
548 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
551 define Package
/qt5base-network
/install
552 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
555 define Package
/qt5base-printSupport
/install
556 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
559 define Package
/qt5base-sql
/install
560 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
563 define Package
/qt5base-test
/install
564 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
567 define Package
/qt5base-widgets
/install
568 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
571 define Package
/qt5base-xml
/install
572 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
575 define Package
/qt5base-plugin-bearer-generic
/install
576 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
579 define Package
/qt5base-plugin-input-libinput
/install
580 $(call Build
/Install
/Plugins
,$(1),generic
,libqlibinputplugin
)
583 define Package
/qt5base-plugin-input-evdevkeyboard
/install
584 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
587 define Package
/qt5base-plugin-input-evdevmouse
/install
588 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
591 define Package
/qt5base-plugin-input-evdevtablet
/install
592 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
595 define Package
/qt5base-plugin-input-evdevtouch
/install
596 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
599 #define Package/qt5base-plugin-imageformats-gif/install
600 # $(call Build/Install/Plugins,$(1),imageformats,libqgif)
603 define Package
/qt5base-plugin-imageformats-ico
/install
604 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
607 define Package
/qt5base-plugin-imageformats-jpeg
/install
608 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
611 define Package
/qt5base-plugin-platforms-linuxfb
/install
612 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
615 define Package
/qt5base-plugin-platforms-vnc
/install
616 $(call Build
/Install
/Plugins
,$(1),platforms
,libqvnc
)
619 #define Package/qt5base-plugin-platforms-eglfs/install
620 # $(call Build/Install/Plugins,$(1),platforms,libqeglfs)
623 #define Package/qt5base-plugin-platforms-minimalegl/install
624 # $(call Build/Install/Plugins,$(1),platforms,libqminimalegl)
627 define Package
/qt5base-plugin-platforms-minimal
/install
628 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
631 define Package
/qt5base-plugin-platforms-offscreen
/install
632 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
635 #define Package/qt5base-plugin-sqldrivers-sqlite/install
636 # $(call Build/Install/Plugins,$(1),sqldrivers,libqsqlite)
639 define Package
/qt5base-examples
/install
640 $(call Build
/Install
/Examples
,$(1))
643 # $(eval $(call BuildPackage,qt5base))
644 $(eval
$(call BuildPackage
,qt5base-concurrent
))
645 $(eval
$(call BuildPackage
,qt5base-core
))
646 $(eval
$(call BuildPackage
,qt5base-gui
))
647 $(eval
$(call BuildPackage
,qt5base-gl
))
648 $(eval
$(call BuildPackage
,qt5base-network
))
649 $(eval
$(call BuildPackage
,qt5base-printSupport
))
650 $(eval
$(call BuildPackage
,qt5base-sql
))
651 $(eval
$(call BuildPackage
,qt5base-test
))
652 $(eval
$(call BuildPackage
,qt5base-widgets
))
653 $(eval
$(call BuildPackage
,qt5base-xml
))
654 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
655 $(eval
$(call BuildPackage
,qt5base-plugin-input-libinput
))
656 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
657 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
658 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
659 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
660 #$(eval $(call BuildPackage,qt5base-plugin-imageformats-gif))
661 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
662 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
663 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
664 #$(eval $(call BuildPackage,qt5base-plugin-platforms-eglfs))
665 #$(eval $(call BuildPackage,qt5base-plugin-platforms-minimalegl))
666 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
667 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
668 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-vnc
))
669 #$(eval $(call BuildPackage,qt5base-plugin-sqldrivers-sqlite))
670 $(eval
$(call BuildPackage
,qt5base-examples
))
671 $(eval
$(call HostBuild
))