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
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
)
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
104 define Package
/qt4-webkit
105 $(call Package
/qt4
/Default
)
107 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32
# 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
)
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
)
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
)
158 define Package
/qt4-declarative
159 $(call Package
/qt4
/Default
)
161 DEPENDS
+=+qt4-scripttools
164 TARGET_CFLAGS
+="-I$(STAGING_DIR)/usr/include/freetype2 -I$(PKG_BUILD_DIR)/include"
166 define Build
/Configure
167 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
168 # svg: svg support always compiled in, as once qt is built without, strange include errors occur when we're going to compile qt4-svg afterwards
169 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
170 # do not use fontconfig as it doesn't work anyway for qte
172 cd
$(PKG_BUILD_DIR
); \
173 QPATH
='mkspecs/qws/linux-openwrt-g++' ; \
175 echo
'#include "../../linux-g++/qplatformdefs.h"' \
176 >> $$$$QPATH/qplatformdefs.h
; \
177 echo
'include(../../common/g++.conf)' \
178 >> $$$$QPATH/qmake.conf
; \
179 echo
'include(../../common/linux.conf)' \
180 >> $$$$QPATH/qmake.conf
; \
181 echo
'include(../../common/qws.conf)' \
182 >> $$$$QPATH/qmake.conf
; \
183 echo
"QMAKE_CC = $(TARGET_CC)" \
184 >> $$$$QPATH/qmake.conf
; \
185 echo
"QMAKE_CXX = $(TARGET_CXX)" \
186 >> $$$$QPATH/qmake.conf
; \
187 echo
"QMAKE_AR = $(TARGET_CROSS)ar cqs" \
188 >> $$$$QPATH/qmake.conf
; \
189 echo
"QMAKE_OBJCOPY = $(TARGET_CROSS)objcopy" \
190 >> $$$$QPATH/qmake.conf
; \
191 echo
"QMAKE_RANLIB = $(TARGET_CROSS)ranlib" \
192 >> $$$$QPATH/qmake.conf
; \
193 echo
"QMAKE_CFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
194 >> $$$$QPATH/qmake.conf
; \
195 echo
"QMAKE_CXXFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
196 >> $$$$QPATH/qmake.conf
; \
197 echo
"QMAKE_LINK = $(TARGET_CXX)" \
198 >> $$$$QPATH/qmake.conf
; \
199 echo
"QMAKE_LINK_SHLIB = $(TARGET_CXX)" \
200 >> $$$$QPATH/qmake.conf
; \
201 echo
"QMAKE_LINK_C = $(TARGET_CC)" \
202 >> $$$$QPATH/qmake.conf
; \
203 echo
"QMAKE_LINK_C_SHLIB = $(TARGET_CC)" \
204 >> $$$$QPATH/qmake.conf
; \
205 echo
"QMAKE_LFLAGS = -L$(PKG_BUILD_DIR)/lib $(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \
206 >> $$$$QPATH/qmake.conf
; \
207 echo
"QMAKE_STRIP = : " \
208 >> $$$$QPATH/qmake.conf
; \
209 echo
"QMAKE_STRIPFLAGS_LIB = " \
210 >> $$$$QPATH/qmake.conf
; \
211 echo
'load(qt_config)' \
212 >> $$$$QPATH/qmake.conf
; \
213 echo yes | .
/configure \
214 -prefix $(CONFIGURE_PREFIX
) \
215 -bindir $(CONFIGURE_PREFIX
)/bin \
216 -libdir $(CONFIGURE_PREFIX
)/lib \
217 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
218 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
219 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
220 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
221 -sysconfdir
/etc
/Qt \
225 -$(if
$(CONFIG_PACKAGE_qt4-demos
),make demos
,nomake demos
) \
226 -$(if
$(CONFIG_PACKAGE_qt4-examples
),make examples
,nomake examples
) \
228 -nomake translations \
230 -platform linux-g
++ \
243 $(if
$(CONFIG_PACKAGE_qt4-sqlite
),-plugin-sql-sqlite
,) \
244 $(if
$(CONFIG_PACKAGE_qt4-mysql
),-plugin-sql-mysql
,) \
245 -no-decoration-styled \
246 -no-decoration-windows \
247 -no-decoration-default \
249 -$(if
$(CONFIG_PACKAGE_qt4-multimedia
),multimedia
,no-multimedia
) \
250 -$(if
$(CONFIG_PACKAGE_qt4-audio-backend
),audio-backend
,no-audio-backend
) \
251 -$(if
$(CONFIG_PACKAGE_qt4-phonon
),phonon
,no-phonon
) \
252 -$(if
$(CONFIG_PACKAGE_qt4-phonon-backend
),phonon-backend
,no-phonon-backend
) \
254 -$(if
$(CONFIG_PACKAGE_qt4-webkit
),webkit
,no-webkit
) \
256 -$(if
$(CONFIG_PACKAGE_qt4-script
),script
,no-script
) \
257 -$(if
$(CONFIG_PACKAGE_qt4-scripttools
),scripttools
,no-scripttools
) \
258 -$(if
$(CONFIG_PACKAGE_qt4-accessibility
),accessibility
,no-accessibility
) \
259 -$(if
$(CONFIG_PACKAGE_qt4-declarative
),declarative
,no-declarative
) \
262 $(if
$(CONFIG_PACKAGE_qt4-gui
),,-no-gui
) \
263 -$(if
$(CONFIG_PACKAGE_qt4-cups
),cups
,no-cups
) \
265 -$(if
$(CONFIG_PACKAGE_qt4-dbus
),dbus
,no-dbus
) \
266 -$(if
$(CONFIG_PACKAGE_qt4-gtkstyle
),gtkstyle
,no-gtkstyle
) \
282 -$(if
$(CONFIG_PACKAGE_qt4-glib
),glib
,no-glib
) \
283 -$(if
$(CONFIG_PACKAGE_qt4-qt3support
),qt3support
,no-qt3support
) \
284 -$(if
$(CONFIG_FEATURE_drawing-backend_DirectFB
),qt-gfx-directfb
,) \
286 -no-gfx-multiscreen \
291 # just passing <make install> results in not building 3rdparty/webkit/JavaScriptCore
292 $(MAKE
) -C
$(PKG_BUILD_DIR
)
293 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
294 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
297 define Build
/InstallDev
299 $(1)/usr
/share
/mkspecs \
300 $(1)/usr
/lib
/pkgconfig \
303 $(1)/usr
/lib
/Qt
/plugins
306 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
307 $(1)/usr
/share
/mkspecs
/
310 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
311 $(1)/usr
/lib
/pkgconfig
/
314 $(PKG_INSTALL_DIR
)/usr
/include/* \
318 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
322 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
323 # $(1)/usr/lib/Qt/plugins/
326 define Package
/qt4
/install
329 $(1)/usr
/lib
/Qt
/plugins
332 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
336 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
337 # $(1)/usr/lib/Qt/plugins/codecs/
340 define Package
/qt4-gui
/install
343 $(1)/usr
/lib
/Qt
/plugins
346 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
349 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
351 /usr
/share
/fonts
/ttf-dejavu \
354 # we use the dejavue font package instead
356 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
357 # $(1)/usr/lib/fonts/
360 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
361 # $(1)/usr/lib/Qt/plugins/
364 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
365 # $(1)/usr/lib/Qt/plugins/
368 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
369 # $(1)/usr/lib/Qt/plugins/
372 define Package
/qt4-demos
/install
377 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
388 define Package
/qt4-examples
/install
393 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
404 define Package
/qt4-network
/install
409 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
413 define Package
/qt4-sqlite
/install
415 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
418 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
422 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
423 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
426 define Package
/qt4-mysql
/install
428 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
431 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
435 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
436 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
439 #define Package/qt4-multimedia/install
444 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
448 define Package
/qt4-phonon
/install
453 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
457 define Package
/qt4-svg
/install
460 $(1)/usr
/lib
/Qt
/plugins
463 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
467 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
468 # $(1)/usr/lib/Qt/plugins/
471 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
472 # $(1)/usr/lib/Qt/plugins/
475 define Package
/qt4-webkit
/install
478 $(1)/usr
/lib
/Qt
/plugins
481 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
485 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
486 # $(1)/usr/lib/Qt/plugins/
489 define Package
/qt4-script
/install
492 $(1)/usr
/lib
/Qt
/plugins
495 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
499 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
500 # $(1)/usr/lib/Qt/plugins/
503 define Package
/qt4-scripttools
/install
508 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
512 define Package
/qt4-dbus
/install
517 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
521 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
525 define Package
/qt4-qt3-support
/install
528 $(1)/usr
/lib
/Qt
/plugins
531 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
535 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
536 # $(1)/usr/lib/Qt/plugins/
539 define Package
/qt4-declarative
/install
544 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDeclarative.so
* \
548 $(eval
$(call BuildPackage
,qt4
))
549 $(eval
$(call BuildPackage
,qt4-gui
))
550 $(eval
$(call BuildPackage
,qt4-demos
))
551 $(eval
$(call BuildPackage
,qt4-examples
))
552 $(eval
$(call BuildPackage
,qt4-network
))
553 $(eval
$(call BuildPackage
,qt4-sqlite
))
554 $(eval
$(call BuildPackage
,qt4-mysql
))
555 #$(eval $(call BuildPackage,qt4-multimedia))
556 #$(eval $(call BuildPackage,qt4-audio-backend))
557 $(eval
$(call BuildPackage
,qt4-phonon
))
558 #$(eval $(call BuildPackage,qt4-phonon-backend))
559 $(eval
$(call BuildPackage
,qt4-svg
))
560 $(eval
$(call BuildPackage
,qt4-webkit
))
561 $(eval
$(call BuildPackage
,qt4-script
))
562 $(eval
$(call BuildPackage
,qt4-scripttools
))
563 #$(eval $(call BuildPackage,qt4-accessibility))
564 #$(eval $(call BuildPackage,qt4-javascript-jit))
565 #$(eval $(call BuildPackage,qt4-cups))
566 $(eval
$(call BuildPackage
,qt4-dbus
))
567 #$(eval $(call BuildPackage,qt4-gtkstyle))
568 #$(eval $(call BuildPackage,qt4-glib))
569 $(eval
$(call BuildPackage
,qt4-qt3support
))
570 $(eval
$(call BuildPackage
,qt4-declarative
))