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
15 PKG_VERSION
:=5.8.0-beta
17 PKG_MD5SUM
:=3f4ab8a104166270368764fb057e6581
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
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
232 define Package
/qt5base-plugin-platforms-vnc
233 $(call Package
/qt5base
/Default
)
234 TITLE
+=platform vnc
(plugin
)
235 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-network
+libfreetype
+fontconfig
242 #define Package/qt5base-plugin-sqldrivers-sqlite
243 # $(call Package/qt5base/Default)
244 # TITLE+=sqldriver sqlite (plugin)
245 # DEPENDS+=+qt5base-core +qt5base-sql +libsqlite3
248 define Package
/qt5base-examples
249 $(call Package
/qt5base
/Default
)
258 +qt5base-printSupport \
259 +qt5base-concurrent \
264 $(call Build
/Prepare
/Default
)
266 .
/files
/mkspecs
/linux-openwrt-g
++ \
267 $(PKG_BUILD_DIR
)/mkspecs
/
271 # -I$(STAGING_DIR)/usr/include/freetype2 \
272 # -I$(STAGING_DIR)/usr/include/libdrm
274 define Build
/Configure
275 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
276 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
277 # hence we use the TARGET_* nomenclature.
278 ( cd
$(PKG_BUILD_DIR
) ; \
279 TARGET_CROSS
="$(TARGET_CROSS)" \
280 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
281 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
282 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
284 -prefix $(QT_INSTALL_PREFIX
) \
285 -extprefix
$(QT_EXTPREFIX
) \
286 -hostprefix
$(QT_HOST_PREFIX
) \
288 -bindir $(QT_INSTALL_BINS
) \
289 -headerdir
$(QT_INSTALL_HEADERS
) \
290 -libdir $(QT_INSTALL_LIBS
) \
291 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
292 -plugindir
$(QT_INSTALL_PLUGINS
) \
293 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
294 -importdir
$(QT_INSTALL_IMPORTS
) \
295 -qmldir
$(QT_INSTALL_QML
) \
296 -datadir $(QT_INSTALL_DATA
) \
297 -docdir
$(QT_INSTALL_DOCS
) \
298 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
299 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
300 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
301 -testsdir
$(QT_INSTALL_TESTS
) \
302 -hostbindir
$(QT_HOST_BINS
) \
303 -hostlibdir
$(QT_HOST_LIBS
) \
304 -hostdatadir
$(QT_HOST_DATA
) \
309 -no-optimized-tools \
313 -xplatform linux-openwrt-g
++ \
321 $(if
$(findstring -mdsp
,$(TARGET_CFLAGS
)),,-no-mips_dsp
) \
322 $(if
$(findstring -mdspr2
,$(TARGET_CFLAGS
)),,-no-mips_dspr2
) \
324 -no-reduce-relocations \
326 -no-use-gold-linker \
327 -no-warnings-are-errors \
329 -no-optimized-qmake \
332 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-compile-examples
,-no-compile-examples
) \
333 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-make examples
,-nomake examples
) \
334 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-gui
,-no-gui
) \
335 $(if
$(CONFIG_PACKAGE_qt5base-widgets
),-widgets
,-no-widgets
) \
339 -system-doubleconversion \
343 $(if
$(CONFIG_BUILD_NLS
),-no-iconv
,-no-iconv
) \
350 $(if
$(CONFIG_PACKAGE_qt5base-network
),-openssl-linked
,-no-openssl
) \
359 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
),,-qpa minimal
) \
360 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),,-qpa linuxfb
) \
366 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),-linuxfb
,-no-linuxfb
) \
375 -no-xkbcommon-evdev \
377 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-ico
),-ico
,-no-ico
) \
378 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-system-libpng
,-no-libpng
) \
379 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg
),-system-libjpeg
,-no-libjpeg
) \
394 define Build
/InstallDev
396 $(STAGING_DIR
)/host
/mk
400 $(STAGING_DIR
)/host
/mk
/
402 $(call Build
/Install
/HostFiles
,$(1))
403 $(call Build
/Install
/Headers
,$(1))
404 $(call Build
/Install
/Libs
,$(1),*)
407 define Package
/qt5base-concurrent
/install
408 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
411 define Package
/qt5base-core
/install
412 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
415 define Package
/qt5base-gl
/install
416 $(call Build
/Install
/Libs
,$(1),libQt5OpenGL
)
419 define Package
/qt5base-gui
/install
420 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
423 define Package
/qt5base-network
/install
424 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
427 define Package
/qt5base-printSupport
/install
428 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
431 define Package
/qt5base-sql
/install
432 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
435 define Package
/qt5base-test
/install
436 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
439 define Package
/qt5base-widgets
/install
440 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
443 define Package
/qt5base-xml
/install
444 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
447 define Package
/qt5base-plugin-bearer-generic
/install
448 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
451 define Package
/qt5base-plugin-input-evdevkeyboard
/install
452 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
455 define Package
/qt5base-plugin-input-evdevmouse
/install
456 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
459 define Package
/qt5base-plugin-input-evdevtablet
/install
460 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
463 define Package
/qt5base-plugin-input-evdevtouch
/install
464 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
467 #define Package/qt5base-plugin-imageformats-gif/install
468 # $(call Build/Install/Plugins,$(1),imageformats,libqgif)
471 define Package
/qt5base-plugin-imageformats-ico
/install
472 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
475 define Package
/qt5base-plugin-imageformats-jpeg
/install
476 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
479 define Package
/qt5base-plugin-platforms-linuxfb
/install
480 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
483 define Package
/qt5base-plugin-platforms-vnc
/install
484 $(call Build
/Install
/Plugins
,$(1),platforms
,libqvnc
)
487 #define Package/qt5base-plugin-platforms-eglfs/install
488 # $(call Build/Install/Plugins,$(1),platforms,libqeglfs)
491 #define Package/qt5base-plugin-platforms-minimalegl/install
492 # $(call Build/Install/Plugins,$(1),platforms,libqminimalegl)
495 define Package
/qt5base-plugin-platforms-minimal
/install
496 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
499 define Package
/qt5base-plugin-platforms-offscreen
/install
500 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
503 #define Package/qt5base-plugin-sqldrivers-sqlite/install
504 # $(call Build/Install/Plugins,$(1),sqldrivers,libqsqlite)
507 define Package
/qt5base-examples
/install
508 $(call Build
/Install
/Examples
,$(1))
511 $(eval
$(call BuildPackage
,qt5base
))
512 $(eval
$(call BuildPackage
,qt5base-concurrent
))
513 $(eval
$(call BuildPackage
,qt5base-core
))
514 $(eval
$(call BuildPackage
,qt5base-gui
))
515 $(eval
$(call BuildPackage
,qt5base-gl
))
516 $(eval
$(call BuildPackage
,qt5base-network
))
517 $(eval
$(call BuildPackage
,qt5base-printSupport
))
518 $(eval
$(call BuildPackage
,qt5base-sql
))
519 $(eval
$(call BuildPackage
,qt5base-test
))
520 $(eval
$(call BuildPackage
,qt5base-widgets
))
521 $(eval
$(call BuildPackage
,qt5base-xml
))
522 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
523 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
524 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
525 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
526 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
527 #$(eval $(call BuildPackage,qt5base-plugin-imageformats-gif))
528 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
529 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
530 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
531 #$(eval $(call BuildPackage,qt5base-plugin-platforms-eglfs))
532 #$(eval $(call BuildPackage,qt5base-plugin-platforms-minimalegl))
533 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
534 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
535 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-vnc
))
536 #$(eval $(call BuildPackage,qt5base-plugin-sqldrivers-sqlite))
537 $(eval
$(call BuildPackage
,qt5base-examples
))