Adding Qt5 base
[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
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/nls.mk
31 include ./files/qmake.mk
32
33 define Package/qt5base/Default
34 SECTION:=video-frameworks
35 CATEGORY:=Video
36 SUBMENU:=Frameworks and Toolkits
37 TITLE:=Qt5base
38 DEPENDS:=qt5base
39 URL:=http://qt.io
40 MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
41 endef
42
43 define Package/qt5base
44 $(call Package/qt5base/Default)
45 DEPENDS:=
46 MENU:=1
47 endef
48
49 define Package/qt5base-concurrent
50 $(call Package/qt5base/Default)
51 TITLE+=concurrent
52 DEPENDS+=+qt5base-core
53 endef
54
55 define Package/qt5base-core
56 $(call Package/qt5base/Default)
57 TITLE+=core
58 DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +icu +librt
59 endef
60
61 define Package/qt5base-gui
62 $(call Package/qt5base/Default)
63 TITLE+=gui
64 DEPENDS+=+qt5base-core +libpng
65 endef
66
67 define Package/qt5base-network
68 $(call Package/qt5base/Default)
69 TITLE+=network
70 DEPENDS+=+qt5base-core +libopenssl
71 endef
72
73 # seems to be only present as static lib
74 # define Package/qt5base-paltformSupport
75 # $(call Package/qt5base/Default)
76 # DEPENDS+=
77 # endef
78
79 define Package/qt5base-printSupport
80 $(call Package/qt5base/Default)
81 TITLE+=print support
82 DEPENDS+=+qt5base-core +qt5base-gui +qt5base-widgets
83 endef
84
85 define Package/qt5base-sql
86 $(call Package/qt5base/Default)
87 TITLE+=sql
88 DEPENDS+=+qt5base-core
89 endef
90
91 define Package/qt5base-test
92 $(call Package/qt5base/Default)
93 TITLE+=test
94 DEPENDS+=+qt5base-core
95 endef
96
97 define Package/qt5base-widgets
98 $(call Package/qt5base/Default)
99 TITLE+=widgets
100 DEPENDS+=+qt5base-core +qt5base-gui
101 endef
102
103 define Package/qt5base-xml
104 $(call Package/qt5base/Default)
105 TITLE+=xml
106 DEPENDS+=+qt5base-core
107 endef
108
109 #### plugins
110
111 ####### bearer
112
113 define Package/qt5base-plugin-bearer-generic
114 $(call Package/qt5base/Default)
115 TITLE+=bearer (plugin)
116 DEPENDS+=+qt5base-core +qt5base-network
117 endef
118
119 ####### generic / input
120
121 define Package/qt5base-plugin-input-evdevkeyboard
122 $(call Package/qt5base/Default)
123 TITLE+=evdev keyboard (plugin)
124 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
125 endef
126
127 define Package/qt5base-plugin-input-evdevmouse
128 $(call Package/qt5base/Default)
129 TITLE+=evdev mouse (plugin)
130 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
131 endef
132
133 define Package/qt5base-plugin-input-evdevtablet
134 $(call Package/qt5base/Default)
135 TITLE+=evdev tablet (plugin)
136 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
137 endef
138
139 define Package/qt5base-plugin-input-evdevtouch
140 $(call Package/qt5base/Default)
141 TITLE+=evdev touch (plugin)
142 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
143 endef
144
145 ####### imageformats
146
147 define Package/qt5base-plugin-imageformats-gif
148 $(call Package/qt5base/Default)
149 TITLE+=imageformat gif (plugin)
150 DEPENDS+=+qt5base-core +qt5base-gui
151 endef
152
153 define Package/qt5base-plugin-imageformats-ico
154 $(call Package/qt5base/Default)
155 TITLE+=imageformat ico (plugin)
156 DEPENDS+=+qt5base-core +qt5base-gui
157 endef
158
159 define Package/qt5base-plugin-imageformats-jpeg
160 $(call Package/qt5base/Default)
161 TITLE+=imageformat jpeg (plugin)
162 DEPENDS+=+qt5base-core +qt5base-gui +libjpeg
163 endef
164
165 ####### platforms
166
167 define Package/qt5base-plugin-platforms-linuxfb
168 $(call Package/qt5base/Default)
169 TITLE+=platform linuxfb (plugin)
170 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
171 endef
172
173 define Package/qt5base-plugin-platforms-minimal
174 $(call Package/qt5base/Default)
175 TITLE+=platform minimal (plugin)
176 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
177 endef
178
179 define Package/qt5base-plugin-platforms-offscreen
180 $(call Package/qt5base/Default)
181 TITLE+=platform offscreen (plugin)
182 DEPENDS+=+qt5base-core +qt5base-gui +libfreetype +fontconfig
183 endef
184
185 ###### sql
186
187 define Package/qt5base-plugin-sqldrivers-sqlite
188 $(call Package/qt5base/Default)
189 TITLE+=sqldriver sqlite (plugin)
190 DEPENDS+=+qt5base-core +qt5base-sql +libsqlite3
191 endef
192
193 define Package/qt5base-examples
194 $(call Package/qt5base/Default)
195 TITLE+=examples
196 DEPENDS+=\
197 +qt5base-core \
198 +qt5base-gui \
199 +qt5base-widgets \
200 +qt5base-network \
201 +qt5base-sql \
202 +qt5base-xml \
203 +qt5base-printSupport \
204 +qt5base-concurrent
205 endef
206
207 define Build/Prepare
208 $(call Build/Prepare/Default)
209 $(CP) \
210 ./files/mkspecs/linux-openwrt-g++ \
211 $(PKG_BUILD_DIR)/mkspecs/
212 endef
213
214 define Build/Configure
215 # CROSS/TARGET_* need to be passed to configure, in order to use cross-compiling tools to check for requirements.
216 # Usually used variables such as CC/CXX/CFLAGS/CXXFLAGS/LDFLAGS would be used for compilation of host tools (qmake, moc, etc.),
217 # hence we use the TARGET_* nomenclature.
218 ( cd $(PKG_BUILD_DIR) ; \
219 TARGET_CROSS="$(TARGET_CROSS)" \
220 TARGET_CFLAGS="$(TARGET_CFLAGS)" \
221 TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(TARGET_CXXFLAGS)" \
222 TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
223 ./configure \
224 -prefix $(QT_INSTALL_PREFIX) \
225 -extprefix $(QT_EXTPREFIX) \
226 -hostprefix $(QT_HOST_PREFIX) \
227 -bindir $(QT_INSTALL_BINS) \
228 -headerdir $(QT_INSTALL_HEADERS) \
229 -libdir $(QT_INSTALL_LIBS) \
230 -archdatadir $(QT_INSTALL_ARCHDATA) \
231 -plugindir $(QT_INSTALL_PLUGINS) \
232 -libexecdir $(QT_INSTALL_LIBEXECS) \
233 -importdir $(QT_INSTALL_IMPORTS) \
234 -qmldir $(QT_INSTALL_QML) \
235 -datadir $(QT_INSTALL_DATA) \
236 -docdir $(QT_INSTALL_DOCS) \
237 -translationdir $(QT_INSTALL_TRANSLATIONS) \
238 -sysconfdir $(QT_INSTALL_CONFIGURATION) \
239 -examplesdir $(QT_INSTALL_EXAMPLES) \
240 -testsdir $(QT_INSTALL_TESTS) \
241 -hostbindir $(QT_HOST_BINS) \
242 -hostlibdir $(QT_HOST_LIBS) \
243 -hostdatadir $(QT_HOST_DATA) \
244 -v \
245 -release \
246 -opensource \
247 -confirm-license \
248 -c++11 \
249 -shared \
250 -largefile \
251 -accessibility \
252 -system-sqlite \
253 -no-qml-debug \
254 -no-sse2 \
255 -no-sse3 \
256 -no-ssse3 \
257 -no-sse4.1 \
258 -no-sse4.2 \
259 -no-avx \
260 -no-avx2 \
261 -no-mips_dsp \
262 -no-mips_dspr2 \
263 -force-pkg-config \
264 -system-zlib \
265 -mtdev \
266 -no-journald \
267 -system-libpng \
268 -system-libjpeg \
269 -system-freetype \
270 -no-harfbuzz \
271 -openssl-linked \
272 -system-pcre \
273 -system-xcb \
274 -system-xkbcommon \
275 -no-xinput2 \
276 -no-xcb-xlib \
277 -no-glib \
278 -no-pulseaudio \
279 -alsa \
280 -no-gtkstyle \
281 -nomake tools \
282 -make examples \
283 -gui \
284 -widgets \
285 -no-optimized-qmake \
286 -no-cups \
287 -iconv \
288 -evdev \
289 -icu \
290 -fontconfig \
291 -no-strip \
292 -no-pch \
293 -no-dbus \
294 -no-reduce-relocations \
295 -no-use-gold-linker \
296 -no-xcb \
297 -no-eglfs \
298 -no-directfb \
299 -linuxfb \
300 -no-kms \
301 -qpa minimal \
302 -xplatform linux-openwrt-g++ \
303 -no-opengl \
304 -no-system-proxies \
305 -no-warnings-are-errors \
306 )
307 endef
308
309 define Build/InstallDev
310 $(INSTALL_DIR) \
311 $(STAGING_DIR)/host/mk
312
313 $(CP) \
314 ./files/qmake.mk \
315 $(STAGING_DIR)/host/mk/
316
317 $(call Build/Install/HostFiles,$(1))
318 $(call Build/Install/Headers,$(1))
319 $(call Build/Install/Libs,$(1),*)
320 endef
321
322 define Package/qt5base-concurrent/install
323 $(call Build/Install/Libs,$(1),libQt5Concurrent)
324 endef
325
326 define Package/qt5base-core/install
327 $(call Build/Install/Libs,$(1),libQt5Core)
328 endef
329
330 define Package/qt5base-gui/install
331 $(call Build/Install/Libs,$(1),libQt5Gui)
332 endef
333
334 define Package/qt5base-network/install
335 $(call Build/Install/Libs,$(1),libQt5Network)
336 endef
337
338 define Package/qt5base-printSupport/install
339 $(call Build/Install/Libs,$(1),libQt5PrintSupport)
340 endef
341
342 define Package/qt5base-sql/install
343 $(call Build/Install/Libs,$(1),libQt5Sql)
344 endef
345
346 define Package/qt5base-test/install
347 $(call Build/Install/Libs,$(1),libQt5Test)
348 endef
349
350 define Package/qt5base-widgets/install
351 $(call Build/Install/Libs,$(1),libQt5Widgets)
352 endef
353
354 define Package/qt5base-xml/install
355 $(call Build/Install/Libs,$(1),libQt5Xml)
356 endef
357
358 define Package/qt5base-plugin-bearer-generic/install
359 $(call Build/Install/Plugins,$(1),bearer,libqgenericbearer)
360 endef
361
362 define Package/qt5base-plugin-input-evdevkeyboard/install
363 $(call Build/Install/Plugins,$(1),generic,libqevdevkeyboardplugin)
364 endef
365
366 define Package/qt5base-plugin-input-evdevmouse/install
367 $(call Build/Install/Plugins,$(1),generic,libqevdevmouseplugin)
368 endef
369
370 define Package/qt5base-plugin-input-evdevtablet/install
371 $(call Build/Install/Plugins,$(1),generic,libqevdevtabletplugin)
372 endef
373
374 define Package/qt5base-plugin-input-evdevtouch/install
375 $(call Build/Install/Plugins,$(1),generic,libqevdevtouchplugin)
376 endef
377
378 define Package/qt5base-plugin-imageformats-gif/install
379 $(call Build/Install/Plugins,$(1),imageformats,libqgif)
380 endef
381
382 define Package/qt5base-plugin-imageformats-ico/install
383 $(call Build/Install/Plugins,$(1),imageformats,libqico)
384 endef
385
386 define Package/qt5base-plugin-imageformats-jpeg/install
387 $(call Build/Install/Plugins,$(1),imageformats,libqjpeg)
388 endef
389
390 define Package/qt5base-plugin-platforms-linuxfb/install
391 $(call Build/Install/Plugins,$(1),platforms,libqlinuxfb)
392 endef
393
394 define Package/qt5base-plugin-platforms-minimal/install
395 $(call Build/Install/Plugins,$(1),platforms,libqminimal)
396 endef
397
398 define Package/qt5base-plugin-platforms-offscreen/install
399 $(call Build/Install/Plugins,$(1),platforms,libqoffscreen)
400 endef
401
402 define Package/qt5base-plugin-sqldrivers/install
403 $(call Build/Install/Plugins,$(1),sqldrivers,libqsqlite)
404 endef
405
406 define Package/qt5base-examples/install
407 $(call Build/Install/Examples,$(1))
408 endef
409
410 $(eval $(call BuildPackage,qt5base))
411 $(eval $(call BuildPackage,qt5base-concurrent))
412 $(eval $(call BuildPackage,qt5base-core))
413 $(eval $(call BuildPackage,qt5base-gui))
414 $(eval $(call BuildPackage,qt5base-network))
415 $(eval $(call BuildPackage,qt5base-printSupport))
416 $(eval $(call BuildPackage,qt5base-sql))
417 $(eval $(call BuildPackage,qt5base-test))
418 $(eval $(call BuildPackage,qt5base-widgets))
419 $(eval $(call BuildPackage,qt5base-xml))
420 $(eval $(call BuildPackage,qt5base-plugin-bearer-generic))
421 $(eval $(call BuildPackage,qt5base-plugin-input-evdevkeyboard))
422 $(eval $(call BuildPackage,qt5base-plugin-input-evdevmouse))
423 $(eval $(call BuildPackage,qt5base-plugin-input-evdevtablet))
424 $(eval $(call BuildPackage,qt5base-plugin-input-evdevtouch))
425 $(eval $(call BuildPackage,qt5base-plugin-imageformats-gif))
426 $(eval $(call BuildPackage,qt5base-plugin-imageformats-ico))
427 $(eval $(call BuildPackage,qt5base-plugin-imageformats-jpeg))
428 $(eval $(call BuildPackage,qt5base-plugin-platforms-linuxfb))
429 $(eval $(call BuildPackage,qt5base-plugin-platforms-minimal))
430 $(eval $(call BuildPackage,qt5base-plugin-platforms-offscreen))
431 $(eval $(call BuildPackage,qt5base-plugin-sqldrivers-sqlite))
432 $(eval $(call BuildPackage,qt5base-examples))