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 \
42 CONFIG_PACKAGE_libiconv-full
44 define Package
/qt5base
/Default
45 SECTION
:=video-frameworks
47 SUBMENU
:=Frameworks and Toolkits
51 MAINTAINER
:=Mirko Vogt
<mirko@openwrt.org
>
54 define Package
/qt5base
55 $(call Package
/qt5base
/Default
)
60 define Package
/qt5base-concurrent
61 $(call Package
/qt5base
/Default
)
63 DEPENDS
+=+qt5base-core
66 define Package
/qt5base-core
67 $(call Package
/qt5base
/Default
)
69 DEPENDS
+=+libpthread
+zlib
+libpcre16
+libstdcpp
+librt
+PACKAGE_libiconv-full
:libiconv-full
72 define Package
/qt5base-gui
73 $(call Package
/qt5base
/Default
)
75 DEPENDS
+=+qt5base-core
+libpng
78 define Package
/qt5base-network
79 $(call Package
/qt5base
/Default
)
81 DEPENDS
+=+qt5base-core
+libopenssl
84 # seems to be only present as static lib
85 # define Package/qt5base-paltformSupport
86 # $(call Package/qt5base/Default)
90 define Package
/qt5base-printSupport
91 $(call Package
/qt5base
/Default
)
93 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
96 define Package
/qt5base-sql
97 $(call Package
/qt5base
/Default
)
99 DEPENDS
+=+qt5base-core
102 define Package
/qt5base-test
103 $(call Package
/qt5base
/Default
)
105 DEPENDS
+=+qt5base-core
108 define Package
/qt5base-widgets
109 $(call Package
/qt5base
/Default
)
111 DEPENDS
+=+qt5base-core
+qt5base-gui
114 define Package
/qt5base-xml
115 $(call Package
/qt5base
/Default
)
117 DEPENDS
+=+qt5base-core
124 define Package
/qt5base-plugin-bearer-generic
125 $(call Package
/qt5base
/Default
)
126 TITLE
+=bearer
(plugin
)
127 DEPENDS
+=+qt5base-core
+qt5base-network
130 ####### generic / input
132 define Package
/qt5base-plugin-input-evdevkeyboard
133 $(call Package
/qt5base
/Default
)
134 TITLE
+=evdev keyboard
(plugin
)
135 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
138 define Package
/qt5base-plugin-input-evdevmouse
139 $(call Package
/qt5base
/Default
)
140 TITLE
+=evdev mouse
(plugin
)
141 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
144 define Package
/qt5base-plugin-input-evdevtablet
145 $(call Package
/qt5base
/Default
)
146 TITLE
+=evdev tablet
(plugin
)
147 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
150 define Package
/qt5base-plugin-input-evdevtouch
151 $(call Package
/qt5base
/Default
)
152 TITLE
+=evdev touch
(plugin
)
153 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
158 define Package
/qt5base-plugin-imageformats-gif
159 $(call Package
/qt5base
/Default
)
160 TITLE
+=imageformat gif
(plugin
)
161 DEPENDS
+=+qt5base-core
+qt5base-gui
164 define Package
/qt5base-plugin-imageformats-ico
165 $(call Package
/qt5base
/Default
)
166 TITLE
+=imageformat ico
(plugin
)
167 DEPENDS
+=+qt5base-core
+qt5base-gui
170 define Package
/qt5base-plugin-imageformats-jpeg
171 $(call Package
/qt5base
/Default
)
172 TITLE
+=imageformat jpeg
(plugin
)
173 DEPENDS
+=+qt5base-core
+qt5base-gui
+libjpeg
178 define Package
/qt5base-plugin-platforms-linuxfb
179 $(call Package
/qt5base
/Default
)
180 TITLE
+=platform linuxfb
(plugin
)
181 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
184 define Package
/qt5base-plugin-platforms-minimal
185 $(call Package
/qt5base
/Default
)
186 TITLE
+=platform minimal
(plugin
)
187 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
190 define Package
/qt5base-plugin-platforms-offscreen
191 $(call Package
/qt5base
/Default
)
192 TITLE
+=platform offscreen
(plugin
)
193 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
198 define Package
/qt5base-plugin-sqldrivers-sqlite
199 $(call Package
/qt5base
/Default
)
200 TITLE
+=sqldriver sqlite
(plugin
)
201 DEPENDS
+=+qt5base-core
+qt5base-sql
+libsqlite3
204 define Package
/qt5base-examples
205 $(call Package
/qt5base
/Default
)
214 +qt5base-printSupport \
219 $(call Build
/Prepare
/Default
)
221 .
/files
/mkspecs
/linux-openwrt-g
++ \
222 $(PKG_BUILD_DIR
)/mkspecs
/
225 define Build
/Configure
226 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
227 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
228 # hence we use the TARGET_* nomenclature.
229 ( cd
$(PKG_BUILD_DIR
) ; \
230 TARGET_CROSS
="$(TARGET_CROSS)" \
231 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
232 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
233 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
235 -prefix $(QT_INSTALL_PREFIX
) \
236 -extprefix
$(QT_EXTPREFIX
) \
237 -hostprefix
$(QT_HOST_PREFIX
) \
238 -bindir $(QT_INSTALL_BINS
) \
239 -headerdir
$(QT_INSTALL_HEADERS
) \
240 -libdir $(QT_INSTALL_LIBS
) \
241 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
242 -plugindir
$(QT_INSTALL_PLUGINS
) \
243 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
244 -importdir
$(QT_INSTALL_IMPORTS
) \
245 -qmldir
$(QT_INSTALL_QML
) \
246 -datadir $(QT_INSTALL_DATA
) \
247 -docdir
$(QT_INSTALL_DOCS
) \
248 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
249 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
250 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
251 -testsdir
$(QT_INSTALL_TESTS
) \
252 -hostbindir
$(QT_HOST_BINS
) \
253 -hostlibdir
$(QT_HOST_LIBS
) \
254 -hostdatadir
$(QT_HOST_DATA
) \
263 $(if
$(CONFIG_PACKAGE_qt5base-plugin-sqldrivers-sqlite
),-system-sqlite
,-no-sql-sqlite
) \
281 $(if
$(findstring -mdsp
,$(TARGET_CFLAGS
)),,-no-mips_dsp
)\
282 $(if
$(findstring -mdspr2
,$(TARGET_CFLAGS
)),,-no-mips_dspr2
)\
287 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-system-libpng
,-no-libpng
) \
288 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg
),-system-libjpeg
,-no-libjpeg
) \
291 $(if
$(CONFIG_PACKAGE_qt5base-network
),-openssl-linked
,-no-openssl
) \
303 $(if
$(CONFIG_PACKAGE_qt5base-gui
),-gui
,-no-gui
) \
304 $(if
$(CONFIG_PACKAGE_qt5base-plugin-imageformats-gif
),,-no-gif
) \
306 -no-optimized-qmake \
308 $(if
$(CONFIG_PACKAGE_libiconv-full
),-iconv
,-no-iconv
) \
315 -no-reduce-relocations \
316 -no-use-gold-linker \
320 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb
),-linuxfb
,-no-linuxfb
) \
322 $(if
$(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
),,-qpa minimal
) \
323 -xplatform linux-openwrt-g
++ \
326 -no-warnings-are-errors \
330 define Build
/InstallDev
332 $(STAGING_DIR
)/host
/mk
336 $(STAGING_DIR
)/host
/mk
/
338 $(call Build
/Install
/HostFiles
,$(1))
339 $(call Build
/Install
/Headers
,$(1))
340 $(call Build
/Install
/Libs
,$(1),*)
343 define Package
/qt5base-concurrent
/install
344 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
347 define Package
/qt5base-core
/install
348 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
351 define Package
/qt5base-gui
/install
352 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
355 define Package
/qt5base-network
/install
356 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
359 define Package
/qt5base-printSupport
/install
360 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
363 define Package
/qt5base-sql
/install
364 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
367 define Package
/qt5base-test
/install
368 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
371 define Package
/qt5base-widgets
/install
372 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
375 define Package
/qt5base-xml
/install
376 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
379 define Package
/qt5base-plugin-bearer-generic
/install
380 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
383 define Package
/qt5base-plugin-input-evdevkeyboard
/install
384 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
387 define Package
/qt5base-plugin-input-evdevmouse
/install
388 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
391 define Package
/qt5base-plugin-input-evdevtablet
/install
392 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
395 define Package
/qt5base-plugin-input-evdevtouch
/install
396 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
399 define Package
/qt5base-plugin-imageformats-gif
/install
400 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqgif
)
403 define Package
/qt5base-plugin-imageformats-ico
/install
404 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
407 define Package
/qt5base-plugin-imageformats-jpeg
/install
408 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
411 define Package
/qt5base-plugin-platforms-linuxfb
/install
412 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
415 define Package
/qt5base-plugin-platforms-minimal
/install
416 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
419 define Package
/qt5base-plugin-platforms-offscreen
/install
420 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
423 define Package
/qt5base-plugin-sqldrivers
/install
424 $(call Build
/Install
/Plugins
,$(1),sqldrivers
,libqsqlite
)
427 define Package
/qt5base-examples
/install
428 $(call Build
/Install
/Examples
,$(1))
431 $(eval
$(call BuildPackage
,qt5base
))
432 $(eval
$(call BuildPackage
,qt5base-concurrent
))
433 $(eval
$(call BuildPackage
,qt5base-core
))
434 $(eval
$(call BuildPackage
,qt5base-gui
))
435 $(eval
$(call BuildPackage
,qt5base-network
))
436 $(eval
$(call BuildPackage
,qt5base-printSupport
))
437 $(eval
$(call BuildPackage
,qt5base-sql
))
438 $(eval
$(call BuildPackage
,qt5base-test
))
439 $(eval
$(call BuildPackage
,qt5base-widgets
))
440 $(eval
$(call BuildPackage
,qt5base-xml
))
441 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
442 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
443 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
444 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
445 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
446 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-gif
))
447 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
448 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
449 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
450 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
451 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
452 $(eval
$(call BuildPackage
,qt5base-plugin-sqldrivers-sqlite
))
453 $(eval
$(call BuildPackage
,qt5base-examples
))