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
:=c17111ae02a44dc7be1ec2cf979a47ee9e58edf4904041a525c21f4fa53fc005
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
31 include $(INCLUDE_DIR
)/package.mk
32 include $(INCLUDE_DIR
)/host-build.mk
33 include $(INCLUDE_DIR
)/nls.mk
34 include .
/files
/qmake.mk
36 PKG_CONFIG_DEPENDS
:= \
37 CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg \
38 CONFIG_PACKAGE_qt5base-plugin-imageformats-png \
39 CONFIG_PACKAGE_qt5base-network \
40 CONFIG_PACKAGE_qt5base-gui \
41 CONFIG_PACKAGE_qt5base-gl \
42 CONFIG_PACKAGE_qt5base-widgets \
43 CONFIG_PACKAGE_qt5base-examples \
44 CONFIG_PACKAGE_qt5base-plugin-platforms-minimal \
45 CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \
46 # CONFIG_PACKAGE_qt5base-plugin-platforms-eglfs \
47 # CONFIG_PACKAGE_qt5base-plugin-platforms-minimalegl \
49 # Do not use sstrip for QT5. When sstrip is used the QT5 plugin loading does
50 # not work, because of QT''s internal elf parser, see
51 # https://bugreports.qt.io/browse/QTBUG-52567
52 # Use the code from the gcc package to use strip instaed.
53 ifneq ($(CONFIG_USE_SSTRIP
),)
54 STRIP
:=$(TARGET_CROSS
)strip $(call qstrip
,$(CONFIG_STRIP_ARGS
))
56 export CROSS
="$(TARGET_CROSS)" \
57 $(if
$(CONFIG_KERNEL_KALLSYMS
),NO_RENAME
=1) \
58 $(if
$(CONFIG_KERNEL_PROFILING
),KEEP_SYMBOLS
=1); \
59 NM
="$(TARGET_CROSS)nm" \
61 STRIP_KMOD
="$(SCRIPT_DIR)/strip-kmod.sh" \
62 $(SCRIPT_DIR
)/rstrip.sh
65 define Package
/qt5base
/Default
66 SECTION
:=video-frameworks
68 SUBMENU
:=Frameworks and Toolkits
71 MAINTAINER
:=Mirko Vogt
<mirko@openwrt.org
>
74 # define Package/qt5base
75 # $(call Package/qt5base/Default)
80 define Package
/qt5base-concurrent
81 $(call Package
/qt5base
/Default
)
83 DEPENDS
+=+qt5base-core
86 define Package
/qt5base-gl
87 $(call Package
/qt5base
/Default
)
89 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
92 define Package
/qt5base-core
93 $(call Package
/qt5base
/Default
)
95 DEPENDS
+=+libpthread
+zlib
+libpcre16
+libstdcpp
+librt
+libdouble-conversion
$(ICONV_DEPENDS
) #+icu
98 define Package
/qt5base-gui
99 $(call Package
/qt5base
/Default
)
101 DEPENDS
+=+qt5base-core
+qt5quick2-2d-sw-renderer-GLstubs
+libpng
+fontconfig
+libfreetype
+libudev
104 define Package
/qt5base-network
105 $(call Package
/qt5base
/Default
)
107 DEPENDS
+=+qt5base-core
+libopenssl
110 # seems to be only present as static lib
111 # define Package/qt5base-paltformSupport
112 # $(call Package/qt5base/Default)
116 define Package
/qt5base-printSupport
117 $(call Package
/qt5base
/Default
)
119 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
122 define Package
/qt5base-sql
123 $(call Package
/qt5base
/Default
)
125 DEPENDS
+=+qt5base-core
128 define Package
/qt5base-test
129 $(call Package
/qt5base
/Default
)
131 DEPENDS
+=+qt5base-core
134 define Package
/qt5base-widgets
135 $(call Package
/qt5base
/Default
)
137 DEPENDS
+=+qt5base-core
+qt5base-gui
140 define Package
/qt5base-xml
141 $(call Package
/qt5base
/Default
)
143 DEPENDS
+=+qt5base-core
150 define Package
/qt5base-plugin-bearer-generic
151 $(call Package
/qt5base
/Default
)
152 TITLE
+=bearer
(plugin
)
153 DEPENDS
+=+qt5base-core
+qt5base-network
156 ####### generic / input
158 define Package
/qt5base-plugin-input-evdevkeyboard
159 $(call Package
/qt5base
/Default
)
160 TITLE
+=evdev keyboard
(plugin
)
161 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
164 define Package
/qt5base-plugin-input-evdevmouse
165 $(call Package
/qt5base
/Default
)
166 TITLE
+=evdev mouse
(plugin
)
167 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
170 define Package
/qt5base-plugin-input-evdevtablet
171 $(call Package
/qt5base
/Default
)
172 TITLE
+=evdev tablet
(plugin
)
173 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
176 define Package
/qt5base-plugin-input-evdevtouch
177 $(call Package
/qt5base
/Default
)
178 TITLE
+=evdev touch
(plugin
)
179 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
184 #define Package/qt5base-plugin-imageformats-gif
185 # $(call Package/qt5base/Default)
186 #TITLE+=imageformat gif (plugin)
187 # DEPENDS+=+qt5base-core +qt5base-gui
190 define Package
/qt5base-plugin-imageformats-ico
191 $(call Package
/qt5base
/Default
)
192 TITLE
+=imageformat ico
(plugin
)
193 DEPENDS
+=+qt5base-core
+qt5base-gui
196 define Package
/qt5base-plugin-imageformats-jpeg
197 $(call Package
/qt5base
/Default
)
198 TITLE
+=imageformat jpeg
(plugin
)
199 DEPENDS
+=+qt5base-core
+qt5base-gui
+libjpeg
204 #define Package/qt5base-plugin-platforms-eglfs
205 # $(call Package/qt5base/Default)
206 # TITLE+=platform eglfs (plugin)
207 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
210 #define Package/qt5base-plugin-platforms-minimalegl
211 # $(call Package/qt5base/Default)
212 # TITLE+=platform minimalegl (plugin)
213 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
216 define Package
/qt5base-plugin-platforms-linuxfb
217 $(call Package
/qt5base
/Default
)
218 TITLE
+=platform linuxfb
(plugin
)
219 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
222 define Package
/qt5base-plugin-platforms-minimal
223 $(call Package
/qt5base
/Default
)
224 TITLE
+=platform minimal
(plugin
)
225 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
228 define Package
/qt5base-plugin-platforms-offscreen
229 $(call Package
/qt5base
/Default
)
230 TITLE
+=platform offscreen
(plugin
)
231 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
234 define Package
/qt5base-plugin-platforms-vnc
235 $(call Package
/qt5base
/Default
)
236 TITLE
+=platform vnc
(plugin
)
237 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-network
+libfreetype
+fontconfig
244 #define Package/qt5base-plugin-sqldrivers-sqlite
245 # $(call Package/qt5base/Default)
246 # TITLE+=sqldriver sqlite (plugin)
247 # DEPENDS+=+qt5base-core +qt5base-sql +libsqlite3
250 define Package
/qt5base-examples
251 $(call Package
/qt5base
/Default
)
260 +qt5base-printSupport \
261 +qt5base-concurrent \
266 $(call Build
/Prepare
/Default
)
268 .
/files
/mkspecs
/linux-openwrt-g
++ \
269 $(PKG_BUILD_DIR
)/mkspecs
/
273 # -I$(STAGING_DIR)/usr/include/freetype2 \
274 # -I$(STAGING_DIR)/usr/include/libdrm
276 define Build
/Configure
277 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
278 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
279 # hence we use the TARGET_* nomenclature.
280 ( cd
$(PKG_BUILD_DIR
) ; \
281 TARGET_CROSS
="$(TARGET_CROSS)" \
282 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
283 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
284 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
286 -prefix $(QT_INSTALL_PREFIX
) \
287 -extprefix
$(QT_EXTPREFIX
) \
288 -hostprefix
$(QT_HOST_PREFIX
) \
289 -hostdatadir
$(QT_HOST_PREFIX
)/share \
291 -bindir $(QT_INSTALL_BINS
) \
292 -headerdir
$(QT_INSTALL_HEADERS
) \
293 -libdir $(QT_INSTALL_LIBS
) \
294 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
295 -plugindir
$(QT_INSTALL_PLUGINS
) \
296 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
297 -importdir
$(QT_INSTALL_IMPORTS
) \
298 -qmldir
$(QT_INSTALL_QML
) \
299 -datadir $(QT_INSTALL_DATA
) \
300 -docdir
$(QT_INSTALL_DOCS
) \
301 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
302 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
303 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
304 -testsdir
$(QT_INSTALL_TESTS
) \
305 -hostbindir
$(QT_HOST_BINS
) \
306 -hostlibdir
$(QT_HOST_LIBS
) \
307 -hostdatadir
$(QT_HOST_DATA
) \
312 -no-optimized-tools \
316 -xplatform linux-openwrt-g
++ \
324 $(if
$(findstring -mdsp
,$(TARGET_CFLAGS
)),,-no-mips_dsp
) \
325 $(if
$(findstring -mdspr2
,$(TARGET_CFLAGS
)),,-no-mips_dspr2
) \
327 -no-reduce-relocations \
329 -no-use-gold-linker \
330 -no-warnings-are-errors \
332 -no-optimized-qmake \
335 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-compile-examples
,-no-compile-examples
) \
336 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-make examples
,-nomake examples
) \
337 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-gui
,-no-gui
) \
338 $(if
$(CONFIG_PACKAGE_qt5base-widgets
),-widgets
,-no-widgets
) \
342 -system-doubleconversion \
346 $(if
$(CONFIG_BUILD_NLS
),-no-iconv
,-no-iconv
) \
353 $(if
$(CONFIG_PACKAGE_qt5base-network
),-openssl-linked
,-no-openssl
) \
362 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
),,-qpa minimal
) \
363 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),,-qpa linuxfb
) \
369 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),-linuxfb
,-no-linuxfb
) \
378 -no-xkbcommon-evdev \
380 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-ico
),-ico
,-no-ico
) \
381 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-system-libpng
,-no-libpng
) \
382 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg
),-system-libjpeg
,-no-libjpeg
) \
398 define Host
/Configure
399 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
400 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
401 # hence we use the TARGET_* nomenclature.
402 ( cd
$(HOST_BUILD_DIR
) ; \
403 TARGET_CFLAGS
="$(HOST_CFLAGS)" \
404 TARGET_CXXFLAGS
="$(HOST_CFLAGS) $(HOST_CXXFLAGS)" \
405 TARGET_LDFLAGS
="$(HOST_LDFLAGS)" \
407 -prefix $(STAGING_DIR_HOST
) \
408 -hostprefix
$(STAGING_DIR_HOST
) \
409 -hostdatadir
$(STAGING_DIR_HOST
)/share \
410 -datadir $(STAGING_DIR_HOST
)/share \
411 -archdatadir
$(STAGING_DIR_HOST
)/lib \
417 -no-optimized-tools \
423 -no-compile-examples \
429 -qt-doubleconversion \
461 -no-xkbcommon-evdev \
480 define Build
/InstallDev
482 $(STAGING_DIR
)/host
/mk
486 $(STAGING_DIR
)/host
/mk
/
488 $(call Build
/Install
/HostFiles
,$(1))
489 $(call Build
/Install
/Headers
,$(1))
490 $(call Build
/Install
/Libs
,$(1),*)
494 $(call Host
/Install
/Default
)
497 $(STAGING_DIR_HOST
)/bin \
498 $(STAGING_DIR_HOST
)/lib \
499 $(STAGING_DIR_HOST
)/include \
500 $(STAGING_DIR_HOST
)/share
503 $(HOST_INSTALL_DIR
)/lib
/* \
504 $(STAGING_DIR_HOST
)/lib
/
507 $(HOST_INSTALL_DIR
)/include/* \
508 $(STAGING_DIR_HOST
)/include/
511 $(HOST_INSTALL_DIR
)/share
/* \
512 $(STAGING_DIR_HOST
)/share
/
515 $(HOST_INSTALL_DIR
)/bin
/qmake \
516 $(STAGING_DIR_HOST
)/bin
/qmake_host
519 define Package
/qt5base-concurrent
/install
520 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
523 define Package
/qt5base-core
/install
524 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
527 define Package
/qt5base-gl
/install
528 $(call Build
/Install
/Libs
,$(1),libQt5OpenGL
)
531 define Package
/qt5base-gui
/install
532 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
535 define Package
/qt5base-network
/install
536 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
539 define Package
/qt5base-printSupport
/install
540 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
543 define Package
/qt5base-sql
/install
544 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
547 define Package
/qt5base-test
/install
548 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
551 define Package
/qt5base-widgets
/install
552 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
555 define Package
/qt5base-xml
/install
556 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
559 define Package
/qt5base-plugin-bearer-generic
/install
560 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
563 define Package
/qt5base-plugin-input-evdevkeyboard
/install
564 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
567 define Package
/qt5base-plugin-input-evdevmouse
/install
568 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
571 define Package
/qt5base-plugin-input-evdevtablet
/install
572 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
575 define Package
/qt5base-plugin-input-evdevtouch
/install
576 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
579 #define Package/qt5base-plugin-imageformats-gif/install
580 # $(call Build/Install/Plugins,$(1),imageformats,libqgif)
583 define Package
/qt5base-plugin-imageformats-ico
/install
584 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
587 define Package
/qt5base-plugin-imageformats-jpeg
/install
588 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
591 define Package
/qt5base-plugin-platforms-linuxfb
/install
592 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
595 define Package
/qt5base-plugin-platforms-vnc
/install
596 $(call Build
/Install
/Plugins
,$(1),platforms
,libqvnc
)
599 #define Package/qt5base-plugin-platforms-eglfs/install
600 # $(call Build/Install/Plugins,$(1),platforms,libqeglfs)
603 #define Package/qt5base-plugin-platforms-minimalegl/install
604 # $(call Build/Install/Plugins,$(1),platforms,libqminimalegl)
607 define Package
/qt5base-plugin-platforms-minimal
/install
608 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
611 define Package
/qt5base-plugin-platforms-offscreen
/install
612 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
615 #define Package/qt5base-plugin-sqldrivers-sqlite/install
616 # $(call Build/Install/Plugins,$(1),sqldrivers,libqsqlite)
619 define Package
/qt5base-examples
/install
620 $(call Build
/Install
/Examples
,$(1))
623 # $(eval $(call BuildPackage,qt5base))
624 $(eval
$(call BuildPackage
,qt5base-concurrent
))
625 $(eval
$(call BuildPackage
,qt5base-core
))
626 $(eval
$(call BuildPackage
,qt5base-gui
))
627 $(eval
$(call BuildPackage
,qt5base-gl
))
628 $(eval
$(call BuildPackage
,qt5base-network
))
629 $(eval
$(call BuildPackage
,qt5base-printSupport
))
630 $(eval
$(call BuildPackage
,qt5base-sql
))
631 $(eval
$(call BuildPackage
,qt5base-test
))
632 $(eval
$(call BuildPackage
,qt5base-widgets
))
633 $(eval
$(call BuildPackage
,qt5base-xml
))
634 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
635 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
636 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
637 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
638 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
639 #$(eval $(call BuildPackage,qt5base-plugin-imageformats-gif))
640 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
641 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
642 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
643 #$(eval $(call BuildPackage,qt5base-plugin-platforms-eglfs))
644 #$(eval $(call BuildPackage,qt5base-plugin-platforms-minimalegl))
645 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
646 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
647 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-vnc
))
648 #$(eval $(call BuildPackage,qt5base-plugin-sqldrivers-sqlite))
649 $(eval
$(call BuildPackage
,qt5base-examples
))
650 $(eval
$(call HostBuild
))