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_MD5SUM
:=e71df4a4f99f8006e74d63c6a7d61af9
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
23 PKG_BUILD_DIR
=$(BUILD_DIR
)/$(PKG_SYS_NAME
)
25 PKG_BUILD_DEPENDS
:=librpc
29 include $(INCLUDE_DIR
)/package.mk
30 include $(INCLUDE_DIR
)/nls.mk
31 include .
/files
/qmake.mk
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 \
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
))
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" \
58 STRIP_KMOD
="$(SCRIPT_DIR)/strip-kmod.sh" \
59 $(SCRIPT_DIR
)/rstrip.sh
62 define Package
/qt5base
/Default
63 SECTION
:=video-frameworks
65 SUBMENU
:=Frameworks and Toolkits
68 MAINTAINER
:=Mirko Vogt
<mirko@openwrt.org
>
71 # define Package/qt5base
72 # $(call Package/qt5base/Default)
77 define Package
/qt5base-concurrent
78 $(call Package
/qt5base
/Default
)
80 DEPENDS
+=+qt5base-core
83 define Package
/qt5base-gl
84 $(call Package
/qt5base
/Default
)
86 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
89 define Package
/qt5base-core
90 $(call Package
/qt5base
/Default
)
92 DEPENDS
+=+libpthread
+zlib
+libpcre16
+libstdcpp
+librt
+libdouble-conversion
$(ICONV_DEPENDS
) #+icu
95 define Package
/qt5base-gui
96 $(call Package
/qt5base
/Default
)
98 DEPENDS
+=+qt5base-core
+qt5quick2-2d-sw-renderer-GLstubs
+libpng
+fontconfig
+libfreetype
+libudev
101 define Package
/qt5base-network
102 $(call Package
/qt5base
/Default
)
104 DEPENDS
+=+qt5base-core
+libopenssl
107 # seems to be only present as static lib
108 # define Package/qt5base-paltformSupport
109 # $(call Package/qt5base/Default)
113 define Package
/qt5base-printSupport
114 $(call Package
/qt5base
/Default
)
116 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
119 define Package
/qt5base-sql
120 $(call Package
/qt5base
/Default
)
122 DEPENDS
+=+qt5base-core
125 define Package
/qt5base-test
126 $(call Package
/qt5base
/Default
)
128 DEPENDS
+=+qt5base-core
131 define Package
/qt5base-widgets
132 $(call Package
/qt5base
/Default
)
134 DEPENDS
+=+qt5base-core
+qt5base-gui
137 define Package
/qt5base-xml
138 $(call Package
/qt5base
/Default
)
140 DEPENDS
+=+qt5base-core
147 define Package
/qt5base-plugin-bearer-generic
148 $(call Package
/qt5base
/Default
)
149 TITLE
+=bearer
(plugin
)
150 DEPENDS
+=+qt5base-core
+qt5base-network
153 ####### generic / input
155 define Package
/qt5base-plugin-input-evdevkeyboard
156 $(call Package
/qt5base
/Default
)
157 TITLE
+=evdev keyboard
(plugin
)
158 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
161 define Package
/qt5base-plugin-input-evdevmouse
162 $(call Package
/qt5base
/Default
)
163 TITLE
+=evdev mouse
(plugin
)
164 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
167 define Package
/qt5base-plugin-input-evdevtablet
168 $(call Package
/qt5base
/Default
)
169 TITLE
+=evdev tablet
(plugin
)
170 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
173 define Package
/qt5base-plugin-input-evdevtouch
174 $(call Package
/qt5base
/Default
)
175 TITLE
+=evdev touch
(plugin
)
176 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
181 #define Package/qt5base-plugin-imageformats-gif
182 # $(call Package/qt5base/Default)
183 #TITLE+=imageformat gif (plugin)
184 # DEPENDS+=+qt5base-core +qt5base-gui
187 define Package
/qt5base-plugin-imageformats-ico
188 $(call Package
/qt5base
/Default
)
189 TITLE
+=imageformat ico
(plugin
)
190 DEPENDS
+=+qt5base-core
+qt5base-gui
193 define Package
/qt5base-plugin-imageformats-jpeg
194 $(call Package
/qt5base
/Default
)
195 TITLE
+=imageformat jpeg
(plugin
)
196 DEPENDS
+=+qt5base-core
+qt5base-gui
+libjpeg
201 #define Package/qt5base-plugin-platforms-eglfs
202 # $(call Package/qt5base/Default)
203 # TITLE+=platform eglfs (plugin)
204 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
207 #define Package/qt5base-plugin-platforms-minimalegl
208 # $(call Package/qt5base/Default)
209 # TITLE+=platform minimalegl (plugin)
210 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
213 define Package
/qt5base-plugin-platforms-linuxfb
214 $(call Package
/qt5base
/Default
)
215 TITLE
+=platform linuxfb
(plugin
)
216 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
219 define Package
/qt5base-plugin-platforms-minimal
220 $(call Package
/qt5base
/Default
)
221 TITLE
+=platform minimal
(plugin
)
222 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
225 define Package
/qt5base-plugin-platforms-offscreen
226 $(call Package
/qt5base
/Default
)
227 TITLE
+=platform offscreen
(plugin
)
228 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
231 define Package
/qt5base-plugin-platforms-vnc
232 $(call Package
/qt5base
/Default
)
233 TITLE
+=platform vnc
(plugin
)
234 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-network
+libfreetype
+fontconfig
241 #define Package/qt5base-plugin-sqldrivers-sqlite
242 # $(call Package/qt5base/Default)
243 # TITLE+=sqldriver sqlite (plugin)
244 # DEPENDS+=+qt5base-core +qt5base-sql +libsqlite3
247 define Package
/qt5base-examples
248 $(call Package
/qt5base
/Default
)
257 +qt5base-printSupport \
258 +qt5base-concurrent \
263 $(call Build
/Prepare
/Default
)
265 .
/files
/mkspecs
/linux-openwrt-g
++ \
266 $(PKG_BUILD_DIR
)/mkspecs
/
270 # -I$(STAGING_DIR)/usr/include/freetype2 \
271 # -I$(STAGING_DIR)/usr/include/libdrm
273 define Build
/Configure
274 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
275 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
276 # hence we use the TARGET_* nomenclature.
277 ( cd
$(PKG_BUILD_DIR
) ; \
278 TARGET_CROSS
="$(TARGET_CROSS)" \
279 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
280 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
281 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
283 -prefix $(QT_INSTALL_PREFIX
) \
284 -extprefix
$(QT_EXTPREFIX
) \
285 -hostprefix
$(QT_HOST_PREFIX
) \
287 -bindir $(QT_INSTALL_BINS
) \
288 -headerdir
$(QT_INSTALL_HEADERS
) \
289 -libdir $(QT_INSTALL_LIBS
) \
290 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
291 -plugindir
$(QT_INSTALL_PLUGINS
) \
292 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
293 -importdir
$(QT_INSTALL_IMPORTS
) \
294 -qmldir
$(QT_INSTALL_QML
) \
295 -datadir $(QT_INSTALL_DATA
) \
296 -docdir
$(QT_INSTALL_DOCS
) \
297 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
298 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
299 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
300 -testsdir
$(QT_INSTALL_TESTS
) \
301 -hostbindir
$(QT_HOST_BINS
) \
302 -hostlibdir
$(QT_HOST_LIBS
) \
303 -hostdatadir
$(QT_HOST_DATA
) \
308 -no-optimized-tools \
312 -xplatform linux-openwrt-g
++ \
320 $(if
$(findstring -mdsp
,$(TARGET_CFLAGS
)),,-no-mips_dsp
) \
321 $(if
$(findstring -mdspr2
,$(TARGET_CFLAGS
)),,-no-mips_dspr2
) \
323 -no-reduce-relocations \
325 -no-use-gold-linker \
326 -no-warnings-are-errors \
328 -no-optimized-qmake \
331 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-compile-examples
,-no-compile-examples
) \
332 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-make examples
,-nomake examples
) \
333 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-gui
,-no-gui
) \
334 $(if
$(CONFIG_PACKAGE_qt5base-widgets
),-widgets
,-no-widgets
) \
338 -system-doubleconversion \
342 $(if
$(CONFIG_BUILD_NLS
),-no-iconv
,-no-iconv
) \
349 $(if
$(CONFIG_PACKAGE_qt5base-network
),-openssl-linked
,-no-openssl
) \
358 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
),,-qpa minimal
) \
359 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),,-qpa linuxfb
) \
365 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),-linuxfb
,-no-linuxfb
) \
374 -no-xkbcommon-evdev \
376 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-ico
),-ico
,-no-ico
) \
377 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-system-libpng
,-no-libpng
) \
378 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg
),-system-libjpeg
,-no-libjpeg
) \
393 define Build
/InstallDev
395 $(STAGING_DIR
)/host
/mk
399 $(STAGING_DIR
)/host
/mk
/
401 $(call Build
/Install
/HostFiles
,$(1))
402 $(call Build
/Install
/Headers
,$(1))
403 $(call Build
/Install
/Libs
,$(1),*)
406 define Package
/qt5base-concurrent
/install
407 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
410 define Package
/qt5base-core
/install
411 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
414 define Package
/qt5base-gl
/install
415 $(call Build
/Install
/Libs
,$(1),libQt5OpenGL
)
418 define Package
/qt5base-gui
/install
419 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
422 define Package
/qt5base-network
/install
423 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
426 define Package
/qt5base-printSupport
/install
427 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
430 define Package
/qt5base-sql
/install
431 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
434 define Package
/qt5base-test
/install
435 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
438 define Package
/qt5base-widgets
/install
439 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
442 define Package
/qt5base-xml
/install
443 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
446 define Package
/qt5base-plugin-bearer-generic
/install
447 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
450 define Package
/qt5base-plugin-input-evdevkeyboard
/install
451 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
454 define Package
/qt5base-plugin-input-evdevmouse
/install
455 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
458 define Package
/qt5base-plugin-input-evdevtablet
/install
459 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
462 define Package
/qt5base-plugin-input-evdevtouch
/install
463 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
466 #define Package/qt5base-plugin-imageformats-gif/install
467 # $(call Build/Install/Plugins,$(1),imageformats,libqgif)
470 define Package
/qt5base-plugin-imageformats-ico
/install
471 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
474 define Package
/qt5base-plugin-imageformats-jpeg
/install
475 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
478 define Package
/qt5base-plugin-platforms-linuxfb
/install
479 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
482 define Package
/qt5base-plugin-platforms-vnc
/install
483 $(call Build
/Install
/Plugins
,$(1),platforms
,libqvnc
)
486 #define Package/qt5base-plugin-platforms-eglfs/install
487 # $(call Build/Install/Plugins,$(1),platforms,libqeglfs)
490 #define Package/qt5base-plugin-platforms-minimalegl/install
491 # $(call Build/Install/Plugins,$(1),platforms,libqminimalegl)
494 define Package
/qt5base-plugin-platforms-minimal
/install
495 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
498 define Package
/qt5base-plugin-platforms-offscreen
/install
499 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
502 #define Package/qt5base-plugin-sqldrivers-sqlite/install
503 # $(call Build/Install/Plugins,$(1),sqldrivers,libqsqlite)
506 define Package
/qt5base-examples
/install
507 $(call Build
/Install
/Examples
,$(1))
510 # $(eval $(call BuildPackage,qt5base))
511 $(eval
$(call BuildPackage
,qt5base-concurrent
))
512 $(eval
$(call BuildPackage
,qt5base-core
))
513 $(eval
$(call BuildPackage
,qt5base-gui
))
514 $(eval
$(call BuildPackage
,qt5base-gl
))
515 $(eval
$(call BuildPackage
,qt5base-network
))
516 $(eval
$(call BuildPackage
,qt5base-printSupport
))
517 $(eval
$(call BuildPackage
,qt5base-sql
))
518 $(eval
$(call BuildPackage
,qt5base-test
))
519 $(eval
$(call BuildPackage
,qt5base-widgets
))
520 $(eval
$(call BuildPackage
,qt5base-xml
))
521 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
522 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
523 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
524 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
525 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
526 #$(eval $(call BuildPackage,qt5base-plugin-imageformats-gif))
527 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
528 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
529 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
530 #$(eval $(call BuildPackage,qt5base-plugin-platforms-eglfs))
531 #$(eval $(call BuildPackage,qt5base-plugin-platforms-minimalegl))
532 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
533 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
534 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-vnc
))
535 #$(eval $(call BuildPackage,qt5base-plugin-sqldrivers-sqlite))
536 $(eval
$(call BuildPackage
,qt5base-examples
))