2 # Copyright (C) 2015 OpenWrt.org
3 # Author: Mirko Vogt <mirko@openwrt.org>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 # - only framebuffer (linuxfb) support for now, XBC/DirectFB to come - thus no GL thus no qtquick2 / QML2, as it has a hard dependency on GL
10 # - host_build functionality seems to be broken - qmake doesn't switch to the host toolchain (linux-g++) when host_build gets invoked
12 include $(TOPDIR
)/rules.mk
17 PKG_MD5SUM
:=67a95eec79ffc4a14f516ad6f3d24c96
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
)
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-sqldrivers-sqlite \
35 CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg \
36 CONFIG_PACKAGE_qt5base-network \
37 CONFIG_PACKAGE_qt5base-gui \
38 CONFIG_PACKAGE_qt5base-plugin-imageformats-gif \
39 CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \
40 CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
42 # Do not use sstrip for QT5. When sstrip is used the QT5 plugin loading does
43 # not work, because of QT''s internal elf parser, see
44 # https://bugreports.qt.io/browse/QTBUG-52567
45 # Use the code from the gcc package to use strip instaed.
46 ifneq ($(CONFIG_USE_SSTRIP
),)
47 STRIP
:=$(TARGET_CROSS
)strip $(call qstrip
,$(CONFIG_STRIP_ARGS
))
49 export CROSS
="$(TARGET_CROSS)" \
50 $(if
$(CONFIG_KERNEL_KALLSYMS
),NO_RENAME
=1) \
51 $(if
$(CONFIG_KERNEL_PROFILING
),KEEP_SYMBOLS
=1); \
52 NM
="$(TARGET_CROSS)nm" \
54 STRIP_KMOD
="$(SCRIPT_DIR)/strip-kmod.sh" \
55 $(SCRIPT_DIR
)/rstrip.sh
58 define Package
/qt5base
/Default
59 SECTION
:=video-frameworks
61 SUBMENU
:=Frameworks and Toolkits
65 MAINTAINER
:=Mirko Vogt
<mirko@openwrt.org
>
68 define Package
/qt5base
69 $(call Package
/qt5base
/Default
)
74 define Package
/qt5base-concurrent
75 $(call Package
/qt5base
/Default
)
77 DEPENDS
+=+qt5base-core
80 define Package
/qt5base-core
81 $(call Package
/qt5base
/Default
)
83 DEPENDS
+=+libpthread
+zlib
+libpcre16
+libstdcpp
+librt
$(ICONV_DEPENDS
)
86 define Package
/qt5base-gui
87 $(call Package
/qt5base
/Default
)
89 DEPENDS
+=+qt5base-core
+libpng
92 define Package
/qt5base-network
93 $(call Package
/qt5base
/Default
)
95 DEPENDS
+=+qt5base-core
+libopenssl
98 # seems to be only present as static lib
99 # define Package/qt5base-paltformSupport
100 # $(call Package/qt5base/Default)
104 define Package
/qt5base-printSupport
105 $(call Package
/qt5base
/Default
)
107 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
110 define Package
/qt5base-sql
111 $(call Package
/qt5base
/Default
)
113 DEPENDS
+=+qt5base-core
116 define Package
/qt5base-test
117 $(call Package
/qt5base
/Default
)
119 DEPENDS
+=+qt5base-core
122 define Package
/qt5base-widgets
123 $(call Package
/qt5base
/Default
)
125 DEPENDS
+=+qt5base-core
+qt5base-gui
128 define Package
/qt5base-xml
129 $(call Package
/qt5base
/Default
)
131 DEPENDS
+=+qt5base-core
138 define Package
/qt5base-plugin-bearer-generic
139 $(call Package
/qt5base
/Default
)
140 TITLE
+=bearer
(plugin
)
141 DEPENDS
+=+qt5base-core
+qt5base-network
144 ####### generic / input
146 define Package
/qt5base-plugin-input-evdevkeyboard
147 $(call Package
/qt5base
/Default
)
148 TITLE
+=evdev keyboard
(plugin
)
149 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
152 define Package
/qt5base-plugin-input-evdevmouse
153 $(call Package
/qt5base
/Default
)
154 TITLE
+=evdev mouse
(plugin
)
155 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
158 define Package
/qt5base-plugin-input-evdevtablet
159 $(call Package
/qt5base
/Default
)
160 TITLE
+=evdev tablet
(plugin
)
161 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
164 define Package
/qt5base-plugin-input-evdevtouch
165 $(call Package
/qt5base
/Default
)
166 TITLE
+=evdev touch
(plugin
)
167 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
172 define Package
/qt5base-plugin-imageformats-gif
173 $(call Package
/qt5base
/Default
)
174 TITLE
+=imageformat gif
(plugin
)
175 DEPENDS
+=+qt5base-core
+qt5base-gui
178 define Package
/qt5base-plugin-imageformats-ico
179 $(call Package
/qt5base
/Default
)
180 TITLE
+=imageformat ico
(plugin
)
181 DEPENDS
+=+qt5base-core
+qt5base-gui
184 define Package
/qt5base-plugin-imageformats-jpeg
185 $(call Package
/qt5base
/Default
)
186 TITLE
+=imageformat jpeg
(plugin
)
187 DEPENDS
+=+qt5base-core
+qt5base-gui
+libjpeg
192 define Package
/qt5base-plugin-platforms-linuxfb
193 $(call Package
/qt5base
/Default
)
194 TITLE
+=platform linuxfb
(plugin
)
195 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
198 define Package
/qt5base-plugin-platforms-minimal
199 $(call Package
/qt5base
/Default
)
200 TITLE
+=platform minimal
(plugin
)
201 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
204 define Package
/qt5base-plugin-platforms-offscreen
205 $(call Package
/qt5base
/Default
)
206 TITLE
+=platform offscreen
(plugin
)
207 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
212 define Package
/qt5base-plugin-sqldrivers-sqlite
213 $(call Package
/qt5base
/Default
)
214 TITLE
+=sqldriver sqlite
(plugin
)
215 DEPENDS
+=+qt5base-core
+qt5base-sql
+libsqlite3
218 define Package
/qt5base-examples
219 $(call Package
/qt5base
/Default
)
228 +qt5base-printSupport \
233 $(call Build
/Prepare
/Default
)
235 .
/files
/mkspecs
/linux-openwrt-g
++ \
236 $(PKG_BUILD_DIR
)/mkspecs
/
239 define Build
/Configure
240 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
241 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
242 # hence we use the TARGET_* nomenclature.
243 ( cd
$(PKG_BUILD_DIR
) ; \
244 TARGET_CROSS
="$(TARGET_CROSS)" \
245 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
246 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
247 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
249 -prefix $(QT_INSTALL_PREFIX
) \
250 -extprefix
$(QT_EXTPREFIX
) \
251 -hostprefix
$(QT_HOST_PREFIX
) \
252 -bindir $(QT_INSTALL_BINS
) \
253 -headerdir
$(QT_INSTALL_HEADERS
) \
254 -libdir $(QT_INSTALL_LIBS
) \
255 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
256 -plugindir
$(QT_INSTALL_PLUGINS
) \
257 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
258 -importdir
$(QT_INSTALL_IMPORTS
) \
259 -qmldir
$(QT_INSTALL_QML
) \
260 -datadir $(QT_INSTALL_DATA
) \
261 -docdir
$(QT_INSTALL_DOCS
) \
262 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
263 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
264 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
265 -testsdir
$(QT_INSTALL_TESTS
) \
266 -hostbindir
$(QT_HOST_BINS
) \
267 -hostlibdir
$(QT_HOST_LIBS
) \
268 -hostdatadir
$(QT_HOST_DATA
) \
277 $(if
$(CONFIG_PACKAGE_qt5base-plugin-sqldrivers-sqlite
),-system-sqlite
,-no-sql-sqlite
) \
295 $(if
$(findstring -mdsp
,$(TARGET_CFLAGS
)),,-no-mips_dsp
)\
296 $(if
$(findstring -mdspr2
,$(TARGET_CFLAGS
)),,-no-mips_dspr2
)\
301 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-system-libpng
,-no-libpng
) \
302 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg
),-system-libjpeg
,-no-libjpeg
) \
305 $(if
$(CONFIG_PACKAGE_qt5base-network
),-openssl-linked
,-no-openssl
) \
316 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-make examples
,-nomake examples
) \
317 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-gui
,-no-gui
) \
318 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-gif
),,-no-gif
) \
319 $(if
$(CONFIG_PACKAGE_qt5base-widgets
),-widgets
,-no-widgets
) \
320 -no-optimized-qmake \
322 $(if
$(CONFIG_BUILD_NLS
),-iconv
,-no-iconv
) \
329 -no-reduce-relocations \
330 -no-use-gold-linker \
334 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),-linuxfb
,-no-linuxfb
) \
336 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
),,-qpa minimal
) \
337 -xplatform linux-openwrt-g
++ \
340 -no-warnings-are-errors \
344 define Build
/InstallDev
346 $(STAGING_DIR
)/host
/mk
350 $(STAGING_DIR
)/host
/mk
/
352 $(call Build
/Install
/HostFiles
,$(1))
353 $(call Build
/Install
/Headers
,$(1))
354 $(call Build
/Install
/Libs
,$(1),*)
357 define Package
/qt5base-concurrent
/install
358 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
361 define Package
/qt5base-core
/install
362 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
365 define Package
/qt5base-gui
/install
366 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
369 define Package
/qt5base-network
/install
370 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
373 define Package
/qt5base-printSupport
/install
374 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
377 define Package
/qt5base-sql
/install
378 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
381 define Package
/qt5base-test
/install
382 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
385 define Package
/qt5base-widgets
/install
386 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
389 define Package
/qt5base-xml
/install
390 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
393 define Package
/qt5base-plugin-bearer-generic
/install
394 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
397 define Package
/qt5base-plugin-input-evdevkeyboard
/install
398 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
401 define Package
/qt5base-plugin-input-evdevmouse
/install
402 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
405 define Package
/qt5base-plugin-input-evdevtablet
/install
406 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
409 define Package
/qt5base-plugin-input-evdevtouch
/install
410 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
413 define Package
/qt5base-plugin-imageformats-gif
/install
414 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqgif
)
417 define Package
/qt5base-plugin-imageformats-ico
/install
418 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
421 define Package
/qt5base-plugin-imageformats-jpeg
/install
422 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
425 define Package
/qt5base-plugin-platforms-linuxfb
/install
426 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
429 define Package
/qt5base-plugin-platforms-minimal
/install
430 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
433 define Package
/qt5base-plugin-platforms-offscreen
/install
434 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
437 define Package
/qt5base-plugin-sqldrivers
/install
438 $(call Build
/Install
/Plugins
,$(1),sqldrivers
,libqsqlite
)
441 define Package
/qt5base-examples
/install
442 $(call Build
/Install
/Examples
,$(1))
445 $(eval
$(call BuildPackage
,qt5base
))
446 $(eval
$(call BuildPackage
,qt5base-concurrent
))
447 $(eval
$(call BuildPackage
,qt5base-core
))
448 $(eval
$(call BuildPackage
,qt5base-gui
))
449 $(eval
$(call BuildPackage
,qt5base-network
))
450 $(eval
$(call BuildPackage
,qt5base-printSupport
))
451 $(eval
$(call BuildPackage
,qt5base-sql
))
452 $(eval
$(call BuildPackage
,qt5base-test
))
453 $(eval
$(call BuildPackage
,qt5base-widgets
))
454 $(eval
$(call BuildPackage
,qt5base-xml
))
455 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
456 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
457 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
458 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
459 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
460 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-gif
))
461 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
462 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
463 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
464 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
465 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
466 $(eval
$(call BuildPackage
,qt5base-plugin-sqldrivers-sqlite
))
467 $(eval
$(call BuildPackage
,qt5base-examples
))