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 define Package
/qt4
/Default
27 SECTION
:=xorg-framework
32 URL
:=http
://qt.nokia.com
/
36 $(call Package
/qt4
/Default
)
37 DEPENDS
:=@FEATURE_drawing-backend_DirectFB
+FEATURE_drawing-backend_DirectFB
:directfb
+zlib
+libstdcpp
+libsqlite3
# require directfb for now, as other systems (libX11, xcb) are untested
40 define Package
/qt4-gui
41 $(call Package
/qt4
/Default
)
42 #DEPENDS+=+FEATURE_drawing-backend_DirectFB:directfb +libpng +libtiff +libjpeg +libfreetype
43 DEPENDS
+=+libpng
+libtiff
+libjpeg
+libfreetype
+qt4-network
47 define Package
/qt4-demos
48 $(call Package
/qt4
/Default
)
53 define Package
/qt4-examples
54 $(call Package
/qt4
/Default
)
59 define Package
/qt4-network
60 $(call Package
/qt4
/Default
)
64 define Package
/qt4-sqlite
65 $(call Package
/qt4
/Default
)
70 define Package
/qt4-mysql
71 $(call Package
/qt4
/Default
)
73 DEPENDS
+=+libmysqlclient
76 #define Package/qt4-multimedia
77 # $(call Package/qt4/Default)
81 #define Package/qt4-audio-backend
82 # $(call Package/qt4/Default)
83 # TITLE+=(audio-backend)
86 define Package
/qt4-phonon
87 $(call Package
/qt4
/Default
)
89 DEPENDS
+=+qt4-gui
+qt4-xml
+qt4-dbus
+qt4-network
92 #define Package/qt4-phonon-backend
93 # $(call Package/qt4/Default)
94 # TITLE+=(phonon-backend)
97 define Package
/qt4-svg
98 $(call Package
/qt4
/Default
)
100 #DEPENDS+=+qt4-gui @BROKEN
101 DEPENDS
+=+qt4-gui
+qt4-network
104 define Package
/qt4-webkit
105 $(call Package
/qt4
/Default
)
107 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
110 define Package
/qt4-script
111 $(call Package
/qt4
/Default
)
113 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32
# versions of uclibc prior 0.9.32 do not have nptl support
116 define Package
/qt4-scripttools
117 $(call Package
/qt4
/Default
)
119 DEPENDS
+=+qt4-script
+qt4-gui
+qt4-network
122 #define Package/qt4-accessibility
123 # $(call Package/qt4/Default)
124 # TITLE+=(accessibility)
127 #define Package/qt4-javascript-jit
128 # $(call Package/qt4/Default)
129 # TITLE+=(javascript-jit)
132 #define Package/qt4-cups
133 # $(call Package/qt4/Default)
137 define Package
/qt4-dbus
138 $(call Package
/qt4
/Default
)
140 DEPENDS
+=+libdbus
+qt4-xml
143 #define Package/qt4-gtkstyle
144 # $(call Package/qt4/Default)
148 #define Package/qt4-glib
149 # $(call Package/qt4/Default)
153 define Package
/qt4-qt3support
154 $(call Package
/qt4
/Default
)
156 DEPENDS
+=+qt4-gui
+qt4-xml
159 define Package
/qt4-declarative
160 $(call Package
/qt4
/Default
)
162 DEPENDS
+=+qt4-script
+qt4-xml
+qt4-gui
+qt4-network
165 define Package
/qt4-xml
166 $(call Package
/qt4
/Default
)
170 TARGET_CFLAGS
+="-I$(STAGING_DIR)/usr/include/freetype2 -I$(PKG_BUILD_DIR)/include"
172 define Build
/Configure
174 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
175 # 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
176 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
177 # do not use fontconfig as it doesn't work anyway for qte
178 # 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
180 cd
$(PKG_BUILD_DIR
); \
181 QPATH
='mkspecs/qws/linux-openwrt-g++' ; \
183 echo
'#include "../../linux-g++/qplatformdefs.h"' \
184 >> $$$$QPATH/qplatformdefs.h
; \
185 echo
'include(../../common/g++.conf)' \
186 >> $$$$QPATH/qmake.conf
; \
187 echo
'include(../../common/linux.conf)' \
188 >> $$$$QPATH/qmake.conf
; \
189 echo
'include(../../common/qws.conf)' \
190 >> $$$$QPATH/qmake.conf
; \
191 echo
"QMAKE_CC = $(TARGET_CC)" \
192 >> $$$$QPATH/qmake.conf
; \
193 echo
"QMAKE_CXX = $(TARGET_CXX)" \
194 >> $$$$QPATH/qmake.conf
; \
195 echo
"QMAKE_AR = $(TARGET_CROSS)ar cqs" \
196 >> $$$$QPATH/qmake.conf
; \
197 echo
"QMAKE_OBJCOPY = $(TARGET_CROSS)objcopy" \
198 >> $$$$QPATH/qmake.conf
; \
199 echo
"QMAKE_RANLIB = $(TARGET_CROSS)ranlib" \
200 >> $$$$QPATH/qmake.conf
; \
201 echo
"QMAKE_CFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
202 >> $$$$QPATH/qmake.conf
; \
203 echo
"QMAKE_CXXFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
204 >> $$$$QPATH/qmake.conf
; \
205 echo
"QMAKE_LINK = $(TARGET_CXX)" \
206 >> $$$$QPATH/qmake.conf
; \
207 echo
"QMAKE_LINK_SHLIB = $(TARGET_CXX)" \
208 >> $$$$QPATH/qmake.conf
; \
209 echo
"QMAKE_LINK_C = $(TARGET_CC)" \
210 >> $$$$QPATH/qmake.conf
; \
211 echo
"QMAKE_LINK_C_SHLIB = $(TARGET_CC)" \
212 >> $$$$QPATH/qmake.conf
; \
213 echo
"QMAKE_LFLAGS = -L$(PKG_BUILD_DIR)/lib $(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \
214 >> $$$$QPATH/qmake.conf
; \
215 echo
"QMAKE_STRIP = : " \
216 >> $$$$QPATH/qmake.conf
; \
217 echo
"QMAKE_STRIPFLAGS_LIB = " \
218 >> $$$$QPATH/qmake.conf
; \
219 echo
'load(qt_config)' \
220 >> $$$$QPATH/qmake.conf
; \
221 echo yes | .
/configure \
222 -prefix $(CONFIGURE_PREFIX
) \
223 -bindir $(CONFIGURE_PREFIX
)/bin \
224 -libdir $(CONFIGURE_PREFIX
)/lib \
225 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
226 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
227 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
228 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
229 -sysconfdir
/etc
/Qt \
233 -$(if
$(CONFIG_PACKAGE_qt4-demos
),make demos
,nomake demos
) \
234 -$(if
$(CONFIG_PACKAGE_qt4-examples
),make examples
,nomake examples
) \
236 -nomake translations \
238 -platform linux-g
++ \
253 -no-decoration-styled \
254 -no-decoration-windows \
255 -no-decoration-default \
293 -no-gfx-multiscreen \
298 # just passing <make install> results in not building 3rdparty/webkit/JavaScriptCore
299 $(MAKE
) -C
$(PKG_BUILD_DIR
)
300 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
301 $(MAKE
) -j5
-C
$(PKG_BUILD_DIR
) install
304 define Build
/InstallDev
306 $(STAGING_DIR_HOST
)/bin
308 # host tools (qmake, moc, rcc, uic)
310 $(PKG_INSTALL_DIR
)/usr
/bin
/{qmake
,moc
,rcc
,uic
} \
311 $(STAGING_DIR_HOST
)/bin
/
314 $(1)/usr
/share
/mkspecs \
315 $(1)/usr
/lib
/pkgconfig \
318 $(1)/usr
/lib
/Qt
/plugins
321 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
322 $(1)/usr
/share
/mkspecs
/
325 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
326 $(1)/usr
/lib
/pkgconfig
/
329 $(PKG_INSTALL_DIR
)/usr
/include/* \
333 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
337 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
338 # $(1)/usr/lib/Qt/plugins/
341 define Package
/qt4
/install
344 $(1)/usr
/lib
/Qt
/plugins
347 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
351 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
352 # $(1)/usr/lib/Qt/plugins/codecs/
355 define Package
/qt4-gui
/install
358 $(1)/usr
/lib
/Qt
/plugins
361 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
364 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
366 /usr
/share
/fonts
/ttf-dejavu \
369 # we use the dejavue font package instead
371 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
372 # $(1)/usr/lib/fonts/
375 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
376 # $(1)/usr/lib/Qt/plugins/
379 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
380 # $(1)/usr/lib/Qt/plugins/
383 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
384 # $(1)/usr/lib/Qt/plugins/
387 define Package
/qt4-demos
/install
392 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
403 define Package
/qt4-examples
/install
408 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
419 define Package
/qt4-network
/install
424 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
428 define Package
/qt4-sqlite
/install
430 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
433 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
437 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
438 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
441 define Package
/qt4-mysql
/install
443 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
446 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
450 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
451 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
454 #define Package/qt4-multimedia/install
459 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
463 define Package
/qt4-phonon
/install
468 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
472 define Package
/qt4-svg
/install
475 $(1)/usr
/lib
/Qt
/plugins
478 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
482 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
483 # $(1)/usr/lib/Qt/plugins/
486 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
487 # $(1)/usr/lib/Qt/plugins/
490 define Package
/qt4-webkit
/install
493 $(1)/usr
/lib
/Qt
/plugins
496 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
500 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
501 # $(1)/usr/lib/Qt/plugins/
504 define Package
/qt4-script
/install
507 $(1)/usr
/lib
/Qt
/plugins
510 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
514 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
515 # $(1)/usr/lib/Qt/plugins/
518 define Package
/qt4-scripttools
/install
523 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
527 define Package
/qt4-dbus
/install
532 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
536 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
540 define Package
/qt4-qt3-support
/install
543 $(1)/usr
/lib
/Qt
/plugins
546 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
550 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
551 # $(1)/usr/lib/Qt/plugins/
554 define Package
/qt4-declarative
/install
559 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDeclarative.so
* \
563 define Package
/qt4-xml
/install
568 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtXml.so
* \
573 $(eval
$(call BuildPackage
,qt4
))
574 $(eval
$(call BuildPackage
,qt4-gui
))
575 $(eval
$(call BuildPackage
,qt4-demos
))
576 $(eval
$(call BuildPackage
,qt4-examples
))
577 $(eval
$(call BuildPackage
,qt4-network
))
578 $(eval
$(call BuildPackage
,qt4-sqlite
))
579 $(eval
$(call BuildPackage
,qt4-mysql
))
580 #$(eval $(call BuildPackage,qt4-multimedia))
581 #$(eval $(call BuildPackage,qt4-audio-backend))
582 $(eval
$(call BuildPackage
,qt4-phonon
))
583 #$(eval $(call BuildPackage,qt4-phonon-backend))
584 $(eval
$(call BuildPackage
,qt4-svg
))
585 $(eval
$(call BuildPackage
,qt4-webkit
))
586 $(eval
$(call BuildPackage
,qt4-script
))
587 $(eval
$(call BuildPackage
,qt4-scripttools
))
588 #$(eval $(call BuildPackage,qt4-accessibility))
589 #$(eval $(call BuildPackage,qt4-javascript-jit))
590 #$(eval $(call BuildPackage,qt4-cups))
591 $(eval
$(call BuildPackage
,qt4-dbus
))
592 #$(eval $(call BuildPackage,qt4-gtkstyle))
593 #$(eval $(call BuildPackage,qt4-glib))
594 $(eval
$(call BuildPackage
,qt4-qt3support
))
595 $(eval
$(call BuildPackage
,qt4-declarative
))
596 $(eval
$(call BuildPackage
,qt4-xml
))