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