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
:=184f9460b40752d71b15b827260580c2
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-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
69 MAINTAINER
:=Mirko Vogt
<mirko@openwrt.org
>
72 define Package
/qt5base
73 $(call Package
/qt5base
/Default
)
78 define Package
/qt5base-concurrent
79 $(call Package
/qt5base
/Default
)
81 DEPENDS
+=+qt5base-core
84 define Package
/qt5base-gl
85 $(call Package
/qt5base
/Default
)
87 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
90 define Package
/qt5base-core
91 $(call Package
/qt5base
/Default
)
93 DEPENDS
+=+libpthread
+zlib
+libpcre16
+libstdcpp
+librt
+libdouble-conversion
$(ICONV_DEPENDS
) #+icu
96 define Package
/qt5base-gui
97 $(call Package
/qt5base
/Default
)
99 DEPENDS
+=+qt5base-core
+qt5quick2-2d-sw-renderer-GLstubs
+libpng
+fontconfig
+libfreetype
+libudev
102 define Package
/qt5base-network
103 $(call Package
/qt5base
/Default
)
105 DEPENDS
+=+qt5base-core
+libopenssl
108 # seems to be only present as static lib
109 # define Package/qt5base-paltformSupport
110 # $(call Package/qt5base/Default)
114 define Package
/qt5base-printSupport
115 $(call Package
/qt5base
/Default
)
117 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
120 define Package
/qt5base-sql
121 $(call Package
/qt5base
/Default
)
123 DEPENDS
+=+qt5base-core
126 define Package
/qt5base-test
127 $(call Package
/qt5base
/Default
)
129 DEPENDS
+=+qt5base-core
132 define Package
/qt5base-widgets
133 $(call Package
/qt5base
/Default
)
135 DEPENDS
+=+qt5base-core
+qt5base-gui
138 define Package
/qt5base-xml
139 $(call Package
/qt5base
/Default
)
141 DEPENDS
+=+qt5base-core
148 define Package
/qt5base-plugin-bearer-generic
149 $(call Package
/qt5base
/Default
)
150 TITLE
+=bearer
(plugin
)
151 DEPENDS
+=+qt5base-core
+qt5base-network
154 ####### generic / input
156 define Package
/qt5base-plugin-input-evdevkeyboard
157 $(call Package
/qt5base
/Default
)
158 TITLE
+=evdev keyboard
(plugin
)
159 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
162 define Package
/qt5base-plugin-input-evdevmouse
163 $(call Package
/qt5base
/Default
)
164 TITLE
+=evdev mouse
(plugin
)
165 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
168 define Package
/qt5base-plugin-input-evdevtablet
169 $(call Package
/qt5base
/Default
)
170 TITLE
+=evdev tablet
(plugin
)
171 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
174 define Package
/qt5base-plugin-input-evdevtouch
175 $(call Package
/qt5base
/Default
)
176 TITLE
+=evdev touch
(plugin
)
177 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
182 #define Package/qt5base-plugin-imageformats-gif
183 # $(call Package/qt5base/Default)
184 #TITLE+=imageformat gif (plugin)
185 # DEPENDS+=+qt5base-core +qt5base-gui
188 define Package
/qt5base-plugin-imageformats-ico
189 $(call Package
/qt5base
/Default
)
190 TITLE
+=imageformat ico
(plugin
)
191 DEPENDS
+=+qt5base-core
+qt5base-gui
194 define Package
/qt5base-plugin-imageformats-jpeg
195 $(call Package
/qt5base
/Default
)
196 TITLE
+=imageformat jpeg
(plugin
)
197 DEPENDS
+=+qt5base-core
+qt5base-gui
+libjpeg
202 #define Package/qt5base-plugin-platforms-eglfs
203 # $(call Package/qt5base/Default)
204 # TITLE+=platform eglfs (plugin)
205 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
208 #define Package/qt5base-plugin-platforms-minimalegl
209 # $(call Package/qt5base/Default)
210 # TITLE+=platform minimalegl (plugin)
211 # DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
214 define Package
/qt5base-plugin-platforms-linuxfb
215 $(call Package
/qt5base
/Default
)
216 TITLE
+=platform linuxfb
(plugin
)
217 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
220 define Package
/qt5base-plugin-platforms-minimal
221 $(call Package
/qt5base
/Default
)
222 TITLE
+=platform minimal
(plugin
)
223 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
226 define Package
/qt5base-plugin-platforms-offscreen
227 $(call Package
/qt5base
/Default
)
228 TITLE
+=platform offscreen
(plugin
)
229 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
234 #define Package/qt5base-plugin-sqldrivers-sqlite
235 # $(call Package/qt5base/Default)
236 # TITLE+=sqldriver sqlite (plugin)
237 # DEPENDS+=+qt5base-core +qt5base-sql +libsqlite3
240 define Package
/qt5base-examples
241 $(call Package
/qt5base
/Default
)
250 +qt5base-printSupport \
251 +qt5base-concurrent \
256 $(call Build
/Prepare
/Default
)
258 .
/files
/mkspecs
/linux-openwrt-g
++ \
259 $(PKG_BUILD_DIR
)/mkspecs
/
263 -I
$(STAGING_DIR
)/usr
/include/freetype2 \
264 -I
$(STAGING_DIR
)/usr
/include/libdrm
266 define Build
/Configure
267 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
268 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
269 # hence we use the TARGET_* nomenclature.
270 ( cd
$(PKG_BUILD_DIR
) ; \
271 TARGET_CROSS
="$(TARGET_CROSS)" \
272 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
273 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
274 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
276 -prefix $(QT_INSTALL_PREFIX
) \
277 -extprefix
$(QT_EXTPREFIX
) \
278 -hostprefix
$(QT_HOST_PREFIX
) \
280 -bindir $(QT_INSTALL_BINS
) \
281 -headerdir
$(QT_INSTALL_HEADERS
) \
282 -libdir $(QT_INSTALL_LIBS
) \
283 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
284 -plugindir
$(QT_INSTALL_PLUGINS
) \
285 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
286 -importdir
$(QT_INSTALL_IMPORTS
) \
287 -qmldir
$(QT_INSTALL_QML
) \
288 -datadir $(QT_INSTALL_DATA
) \
289 -docdir
$(QT_INSTALL_DOCS
) \
290 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
291 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
292 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
293 -testsdir
$(QT_INSTALL_TESTS
) \
294 -hostbindir
$(QT_HOST_BINS
) \
295 -hostlibdir
$(QT_HOST_LIBS
) \
296 -hostdatadir
$(QT_HOST_DATA
) \
299 -no-optimized-tools \
323 $(if
$(findstring -mdsp
,$(TARGET_CFLAGS
)),,-no-mips_dsp
) \
324 $(if
$(findstring -mdspr2
,$(TARGET_CFLAGS
)),,-no-mips_dspr2
) \
332 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-system-libpng
,-no-libpng
) \
333 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg
),-system-libjpeg
,-no-libjpeg
) \
334 -system-doubleconversion \
337 $(if
$(CONFIG_PACKAGE_qt5base-network
),-openssl-linked
,-no-openssl
) \
348 -no-optimized-qmake \
351 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-make examples
,-nomake examples
) \
352 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-gui
,-no-gui
) \
353 $(if
$(CONFIG_PACKAGE_qt5base-widgets
),-widgets
,-no-widgets
) \
356 $(if
$(CONFIG_BUILD_NLS
),-iconv
,-no-iconv
) \
364 -no-reduce-relocations \
365 -no-use-gold-linker \
371 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),-linuxfb
,-no-linuxfb
) \
374 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
),,-qpa minimal
) \
378 -no-warnings-are-errors \
379 -xplatform linux-openwrt-g
++ \
383 define Build
/InstallDev
385 $(STAGING_DIR
)/host
/mk
389 $(STAGING_DIR
)/host
/mk
/
391 $(call Build
/Install
/HostFiles
,$(1))
392 $(call Build
/Install
/Headers
,$(1))
393 $(call Build
/Install
/Libs
,$(1),*)
396 define Package
/qt5base-concurrent
/install
397 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
400 define Package
/qt5base-core
/install
401 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
404 define Package
/qt5base-gl
/install
405 $(call Build
/Install
/Libs
,$(1),libQt5OpenGL
)
408 define Package
/qt5base-gui
/install
409 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
412 define Package
/qt5base-network
/install
413 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
416 define Package
/qt5base-printSupport
/install
417 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
420 define Package
/qt5base-sql
/install
421 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
424 define Package
/qt5base-test
/install
425 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
428 define Package
/qt5base-widgets
/install
429 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
432 define Package
/qt5base-xml
/install
433 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
436 define Package
/qt5base-plugin-bearer-generic
/install
437 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
440 define Package
/qt5base-plugin-input-evdevkeyboard
/install
441 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
444 define Package
/qt5base-plugin-input-evdevmouse
/install
445 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
448 define Package
/qt5base-plugin-input-evdevtablet
/install
449 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
452 define Package
/qt5base-plugin-input-evdevtouch
/install
453 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
456 #define Package/qt5base-plugin-imageformats-gif/install
457 # $(call Build/Install/Plugins,$(1),imageformats,libqgif)
460 define Package
/qt5base-plugin-imageformats-ico
/install
461 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
464 define Package
/qt5base-plugin-imageformats-jpeg
/install
465 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
468 define Package
/qt5base-plugin-platforms-linuxfb
/install
469 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
472 #define Package/qt5base-plugin-platforms-eglfs/install
473 # $(call Build/Install/Plugins,$(1),platforms,libqeglfs)
476 #define Package/qt5base-plugin-platforms-minimalegl/install
477 # $(call Build/Install/Plugins,$(1),platforms,libqminimalegl)
480 define Package
/qt5base-plugin-platforms-minimal
/install
481 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
484 define Package
/qt5base-plugin-platforms-offscreen
/install
485 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
488 #define Package/qt5base-plugin-sqldrivers-sqlite/install
489 # $(call Build/Install/Plugins,$(1),sqldrivers,libqsqlite)
492 define Package
/qt5base-examples
/install
493 $(call Build
/Install
/Examples
,$(1))
496 $(eval
$(call BuildPackage
,qt5base
))
497 $(eval
$(call BuildPackage
,qt5base-concurrent
))
498 $(eval
$(call BuildPackage
,qt5base-core
))
499 $(eval
$(call BuildPackage
,qt5base-gui
))
500 $(eval
$(call BuildPackage
,qt5base-gl
))
501 $(eval
$(call BuildPackage
,qt5base-network
))
502 $(eval
$(call BuildPackage
,qt5base-printSupport
))
503 $(eval
$(call BuildPackage
,qt5base-sql
))
504 $(eval
$(call BuildPackage
,qt5base-test
))
505 $(eval
$(call BuildPackage
,qt5base-widgets
))
506 $(eval
$(call BuildPackage
,qt5base-xml
))
507 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
508 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
509 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
510 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
511 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
512 #$(eval $(call BuildPackage,qt5base-plugin-imageformats-gif))
513 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
514 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
515 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
516 #$(eval $(call BuildPackage,qt5base-plugin-platforms-eglfs))
517 #$(eval $(call BuildPackage,qt5base-plugin-platforms-minimalegl))
518 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
519 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
520 #$(eval $(call BuildPackage,qt5base-plugin-sqldrivers-sqlite))
521 $(eval
$(call BuildPackage
,qt5base-examples
))