2 # Copyright (C) 2008-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 # - handle software which uses qmake in a more generic way (move functionality / generic qmake-config into buildroot)
10 # - use generic qmake, moc, etc. executables since building them within the qt stack will get redundant and annyoing when other sw will need them as well
11 # - test/add X11/xcb support
12 # - handle plugins in a granular way (find out which packages should provide which plugins)
14 include $(TOPDIR
)/rules.mk
17 PKG_VERSION
:=4.7.0-beta2
20 PKG_SOURCE
:=qt-everywhere-opensource-src-
$(PKG_VERSION
).
tar.gz
21 PKG_SOURCE_URL
:=ftp
://ftp.qt.nokia.com
/qt
/source
22 PKG_BUILD_DIR
=$(BUILD_DIR
)/qt-everywhere-opensource-src-
$(PKG_VERSION
)
24 include $(INCLUDE_DIR
)/package.mk
26 # this should be moved to a more generic place later, as other packages are configured different as well depending on available nptl support
27 ifeq ($(CONFIG_USE_GLIBC
),y
)
30 ifeq ($(CONFIG_USE_EGLIBC
),y
)
33 ifeq ($(CONFIG_UCLIBC_VERSION_0_9_32
),y
)
37 define Package
/qt4
/Default
38 SECTION
:=xorg-framework
43 URL
:=http
://qt.nokia.com
/
47 $(call Package
/qt4
/Default
)
48 DEPENDS
:=@FEATURE_drawing-backend_DirectFB
+FEATURE_drawing-backend_DirectFB
:directfb
+zlib
+libstdcpp
+libsqlite3
# require directfb for now, as other systems (libX11, xcb) are untested
51 define Package
/qt4-gui
52 $(call Package
/qt4
/Default
)
53 #DEPENDS+=+FEATURE_drawing-backend_DirectFB:directfb +libpng +libtiff +libjpeg +libfreetype
54 DEPENDS
+=+libpng
+libtiff
+libjpeg
+libfreetype
+qt4-network
58 define Package
/qt4-demos
59 $(call Package
/qt4
/Default
)
64 define Package
/qt4-examples
65 $(call Package
/qt4
/Default
)
70 define Package
/qt4-network
71 $(call Package
/qt4
/Default
)
75 define Package
/qt4-sqlite
76 $(call Package
/qt4
/Default
)
81 define Package
/qt4-mysql
82 $(call Package
/qt4
/Default
)
84 DEPENDS
+=+libmysqlclient
87 #define Package/qt4-multimedia
88 # $(call Package/qt4/Default)
92 #define Package/qt4-audio-backend
93 # $(call Package/qt4/Default)
94 # TITLE+=(audio-backend)
97 define Package
/qt4-phonon
98 $(call Package
/qt4
/Default
)
100 DEPENDS
+=+qt4-gui
+qt4-xml
+qt4-dbus
+qt4-network
103 #define Package/qt4-phonon-backend
104 # $(call Package/qt4/Default)
105 # TITLE+=(phonon-backend)
108 define Package
/qt4-svg
109 $(call Package
/qt4
/Default
)
111 #DEPENDS+=+qt4-gui @BROKEN
112 DEPENDS
+=+qt4-gui
+qt4-network
115 define Package
/qt4-webkit
116 $(call Package
/qt4
/Default
)
118 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32
+libsqlite3
+qt4-phonon
+qt4-dbus
+qt4-xml
+qt4-gui
+qt4-network
# versions of uclibc prior 0.9.32 do not have nptl support
121 define Package
/qt4-script
122 $(call Package
/qt4
/Default
)
124 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32
# versions of uclibc prior 0.9.32 do not have nptl support
127 define Package
/qt4-scripttools
128 $(call Package
/qt4
/Default
)
130 DEPENDS
+=+qt4-script
+qt4-gui
+qt4-network
133 #define Package/qt4-accessibility
134 # $(call Package/qt4/Default)
135 # TITLE+=(accessibility)
138 #define Package/qt4-javascript-jit
139 # $(call Package/qt4/Default)
140 # TITLE+=(javascript-jit)
143 #define Package/qt4-cups
144 # $(call Package/qt4/Default)
148 define Package
/qt4-dbus
149 $(call Package
/qt4
/Default
)
151 DEPENDS
+=+libdbus
+qt4-xml
154 #define Package/qt4-gtkstyle
155 # $(call Package/qt4/Default)
159 #define Package/qt4-glib
160 # $(call Package/qt4/Default)
164 define Package
/qt4-qt3support
165 $(call Package
/qt4
/Default
)
167 DEPENDS
+=+qt4-gui
+qt4-xml
170 define Package
/qt4-declarative
171 $(call Package
/qt4
/Default
)
173 DEPENDS
+=+qt4-script
+qt4-xml
+qt4-gui
+qt4-network
176 define Package
/qt4-xml
177 $(call Package
/qt4
/Default
)
181 TARGET_CFLAGS
+="-I$(STAGING_DIR)/usr/include/freetype2 -I$(PKG_BUILD_DIR)/include"
183 define Build
/Configure
185 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
186 # svg: always compile in svg-support, as once qt is built without, strange include errors occur when we're going to compile qt4-svg afterwards
187 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
188 # do not use fontconfig as it doesn't work anyway for qte
189 # bindir: bindir is where the host tools (qmake, moc, rcc, uic) will get installed into - they are just used on the host and not goig to be packaged
191 cd
$(PKG_BUILD_DIR
); \
192 QPATH
='mkspecs/qws/linux-openwrt-g++' ; \
194 echo
'#include "../../linux-g++/qplatformdefs.h"' \
195 >> $$$$QPATH/qplatformdefs.h
; \
196 echo
'include(../../common/g++.conf)' \
197 >> $$$$QPATH/qmake.conf
; \
198 echo
'include(../../common/linux.conf)' \
199 >> $$$$QPATH/qmake.conf
; \
200 echo
'include(../../common/qws.conf)' \
201 >> $$$$QPATH/qmake.conf
; \
202 echo
"QMAKE_CC = $(TARGET_CC)" \
203 >> $$$$QPATH/qmake.conf
; \
204 echo
"QMAKE_CXX = $(TARGET_CXX)" \
205 >> $$$$QPATH/qmake.conf
; \
206 echo
"QMAKE_AR = $(TARGET_CROSS)ar cqs" \
207 >> $$$$QPATH/qmake.conf
; \
208 echo
"QMAKE_OBJCOPY = $(TARGET_CROSS)objcopy" \
209 >> $$$$QPATH/qmake.conf
; \
210 echo
"QMAKE_RANLIB = $(TARGET_CROSS)ranlib" \
211 >> $$$$QPATH/qmake.conf
; \
212 echo
"QMAKE_CFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
213 >> $$$$QPATH/qmake.conf
; \
214 echo
"QMAKE_CXXFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
215 >> $$$$QPATH/qmake.conf
; \
216 echo
"QMAKE_LINK = $(TARGET_CXX)" \
217 >> $$$$QPATH/qmake.conf
; \
218 echo
"QMAKE_LINK_SHLIB = $(TARGET_CXX)" \
219 >> $$$$QPATH/qmake.conf
; \
220 echo
"QMAKE_LINK_C = $(TARGET_CC)" \
221 >> $$$$QPATH/qmake.conf
; \
222 echo
"QMAKE_LINK_C_SHLIB = $(TARGET_CC)" \
223 >> $$$$QPATH/qmake.conf
; \
224 echo
"QMAKE_LFLAGS = -L$(PKG_BUILD_DIR)/lib $(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \
225 >> $$$$QPATH/qmake.conf
; \
226 echo
"QMAKE_STRIP = : " \
227 >> $$$$QPATH/qmake.conf
; \
228 echo
"QMAKE_STRIPFLAGS_LIB = " \
229 >> $$$$QPATH/qmake.conf
; \
230 echo
'load(qt_config)' \
231 >> $$$$QPATH/qmake.conf
; \
232 echo yes | .
/configure \
233 -prefix $(CONFIGURE_PREFIX
) \
234 -bindir $(CONFIGURE_PREFIX
)/bin \
235 -libdir $(CONFIGURE_PREFIX
)/lib \
236 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
237 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
238 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
239 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
240 -sysconfdir
/etc
/Qt \
247 -nomake translations \
249 -platform linux-g
++ \
264 -no-decoration-styled \
265 -no-decoration-windows \
266 -no-decoration-default \
273 -$(if
$(NPTL
),webkit
,-no-webkit
) \
275 -$(if
$(NPTL
),script
,-no-script
) \
276 -$(if
$(NPTL
),scripttools
,-no-scripttools
) \
278 -$(if
$(NPTL
),declarative
,-no-declarative
) \
304 -no-gfx-multiscreen \
309 # just passing <make install> results in not building 3rdparty/webkit/JavaScriptCore
310 $(MAKE
) -C
$(PKG_BUILD_DIR
)
311 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
312 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
315 define Build
/InstallDev
317 $(STAGING_DIR_HOST
)/bin
319 # host tools (qmake, moc, rcc, uic)
321 $(PKG_INSTALL_DIR
)/usr
/bin
/{qmake
,moc
,rcc
,uic
} \
322 $(STAGING_DIR_HOST
)/bin
/
325 $(1)/usr
/share
/mkspecs \
326 $(1)/usr
/lib
/pkgconfig \
329 $(1)/usr
/lib
/Qt
/plugins
332 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
333 $(1)/usr
/share
/mkspecs
/
336 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
337 $(1)/usr
/lib
/pkgconfig
/
340 $(PKG_INSTALL_DIR
)/usr
/include/* \
344 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
348 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
349 # $(1)/usr/lib/Qt/plugins/
352 define Package
/qt4
/install
355 $(1)/usr
/lib
/Qt
/plugins
358 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
362 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
363 # $(1)/usr/lib/Qt/plugins/codecs/
366 define Package
/qt4-gui
/install
369 $(1)/usr
/lib
/Qt
/plugins
372 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
375 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
377 /usr
/share
/fonts
/ttf-dejavu \
380 # we use the dejavue font package instead
382 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
383 # $(1)/usr/lib/fonts/
386 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
387 # $(1)/usr/lib/Qt/plugins/
390 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
391 # $(1)/usr/lib/Qt/plugins/
394 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
395 # $(1)/usr/lib/Qt/plugins/
398 define Package
/qt4-demos
/install
403 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
414 define Package
/qt4-examples
/install
419 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
430 define Package
/qt4-network
/install
435 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
439 define Package
/qt4-sqlite
/install
441 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
444 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
448 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
449 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
452 define Package
/qt4-mysql
/install
454 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
457 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
461 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
462 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
465 #define Package/qt4-multimedia/install
470 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
474 define Package
/qt4-phonon
/install
479 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
483 define Package
/qt4-svg
/install
486 $(1)/usr
/lib
/Qt
/plugins
489 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
493 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
494 # $(1)/usr/lib/Qt/plugins/
497 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
498 # $(1)/usr/lib/Qt/plugins/
501 define Package
/qt4-webkit
/install
504 $(1)/usr
/lib
/Qt
/plugins
507 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
511 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
512 # $(1)/usr/lib/Qt/plugins/
515 define Package
/qt4-script
/install
518 $(1)/usr
/lib
/Qt
/plugins
521 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
525 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
526 # $(1)/usr/lib/Qt/plugins/
529 define Package
/qt4-scripttools
/install
534 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
538 define Package
/qt4-dbus
/install
543 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
547 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
551 define Package
/qt4-qt3-support
/install
554 $(1)/usr
/lib
/Qt
/plugins
557 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
561 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
562 # $(1)/usr/lib/Qt/plugins/
565 define Package
/qt4-declarative
/install
570 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDeclarative.so
* \
574 define Package
/qt4-xml
/install
579 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtXml.so
* \
584 $(eval
$(call BuildPackage
,qt4
))
585 $(eval
$(call BuildPackage
,qt4-gui
))
586 $(eval
$(call BuildPackage
,qt4-demos
))
587 $(eval
$(call BuildPackage
,qt4-examples
))
588 $(eval
$(call BuildPackage
,qt4-network
))
589 $(eval
$(call BuildPackage
,qt4-sqlite
))
590 $(eval
$(call BuildPackage
,qt4-mysql
))
591 #$(eval $(call BuildPackage,qt4-multimedia))
592 #$(eval $(call BuildPackage,qt4-audio-backend))
593 $(eval
$(call BuildPackage
,qt4-phonon
))
594 #$(eval $(call BuildPackage,qt4-phonon-backend))
595 $(eval
$(call BuildPackage
,qt4-svg
))
596 $(eval
$(call BuildPackage
,qt4-webkit
))
597 $(eval
$(call BuildPackage
,qt4-script
))
598 $(eval
$(call BuildPackage
,qt4-scripttools
))
599 #$(eval $(call BuildPackage,qt4-accessibility))
600 #$(eval $(call BuildPackage,qt4-javascript-jit))
601 #$(eval $(call BuildPackage,qt4-cups))
602 $(eval
$(call BuildPackage
,qt4-dbus
))
603 #$(eval $(call BuildPackage,qt4-gtkstyle))
604 #$(eval $(call BuildPackage,qt4-glib))
605 $(eval
$(call BuildPackage
,qt4-qt3support
))
606 $(eval
$(call BuildPackage
,qt4-declarative
))
607 $(eval
$(call BuildPackage
,qt4-xml
))