qt5base: activate iconv support when libiconv-full is avaliable
[feed/video.git] / frameworks / qt5base / Makefile
1 #
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.
6 #
7
8 # TODO / known bugs:
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
12
13 include $(TOPDIR)/rules.mk
14
15 PKG_NAME:=qt5base
16 PKG_VERSION:=5.4.2
17 PKG_RELEASE:=1
18 PKG_MD5SUM:=67a95eec79ffc4a14f516ad6f3d24c96
19
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
23
24 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_SYS_NAME)
25 PKG_BUILD_PARALLEL:=1
26 PKG_BUILD_DEPENDS:=librpc
27 PKG_INSTALL:=1
28 PKG_USE_MIPS16:=0
29
30 include $(INCLUDE_DIR)/package.mk
31 include $(INCLUDE_DIR)/nls.mk
32 include ./files/qmake.mk
33
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
43
44 define Package/qt5base/Default
45 SECTION:=video-frameworks
46 CATEGORY:=Video
47 SUBMENU:=Frameworks and Toolkits
48 TITLE:=Qt5base
49 DEPENDS:=qt5base
50 URL:=http://qt.io
51 MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
52 endef
53
54 define Package/qt5base
55 $(call Package/qt5base/Default)
56 DEPENDS:=
57 MENU:=1
58 endef
59
60 define Package/qt5base-concurrent
61 $(call Package/qt5base/Default)
62 TITLE+=concurrent
63 DEPENDS+=+qt5base-core
64 endef
65
66 define Package/qt5base-core
67 $(call Package/qt5base/Default)
68 TITLE+=core
69 DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt +PACKAGE_libiconv-full:libiconv-full
70 endef
71
72 define Package/qt5base-gui
73 $(call Package/qt5base/Default)
74 TITLE+=gui
75 DEPENDS+=+qt5base-core +libpng
76 endef
77
78 define Package/qt5base-network
79 $(call Package/qt5base/Default)
80 TITLE+=network
81 DEPENDS+=+qt5base-core +libopenssl
82 endef
83
84 # seems to be only present as static lib
85 # define Package/qt5base-paltformSupport
86 # $(call Package/qt5base/Default)
87 # DEPENDS+=
88 # endef
89
90 define Package/qt5base-printSupport
91 $(call Package/qt5base/Default)
92 TITLE+=print support
93 DEPENDS+=+qt5base-core +qt5base-gui +qt5base-widgets
94 endef
95
96 define Package/qt5base-sql
97 $(call Package/qt5base/Default)
98 TITLE+=sql
99 DEPENDS+=+qt5base-core
100 endef
101
102 define Package/qt5base-test
103 $(call Package/qt5base/Default)
104 TITLE+=test
105 DEPENDS+=+qt5base-core
106 endef
107
108 define Package/qt5base-widgets
109 $(call Package/qt5base/Default)
110 TITLE+=widgets
111 DEPENDS+=+qt5base-core +qt5base-gui
112 endef
113
114 define Package/qt5base-xml
115 $(call Package/qt5base/Default)
116 TITLE+=xml
117 DEPENDS+=+qt5base-core
118 endef
119
120 #### plugins
121
122 ####### bearer
123
124 define Package/qt5base-plugin-bearer-generic
125 $(call Package/qt5base/Default)
126 TITLE+=bearer (plugin)
127 DEPENDS+=+qt5base-core +qt5base-network
128 endef
129
130 ####### generic / input
131
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
136 endef
137
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
142 endef
143
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
148 endef
149
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
154 endef
155
156 ####### imageformats
157
158 define Package/qt5base-plugin-imageformats-gif
159 $(call Package/qt5base/Default)
160 TITLE+=imageformat gif (plugin)
161 DEPENDS+=+qt5base-core +qt5base-gui
162 endef
163
164 define Package/qt5base-plugin-imageformats-ico
165 $(call Package/qt5base/Default)
166 TITLE+=imageformat ico (plugin)
167 DEPENDS+=+qt5base-core +qt5base-gui
168 endef
169
170 define Package/qt5base-plugin-imageformats-jpeg
171 $(call Package/qt5base/Default)
172 TITLE+=imageformat jpeg (plugin)
173 DEPENDS+=+qt5base-core +qt5base-gui +libjpeg
174 endef
175
176 ####### platforms
177
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
182 endef
183
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
188 endef
189
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
194 endef
195
196 ###### sql
197
198 define Package/qt5base-plugin-sqldrivers-sqlite
199 $(call Package/qt5base/Default)
200 TITLE+=sqldriver sqlite (plugin)
201 DEPENDS+=+qt5base-core +qt5base-sql +libsqlite3
202 endef
203
204 define Package/qt5base-examples
205 $(call Package/qt5base/Default)
206 TITLE+=examples
207 DEPENDS+=\
208 +qt5base-core \
209 +qt5base-gui \
210 +qt5base-widgets \
211 +qt5base-network \
212 +qt5base-sql \
213 +qt5base-xml \
214 +qt5base-printSupport \
215 +qt5base-concurrent
216 endef
217
218 define Build/Prepare
219 $(call Build/Prepare/Default)
220 $(CP) \
221 ./files/mkspecs/linux-openwrt-g++ \
222 $(PKG_BUILD_DIR)/mkspecs/
223 endef
224
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)" \
234 ./configure \
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) \
255 -v \
256 -release \
257 -opensource \
258 -confirm-license \
259 -c++11 \
260 -shared \
261 -largefile \
262 -accessibility \
263 $(if $(CONFIG_PACKAGE_qt5base-plugin-sqldrivers-sqlite),-system-sqlite,-no-sql-sqlite2) \
264 -no-sql-db2 \
265 -no-sql-ibase \
266 -no-sql-mysql \
267 -no-sql-oci \
268 -no-sql-odbc \
269 -no-sql-psql \
270 -no-sql-sqlite \
271 -no-sql-tds \
272 -no-qml-debug \
273 -no-nis \
274 -no-sse2 \
275 -no-sse3 \
276 -no-ssse3 \
277 -no-sse4.1 \
278 -no-sse4.2 \
279 -no-avx \
280 -no-avx2 \
281 $(if $(findstring -mdsp,$(TARGET_CFLAGS)),,-no-mips_dsp)\
282 $(if $(findstring -mdspr2,$(TARGET_CFLAGS)),,-no-mips_dspr2)\
283 -force-pkg-config \
284 -system-zlib \
285 -mtdev \
286 -no-journald \
287 $(if $(CONFIG_PACKAGE_qt5base-gui),-system-libpng,-no-libpng) \
288 $(if $(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg),-system-libjpeg,-no-libjpeg) \
289 -system-freetype \
290 -no-harfbuzz \
291 $(if $(CONFIG_PACKAGE_qt5base-network),-openssl-linked,-no-openssl) \
292 -system-pcre \
293 -system-xcb \
294 -system-xkbcommon \
295 -no-xinput2 \
296 -no-xcb-xlib \
297 -no-glib \
298 -no-pulseaudio \
299 -no-alsa \
300 -no-gtkstyle \
301 -nomake tools \
302 -make examples \
303 $(if $(CONFIG_PACKAGE_qt5base-gui),-gui,-no-gui) \
304 $(if $(CONFIG_PACKAGE_qt5base-plugin-imageformats-gif),,-no-gif) \
305 -widgets \
306 -no-optimized-qmake \
307 -no-cups \
308 $(if $(CONFIG_PACKAGE_libiconv-full),-iconv,-no-iconv) \
309 -evdev \
310 -no-icu \
311 -fontconfig \
312 -no-strip \
313 -no-pch \
314 -no-dbus \
315 -no-reduce-relocations \
316 -no-use-gold-linker \
317 -no-xcb \
318 -no-eglfs \
319 -no-directfb \
320 $(if $(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb),-linuxfb,-no-linuxfb) \
321 -no-kms \
322 $(if $(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal),,-qpa minimal) \
323 -xplatform linux-openwrt-g++ \
324 -no-opengl \
325 -no-system-proxies \
326 -no-warnings-are-errors \
327 )
328 endef
329
330 define Build/InstallDev
331 $(INSTALL_DIR) \
332 $(STAGING_DIR)/host/mk
333
334 $(CP) \
335 ./files/qmake.mk \
336 $(STAGING_DIR)/host/mk/
337
338 $(call Build/Install/HostFiles,$(1))
339 $(call Build/Install/Headers,$(1))
340 $(call Build/Install/Libs,$(1),*)
341 endef
342
343 define Package/qt5base-concurrent/install
344 $(call Build/Install/Libs,$(1),libQt5Concurrent)
345 endef
346
347 define Package/qt5base-core/install
348 $(call Build/Install/Libs,$(1),libQt5Core)
349 endef
350
351 define Package/qt5base-gui/install
352 $(call Build/Install/Libs,$(1),libQt5Gui)
353 endef
354
355 define Package/qt5base-network/install
356 $(call Build/Install/Libs,$(1),libQt5Network)
357 endef
358
359 define Package/qt5base-printSupport/install
360 $(call Build/Install/Libs,$(1),libQt5PrintSupport)
361 endef
362
363 define Package/qt5base-sql/install
364 $(call Build/Install/Libs,$(1),libQt5Sql)
365 endef
366
367 define Package/qt5base-test/install
368 $(call Build/Install/Libs,$(1),libQt5Test)
369 endef
370
371 define Package/qt5base-widgets/install
372 $(call Build/Install/Libs,$(1),libQt5Widgets)
373 endef
374
375 define Package/qt5base-xml/install
376 $(call Build/Install/Libs,$(1),libQt5Xml)
377 endef
378
379 define Package/qt5base-plugin-bearer-generic/install
380 $(call Build/Install/Plugins,$(1),bearer,libqgenericbearer)
381 endef
382
383 define Package/qt5base-plugin-input-evdevkeyboard/install
384 $(call Build/Install/Plugins,$(1),generic,libqevdevkeyboardplugin)
385 endef
386
387 define Package/qt5base-plugin-input-evdevmouse/install
388 $(call Build/Install/Plugins,$(1),generic,libqevdevmouseplugin)
389 endef
390
391 define Package/qt5base-plugin-input-evdevtablet/install
392 $(call Build/Install/Plugins,$(1),generic,libqevdevtabletplugin)
393 endef
394
395 define Package/qt5base-plugin-input-evdevtouch/install
396 $(call Build/Install/Plugins,$(1),generic,libqevdevtouchplugin)
397 endef
398
399 define Package/qt5base-plugin-imageformats-gif/install
400 $(call Build/Install/Plugins,$(1),imageformats,libqgif)
401 endef
402
403 define Package/qt5base-plugin-imageformats-ico/install
404 $(call Build/Install/Plugins,$(1),imageformats,libqico)
405 endef
406
407 define Package/qt5base-plugin-imageformats-jpeg/install
408 $(call Build/Install/Plugins,$(1),imageformats,libqjpeg)
409 endef
410
411 define Package/qt5base-plugin-platforms-linuxfb/install
412 $(call Build/Install/Plugins,$(1),platforms,libqlinuxfb)
413 endef
414
415 define Package/qt5base-plugin-platforms-minimal/install
416 $(call Build/Install/Plugins,$(1),platforms,libqminimal)
417 endef
418
419 define Package/qt5base-plugin-platforms-offscreen/install
420 $(call Build/Install/Plugins,$(1),platforms,libqoffscreen)
421 endef
422
423 define Package/qt5base-plugin-sqldrivers/install
424 $(call Build/Install/Plugins,$(1),sqldrivers,libqsqlite)
425 endef
426
427 define Package/qt5base-examples/install
428 $(call Build/Install/Examples,$(1))
429 endef
430
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))