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
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 TARGET_CFLAGS
+="-I$(STAGING_DIR)/usr/include/freetype2"
160 define Build
/Configure
161 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
162 # 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
163 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
164 # do not use fontconfig as it doesn't work anyway for qte
166 cd
$(PKG_BUILD_DIR
); \
167 QPATH
='mkspecs/qws/linux-openwrt-g++' ; \
169 echo
'#include "../../linux-g++/qplatformdefs.h"' \
170 >> $$$$QPATH/qplatformdefs.h
; \
171 echo
'include(../../common/g++.conf)' \
172 >> $$$$QPATH/qmake.conf
; \
173 echo
'include(../../common/linux.conf)' \
174 >> $$$$QPATH/qmake.conf
; \
175 echo
'include(../../common/qws.conf)' \
176 >> $$$$QPATH/qmake.conf
; \
177 echo
"QMAKE_CC = $(TARGET_CC)" \
178 >> $$$$QPATH/qmake.conf
; \
179 echo
"QMAKE_CXX = $(TARGET_CXX)" \
180 >> $$$$QPATH/qmake.conf
; \
181 echo
"QMAKE_AR = $(TARGET_CROSS)ar cqs" \
182 >> $$$$QPATH/qmake.conf
; \
183 echo
"QMAKE_OBJCOPY = $(TARGET_CROSS)objcopy" \
184 >> $$$$QPATH/qmake.conf
; \
185 echo
"QMAKE_RANLIB = $(TARGET_CROSS)ranlib" \
186 >> $$$$QPATH/qmake.conf
; \
187 echo
"QMAKE_CFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
188 >> $$$$QPATH/qmake.conf
; \
189 echo
"QMAKE_CXXFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
190 >> $$$$QPATH/qmake.conf
; \
191 echo
"QMAKE_LINK = $(TARGET_CXX)" \
192 >> $$$$QPATH/qmake.conf
; \
193 echo
"QMAKE_LINK_SHLIB = $(TARGET_CXX)" \
194 >> $$$$QPATH/qmake.conf
; \
195 echo
"QMAKE_LINK_C = $(TARGET_CC)" \
196 >> $$$$QPATH/qmake.conf
; \
197 echo
"QMAKE_LINK_C_SHLIB = $(TARGET_CC)" \
198 >> $$$$QPATH/qmake.conf
; \
199 echo
"QMAKE_LFLAGS = -L$(PKG_BUILD_DIR)/lib $(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \
200 >> $$$$QPATH/qmake.conf
; \
201 echo
"QMAKE_STRIP = : " \
202 >> $$$$QPATH/qmake.conf
; \
203 echo
"QMAKE_STRIPFLAGS_LIB = " \
204 >> $$$$QPATH/qmake.conf
; \
205 echo
'load(qt_config)' \
206 >> $$$$QPATH/qmake.conf
; \
207 echo yes | .
/configure \
208 -prefix $(CONFIGURE_PREFIX
) \
209 -bindir $(CONFIGURE_PREFIX
)/bin \
210 -libdir $(CONFIGURE_PREFIX
)/lib \
211 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
212 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
213 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
214 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
215 -sysconfdir
/etc
/Qt \
219 -$(if
$(CONFIG_PACKAGE_qt4-demos
),make demos
,nomake demos
) \
220 -$(if
$(CONFIG_PACKAGE_qt4-examples
),make examples
,nomake examples
) \
222 -nomake translations \
224 -platform linux-g
++ \
237 $(if
$(CONFIG_PACKAGE_qt4-sqlite
),-plugin-sql-sqlite
,) \
238 $(if
$(CONFIG_PACKAGE_qt4-mysql
),-plugin-sql-mysql
,) \
239 -no-decoration-styled \
240 -no-decoration-windows \
241 -no-decoration-default \
243 -$(if
$(CONFIG_PACKAGE_qt4-multimedia
),multimedia
,no-multimedia
) \
244 -$(if
$(CONFIG_PACKAGE_qt4-audio-backend
),audio-backend
,no-audio-backend
) \
245 -$(if
$(CONFIG_PACKAGE_qt4-phonon
),phonon
,no-phonon
) \
246 -$(if
$(CONFIG_PACKAGE_qt4-phonon-backend
),phonon-backend
,no-phonon-backend
) \
248 -$(if
$(CONFIG_PACKAGE_qt4-webkit
),webkit
,no-webkit
) \
249 -$(if
$(CONFIG_PACKAGE_qt4-javascript-jit
),javascript-jit
,no-javascript-jit
) \
250 -$(if
$(CONFIG_PACKAGE_qt4-script
),script
,no-script
) \
251 -$(if
$(CONFIG_PACKAGE_qt4-scripttools
),scripttools
,no-scripttools
) \
252 -$(if
$(CONFIG_PACKAGE_qt4-accessibility
),accessibility
,no-accessibility
) \
256 -$(if
$(CONFIG_PACKAGE_qt4-cups
),cups
,no-cups
) \
258 -$(if
$(CONFIG_PACKAGE_qt4-dbus
),dbus
,no-dbus
) \
259 -$(if
$(CONFIG_PACKAGE_qt4-gtkstyle
),gtkstyle
,no-gtkstyle
) \
275 -$(if
$(CONFIG_PACKAGE_qt4-glib
),glib
,no-glib
) \
276 -$(if
$(CONFIG_PACKAGE_qt4-qt3support
),qt3support
,no-qt3support
) \
277 -$(if
$(CONFIG_FEATURE_drawing-backend_DirectFB
),qt-gfx-directfb
,) \
279 -no-gfx-multiscreen \
284 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
285 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
288 define Build
/InstallDev
290 $(1)/usr
/share
/mkspecs \
291 $(1)/usr
/lib
/pkgconfig \
294 $(1)/usr
/lib
/Qt
/plugins
297 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
298 $(1)/usr
/share
/mkspecs
/
301 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
302 $(1)/usr
/lib
/pkgconfig
/
305 $(PKG_INSTALL_DIR
)/usr
/include/* \
309 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
313 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
314 # $(1)/usr/lib/Qt/plugins/
317 define Package
/qt4
/install
320 $(1)/usr
/lib
/Qt
/plugins
323 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
327 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
328 # $(1)/usr/lib/Qt/plugins/codecs/
331 define Package
/qt4-gui
/install
334 $(1)/usr
/lib
/Qt
/plugins
337 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
340 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
342 /usr
/share
/fonts
/ttf-dejavu \
345 # we use the dejavue font package instead
347 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
348 # $(1)/usr/lib/fonts/
351 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
352 # $(1)/usr/lib/Qt/plugins/
355 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
356 # $(1)/usr/lib/Qt/plugins/
359 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
360 # $(1)/usr/lib/Qt/plugins/
363 define Package
/qt4-demos
/install
368 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
379 define Package
/qt4-examples
/install
384 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
395 define Package
/qt4-network
/install
400 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
404 define Package
/qt4-sqlite
/install
406 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
409 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
413 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
414 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
417 define Package
/qt4-mysql
/install
419 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
422 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
426 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
427 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
430 #define Package/qt4-multimedia/install
435 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
439 define Package
/qt4-phonon
/install
444 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
448 define Package
/qt4-svg
/install
451 $(1)/usr
/lib
/Qt
/plugins
454 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
458 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
459 # $(1)/usr/lib/Qt/plugins/
462 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
463 # $(1)/usr/lib/Qt/plugins/
466 define Package
/qt4-webkit
/install
469 $(1)/usr
/lib
/Qt
/plugins
472 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
476 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
477 # $(1)/usr/lib/Qt/plugins/
480 define Package
/qt4-script
/install
483 $(1)/usr
/lib
/Qt
/plugins
486 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
490 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
491 # $(1)/usr/lib/Qt/plugins/
494 define Package
/qt4-scripttools
/install
499 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
503 define Package
/qt4-dbus
/install
508 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
512 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
516 define Package
/qt4-qt3-support
/install
519 $(1)/usr
/lib
/Qt
/plugins
522 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
526 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
527 # $(1)/usr/lib/Qt/plugins/
530 $(eval
$(call BuildPackage
,qt4
))
531 $(eval
$(call BuildPackage
,qt4-gui
))
532 $(eval
$(call BuildPackage
,qt4-demos
))
533 $(eval
$(call BuildPackage
,qt4-examples
))
534 $(eval
$(call BuildPackage
,qt4-network
))
535 $(eval
$(call BuildPackage
,qt4-sqlite
))
536 $(eval
$(call BuildPackage
,qt4-mysql
))
537 #$(eval $(call BuildPackage,qt4-multimedia))
538 #$(eval $(call BuildPackage,qt4-audio-backend))
539 $(eval
$(call BuildPackage
,qt4-phonon
))
540 #$(eval $(call BuildPackage,qt4-phonon-backend))
541 $(eval
$(call BuildPackage
,qt4-svg
))
542 $(eval
$(call BuildPackage
,qt4-webkit
))
543 $(eval
$(call BuildPackage
,qt4-script
))
544 $(eval
$(call BuildPackage
,qt4-scripttools
))
545 #$(eval $(call BuildPackage,qt4-accessibility))
546 #$(eval $(call BuildPackage,qt4-javascript-jit))
547 #$(eval $(call BuildPackage,qt4-cups))
548 $(eval
$(call BuildPackage
,qt4-dbus
))
549 #$(eval $(call BuildPackage,qt4-gtkstyle))
550 #$(eval $(call BuildPackage,qt4-glib))
551 $(eval
$(call BuildPackage
,qt4-qt3support
))