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 define Package
/qt5base
/Default
35 SECTION
:=video-frameworks
37 SUBMENU
:=Frameworks and Toolkits
41 MAINTAINER
:=Mirko Vogt
<mirko@openwrt.org
>
44 define Package
/qt5base
45 $(call Package
/qt5base
/Default
)
50 define Package
/qt5base-concurrent
51 $(call Package
/qt5base
/Default
)
53 DEPENDS
+=+qt5base-core
56 define Package
/qt5base-core
57 $(call Package
/qt5base
/Default
)
59 DEPENDS
+=+libpthread
+zlib
+libpcre16
+libstdcpp
+librt
62 define Package
/qt5base-gui
63 $(call Package
/qt5base
/Default
)
65 DEPENDS
+=+qt5base-core
+libpng
68 define Package
/qt5base-network
69 $(call Package
/qt5base
/Default
)
71 DEPENDS
+=+qt5base-core
+libopenssl
74 # seems to be only present as static lib
75 # define Package/qt5base-paltformSupport
76 # $(call Package/qt5base/Default)
80 define Package
/qt5base-printSupport
81 $(call Package
/qt5base
/Default
)
83 DEPENDS
+=+qt5base-core
+qt5base-gui
+qt5base-widgets
86 define Package
/qt5base-sql
87 $(call Package
/qt5base
/Default
)
89 DEPENDS
+=+qt5base-core
92 define Package
/qt5base-test
93 $(call Package
/qt5base
/Default
)
95 DEPENDS
+=+qt5base-core
98 define Package
/qt5base-widgets
99 $(call Package
/qt5base
/Default
)
101 DEPENDS
+=+qt5base-core
+qt5base-gui
104 define Package
/qt5base-xml
105 $(call Package
/qt5base
/Default
)
107 DEPENDS
+=+qt5base-core
114 define Package
/qt5base-plugin-bearer-generic
115 $(call Package
/qt5base
/Default
)
116 TITLE
+=bearer
(plugin
)
117 DEPENDS
+=+qt5base-core
+qt5base-network
120 ####### generic / input
122 define Package
/qt5base-plugin-input-evdevkeyboard
123 $(call Package
/qt5base
/Default
)
124 TITLE
+=evdev keyboard
(plugin
)
125 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
128 define Package
/qt5base-plugin-input-evdevmouse
129 $(call Package
/qt5base
/Default
)
130 TITLE
+=evdev mouse
(plugin
)
131 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
134 define Package
/qt5base-plugin-input-evdevtablet
135 $(call Package
/qt5base
/Default
)
136 TITLE
+=evdev tablet
(plugin
)
137 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
140 define Package
/qt5base-plugin-input-evdevtouch
141 $(call Package
/qt5base
/Default
)
142 TITLE
+=evdev touch
(plugin
)
143 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
148 define Package
/qt5base-plugin-imageformats-gif
149 $(call Package
/qt5base
/Default
)
150 TITLE
+=imageformat gif
(plugin
)
151 DEPENDS
+=+qt5base-core
+qt5base-gui
154 define Package
/qt5base-plugin-imageformats-ico
155 $(call Package
/qt5base
/Default
)
156 TITLE
+=imageformat ico
(plugin
)
157 DEPENDS
+=+qt5base-core
+qt5base-gui
160 define Package
/qt5base-plugin-imageformats-jpeg
161 $(call Package
/qt5base
/Default
)
162 TITLE
+=imageformat jpeg
(plugin
)
163 DEPENDS
+=+qt5base-core
+qt5base-gui
+libjpeg
168 define Package
/qt5base-plugin-platforms-linuxfb
169 $(call Package
/qt5base
/Default
)
170 TITLE
+=platform linuxfb
(plugin
)
171 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
174 define Package
/qt5base-plugin-platforms-minimal
175 $(call Package
/qt5base
/Default
)
176 TITLE
+=platform minimal
(plugin
)
177 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
180 define Package
/qt5base-plugin-platforms-offscreen
181 $(call Package
/qt5base
/Default
)
182 TITLE
+=platform offscreen
(plugin
)
183 DEPENDS
+=+qt5base-core
+qt5base-gui
+libfreetype
+fontconfig
188 define Package
/qt5base-plugin-sqldrivers-sqlite
189 $(call Package
/qt5base
/Default
)
190 TITLE
+=sqldriver sqlite
(plugin
)
191 DEPENDS
+=+qt5base-core
+qt5base-sql
+libsqlite3
194 define Package
/qt5base-examples
195 $(call Package
/qt5base
/Default
)
204 +qt5base-printSupport \
209 $(call Build
/Prepare
/Default
)
211 .
/files
/mkspecs
/linux-openwrt-g
++ \
212 $(PKG_BUILD_DIR
)/mkspecs
/
215 define Build
/Configure
216 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
217 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
218 # hence we use the TARGET_* nomenclature.
219 ( cd
$(PKG_BUILD_DIR
) ; \
220 TARGET_CROSS
="$(TARGET_CROSS)" \
221 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
222 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
223 TARGET_LDFLAGS
="$(TARGET_LDFLAGS)" \
225 -prefix $(QT_INSTALL_PREFIX
) \
226 -extprefix
$(QT_EXTPREFIX
) \
227 -hostprefix
$(QT_HOST_PREFIX
) \
228 -bindir $(QT_INSTALL_BINS
) \
229 -headerdir
$(QT_INSTALL_HEADERS
) \
230 -libdir $(QT_INSTALL_LIBS
) \
231 -archdatadir
$(QT_INSTALL_ARCHDATA
) \
232 -plugindir
$(QT_INSTALL_PLUGINS
) \
233 -libexecdir
$(QT_INSTALL_LIBEXECS
) \
234 -importdir
$(QT_INSTALL_IMPORTS
) \
235 -qmldir
$(QT_INSTALL_QML
) \
236 -datadir $(QT_INSTALL_DATA
) \
237 -docdir
$(QT_INSTALL_DOCS
) \
238 -translationdir
$(QT_INSTALL_TRANSLATIONS
) \
239 -sysconfdir
$(QT_INSTALL_CONFIGURATION
) \
240 -examplesdir
$(QT_INSTALL_EXAMPLES
) \
241 -testsdir
$(QT_INSTALL_TESTS
) \
242 -hostbindir
$(QT_HOST_BINS
) \
243 -hostlibdir
$(QT_HOST_LIBS
) \
244 -hostdatadir
$(QT_HOST_DATA
) \
286 -no-optimized-qmake \
295 -no-reduce-relocations \
296 -no-use-gold-linker \
303 -xplatform linux-openwrt-g
++ \
306 -no-warnings-are-errors \
310 define Build
/InstallDev
312 $(STAGING_DIR
)/host
/mk
316 $(STAGING_DIR
)/host
/mk
/
318 $(call Build
/Install
/HostFiles
,$(1))
319 $(call Build
/Install
/Headers
,$(1))
320 $(call Build
/Install
/Libs
,$(1),*)
323 define Package
/qt5base-concurrent
/install
324 $(call Build
/Install
/Libs
,$(1),libQt5Concurrent
)
327 define Package
/qt5base-core
/install
328 $(call Build
/Install
/Libs
,$(1),libQt5Core
)
331 define Package
/qt5base-gui
/install
332 $(call Build
/Install
/Libs
,$(1),libQt5Gui
)
335 define Package
/qt5base-network
/install
336 $(call Build
/Install
/Libs
,$(1),libQt5Network
)
339 define Package
/qt5base-printSupport
/install
340 $(call Build
/Install
/Libs
,$(1),libQt5PrintSupport
)
343 define Package
/qt5base-sql
/install
344 $(call Build
/Install
/Libs
,$(1),libQt5Sql
)
347 define Package
/qt5base-test
/install
348 $(call Build
/Install
/Libs
,$(1),libQt5Test
)
351 define Package
/qt5base-widgets
/install
352 $(call Build
/Install
/Libs
,$(1),libQt5Widgets
)
355 define Package
/qt5base-xml
/install
356 $(call Build
/Install
/Libs
,$(1),libQt5Xml
)
359 define Package
/qt5base-plugin-bearer-generic
/install
360 $(call Build
/Install
/Plugins
,$(1),bearer
,libqgenericbearer
)
363 define Package
/qt5base-plugin-input-evdevkeyboard
/install
364 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevkeyboardplugin
)
367 define Package
/qt5base-plugin-input-evdevmouse
/install
368 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevmouseplugin
)
371 define Package
/qt5base-plugin-input-evdevtablet
/install
372 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtabletplugin
)
375 define Package
/qt5base-plugin-input-evdevtouch
/install
376 $(call Build
/Install
/Plugins
,$(1),generic
,libqevdevtouchplugin
)
379 define Package
/qt5base-plugin-imageformats-gif
/install
380 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqgif
)
383 define Package
/qt5base-plugin-imageformats-ico
/install
384 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqico
)
387 define Package
/qt5base-plugin-imageformats-jpeg
/install
388 $(call Build
/Install
/Plugins
,$(1),imageformats
,libqjpeg
)
391 define Package
/qt5base-plugin-platforms-linuxfb
/install
392 $(call Build
/Install
/Plugins
,$(1),platforms
,libqlinuxfb
)
395 define Package
/qt5base-plugin-platforms-minimal
/install
396 $(call Build
/Install
/Plugins
,$(1),platforms
,libqminimal
)
399 define Package
/qt5base-plugin-platforms-offscreen
/install
400 $(call Build
/Install
/Plugins
,$(1),platforms
,libqoffscreen
)
403 define Package
/qt5base-plugin-sqldrivers
/install
404 $(call Build
/Install
/Plugins
,$(1),sqldrivers
,libqsqlite
)
407 define Package
/qt5base-examples
/install
408 $(call Build
/Install
/Examples
,$(1))
411 $(eval
$(call BuildPackage
,qt5base
))
412 $(eval
$(call BuildPackage
,qt5base-concurrent
))
413 $(eval
$(call BuildPackage
,qt5base-core
))
414 $(eval
$(call BuildPackage
,qt5base-gui
))
415 $(eval
$(call BuildPackage
,qt5base-network
))
416 $(eval
$(call BuildPackage
,qt5base-printSupport
))
417 $(eval
$(call BuildPackage
,qt5base-sql
))
418 $(eval
$(call BuildPackage
,qt5base-test
))
419 $(eval
$(call BuildPackage
,qt5base-widgets
))
420 $(eval
$(call BuildPackage
,qt5base-xml
))
421 $(eval
$(call BuildPackage
,qt5base-plugin-bearer-generic
))
422 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevkeyboard
))
423 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevmouse
))
424 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtablet
))
425 $(eval
$(call BuildPackage
,qt5base-plugin-input-evdevtouch
))
426 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-gif
))
427 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-ico
))
428 $(eval
$(call BuildPackage
,qt5base-plugin-imageformats-jpeg
))
429 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-linuxfb
))
430 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-minimal
))
431 $(eval
$(call BuildPackage
,qt5base-plugin-platforms-offscreen
))
432 $(eval
$(call BuildPackage
,qt5base-plugin-sqldrivers-sqlite
))
433 $(eval
$(call BuildPackage
,qt5base-examples
))