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 # - plugins don't work when sstrip is used for stripping
10 # - 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
11 # - host_build functionality seems to be broken - qmake doesn't switch to the host toolchain (linux-g++) when host_build gets invoked
13 include $(TOPDIR
)/rules.mk
18 PKG_MD5SUM
:=67a95eec79ffc4a14f516ad6f3d24c96
20 PKG_SYS_NAME
:=qtbase-opensource-src-
$(PKG_VERSION
)
21 PKG_SOURCE
:=$(PKG_SYS_NAME
).
tar.xz
22 PKG_SOURCE_URL
:=http
://download.qt-project.org
/official_releases
/qt
/$(basename $(PKG_VERSION
))/$(PKG_VERSION
)/submodules
24 PKG_BUILD_DIR
=$(BUILD_DIR
)/$(PKG_SYS_NAME
)
26 PKG_BUILD_DEPENDS
:=librpc
30 include $(INCLUDE_DIR
)/package.mk
31 include $(INCLUDE_DIR
)/nls.mk
32 include .
/files
/qmake.mk
34 PKG_CONFIG_DEPENDS
:= \
35 CONFIG_PACKAGE_qt5base-plugin-sqldrivers-sqlite \
36 CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg \
37 CONFIG_PACKAGE_qt5base-network \
38 CONFIG_PACKAGE_qt5base-gui \
39 CONFIG_PACKAGE_qt5base-plugin-imageformats-gif \
40 CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \
41 CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
43 define Package
/qt5base
/Default
44 SECTION
:=video-frameworks
46 SUBMENU
:=Frameworks and Toolkits
50 MAINTAINER
:=Mirko Vogt
<mirko@openwrt.org
>
53 define Package
/qt5base
54 $(call Package
/qt5base
/Default
)
59 define Package
/qt5base-concurrent
60 $(call Package
/qt5base
/Default
)
62 DEPENDS
+=+qt5base-core
65 define Package
/qt5base-core
66 $(call Package
/qt5base
/Default
)
68 DEPENDS
+=+libpthread
+zlib
+libpcre16
+libstdcpp
+librt
$(ICONV_DEPENDS
)
71 define Package
/qt5base-gui
72 $(call Package
/qt5base
/Default
)
74 DEPENDS
+=+qt5base-core
+libpng
77 define Package
/qt5base-network
78 $(call Package
/qt5base
/Default
)
80 DEPENDS
+=+qt5base-core
+libopenssl
83 # seems to be only present as static lib
84 # define Package/qt5base-paltformSupport
85 # $(call Package/qt5base/Default)
89 define Package
/qt5base-printSupport
90 $(call Package
/qt5base
/Default
)
92 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
95 define Package
/qt5base-sql
96 $(call Package
/qt5base
/Default
)
98 DEPENDS
+=+qt5base-core
101 define Package
/qt5base-test
102 $(call Package
/qt5base
/Default
)
104 DEPENDS
+=+qt5base-core
107 define Package
/qt5base-widgets
108 $(call Package
/qt5base
/Default
)
110 DEPENDS
+=+qt5base-core
+qt5base-gui
113 define Package
/qt5base-xml
114 $(call Package
/qt5base
/Default
)
116 DEPENDS
+=+qt5base-core
123 define Package
/qt5base-plugin-bearer-generic
124 $(call Package
/qt5base
/Default
)
125 TITLE
+=bearer
(plugin
)
126 DEPENDS
+=+qt5base-core
+qt5base-network
129 ####### generic / input
131 define Package
/qt5base-plugin-input-evdevkeyboard
132 $(call Package
/qt5base
/Default
)
133 TITLE
+=evdev keyboard
(plugin
)
134 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
137 define Package
/qt5base-plugin-input-evdevmouse
138 $(call Package
/qt5base
/Default
)
139 TITLE
+=evdev mouse
(plugin
)
140 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
143 define Package
/qt5base-plugin-input-evdevtablet
144 $(call Package
/qt5base
/Default
)
145 TITLE
+=evdev tablet
(plugin
)
146 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
149 define Package
/qt5base-plugin-input-evdevtouch
150 $(call Package
/qt5base
/Default
)
151 TITLE
+=evdev touch
(plugin
)
152 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
157 define Package
/qt5base-plugin-imageformats-gif
158 $(call Package
/qt5base
/Default
)
159 TITLE
+=imageformat gif
(plugin
)
160 DEPENDS
+=+qt5base-core
+qt5base-gui
163 define Package
/qt5base-plugin-imageformats-ico
164 $(call Package
/qt5base
/Default
)
165 TITLE
+=imageformat ico
(plugin
)
166 DEPENDS
+=+qt5base-core
+qt5base-gui
169 define Package
/qt5base-plugin-imageformats-jpeg
170 $(call Package
/qt5base
/Default
)
171 TITLE
+=imageformat jpeg
(plugin
)
172 DEPENDS
+=+qt5base-core
+qt5base-gui
+libjpeg
177 define Package
/qt5base-plugin-platforms-linuxfb
178 $(call Package
/qt5base
/Default
)
179 TITLE
+=platform linuxfb
(plugin
)
180 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
183 define Package
/qt5base-plugin-platforms-minimal
184 $(call Package
/qt5base
/Default
)
185 TITLE
+=platform minimal
(plugin
)
186 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
189 define Package
/qt5base-plugin-platforms-offscreen
190 $(call Package
/qt5base
/Default
)
191 TITLE
+=platform offscreen
(plugin
)
192 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
197 define Package
/qt5base-plugin-sqldrivers-sqlite
198 $(call Package
/qt5base
/Default
)
199 TITLE
+=sqldriver sqlite
(plugin
)
200 DEPENDS
+=+qt5base-core
+qt5base-sql
+libsqlite3
203 define Package
/qt5base-examples
204 $(call Package
/qt5base
/Default
)
213 +qt5base-printSupport \
218 $(call Build
/Prepare
/Default
)
220 .
/files
/mkspecs
/linux-openwrt-g
++ \
221 $(PKG_BUILD_DIR
)/mkspecs
/
224 define Build
/Configure
225 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
226 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
227 # hence we use the TARGET_* nomenclature.
228 ( cd
$(PKG_BUILD_DIR
) ; \
229 TARGET_CROSS
="$(TARGET_CROSS)" \
230 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
231 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
232 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
234 -prefix $(QT_INSTALL_PREFIX
) \
235 -extprefix
$(QT_EXTPREFIX
) \
236 -hostprefix
$(QT_HOST_PREFIX
) \
237 -bindir $(QT_INSTALL_BINS
) \
238 -headerdir
$(QT_INSTALL_HEADERS
) \
239 -libdir $(QT_INSTALL_LIBS
) \
240 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
241 -plugindir
$(QT_INSTALL_PLUGINS
) \
242 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
243 -importdir
$(QT_INSTALL_IMPORTS
) \
244 -qmldir
$(QT_INSTALL_QML
) \
245 -datadir $(QT_INSTALL_DATA
) \
246 -docdir
$(QT_INSTALL_DOCS
) \
247 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
248 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
249 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
250 -testsdir
$(QT_INSTALL_TESTS
) \
251 -hostbindir
$(QT_HOST_BINS
) \
252 -hostlibdir
$(QT_HOST_LIBS
) \
253 -hostdatadir
$(QT_HOST_DATA
) \
262 $(if
$(CONFIG_PACKAGE_qt5base-plugin-sqldrivers-sqlite
),-system-sqlite
,-no-sql-sqlite
) \
280 $(if
$(findstring -mdsp
,$(TARGET_CFLAGS
)),,-no-mips_dsp
)\
281 $(if
$(findstring -mdspr2
,$(TARGET_CFLAGS
)),,-no-mips_dspr2
)\
286 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-system-libpng
,-no-libpng
) \
287 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg
),-system-libjpeg
,-no-libjpeg
) \
290 $(if
$(CONFIG_PACKAGE_qt5base-network
),-openssl-linked
,-no-openssl
) \
301 $(if
$(CONFIG_PACKAGE_qt5base-examples
),-make examples
,-nomake examples
) \
302 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-gui
,-no-gui
) \
303 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-gif
),,-no-gif
) \
304 $(if
$(CONFIG_PACKAGE_qt5base-widgets
),-widgets
,-no-widgets
) \
305 -no-optimized-qmake \
307 $(if
$(CONFIG_BUILD_NLS
),-iconv
,-no-iconv
) \
314 -no-reduce-relocations \
315 -no-use-gold-linker \
319 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),-linuxfb
,-no-linuxfb
) \
321 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
),,-qpa minimal
) \
322 -xplatform linux-openwrt-g
++ \
325 -no-warnings-are-errors \
329 define Build
/InstallDev
331 $(STAGING_DIR
)/host
/mk
335 $(STAGING_DIR
)/host
/mk
/
337 $(call Build
/Install
/HostFiles
,$(1))
338 $(call Build
/Install
/Headers
,$(1))
339 $(call Build
/Install
/Libs
,$(1),*)
342 define Package
/qt5base-concurrent
/install
343 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
346 define Package
/qt5base-core
/install
347 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
350 define Package
/qt5base-gui
/install
351 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
354 define Package
/qt5base-network
/install
355 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
358 define Package
/qt5base-printSupport
/install
359 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
362 define Package
/qt5base-sql
/install
363 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
366 define Package
/qt5base-test
/install
367 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
370 define Package
/qt5base-widgets
/install
371 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
374 define Package
/qt5base-xml
/install
375 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
378 define Package
/qt5base-plugin-bearer-generic
/install
379 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
382 define Package
/qt5base-plugin-input-evdevkeyboard
/install
383 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
386 define Package
/qt5base-plugin-input-evdevmouse
/install
387 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
390 define Package
/qt5base-plugin-input-evdevtablet
/install
391 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
394 define Package
/qt5base-plugin-input-evdevtouch
/install
395 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
398 define Package
/qt5base-plugin-imageformats-gif
/install
399 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqgif
)
402 define Package
/qt5base-plugin-imageformats-ico
/install
403 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
406 define Package
/qt5base-plugin-imageformats-jpeg
/install
407 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
410 define Package
/qt5base-plugin-platforms-linuxfb
/install
411 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
414 define Package
/qt5base-plugin-platforms-minimal
/install
415 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
418 define Package
/qt5base-plugin-platforms-offscreen
/install
419 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
422 define Package
/qt5base-plugin-sqldrivers
/install
423 $(call Build
/Install
/Plugins
,$(1),sqldrivers
,libqsqlite
)
426 define Package
/qt5base-examples
/install
427 $(call Build
/Install
/Examples
,$(1))
430 $(eval
$(call BuildPackage
,qt5base
))
431 $(eval
$(call BuildPackage
,qt5base-concurrent
))
432 $(eval
$(call BuildPackage
,qt5base-core
))
433 $(eval
$(call BuildPackage
,qt5base-gui
))
434 $(eval
$(call BuildPackage
,qt5base-network
))
435 $(eval
$(call BuildPackage
,qt5base-printSupport
))
436 $(eval
$(call BuildPackage
,qt5base-sql
))
437 $(eval
$(call BuildPackage
,qt5base-test
))
438 $(eval
$(call BuildPackage
,qt5base-widgets
))
439 $(eval
$(call BuildPackage
,qt5base-xml
))
440 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
441 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
442 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
443 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
444 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
445 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-gif
))
446 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
447 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
448 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
449 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
450 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
451 $(eval
$(call BuildPackage
,qt5base-plugin-sqldrivers-sqlite
))
452 $(eval
$(call BuildPackage
,qt5base-examples
))