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