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-beta1
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
) \
247 -$(if
$(CONFIG_PACKAGE_qt4-phonon
),phonon
,no-phonon
) \
248 -$(if
$(CONFIG_PACKAGE_qt4-phonon-backend
),phonon-backend
,no-phonon-backend
) \
250 -$(if
$(CONFIG_PACKAGE_qt4-webkit
),webkit
,no-webkit
) \
251 -$(if
$(CONFIG_PACKAGE_qt4-javascript-jit
),javascript-jit
,no-javascript-jit
) \
252 -$(if
$(CONFIG_PACKAGE_qt4-script
),script
,no-script
) \
253 -$(if
$(CONFIG_PACKAGE_qt4-scripttools
),scripttools
,no-scripttools
) \
254 -$(if
$(CONFIG_PACKAGE_qt4-accessibility
),accessibility
,no-accessibility
) \
258 $(if
$(CONFIG_PACKAGE_qt4-gui
),,-no-gui
) \
259 -$(if
$(CONFIG_PACKAGE_qt4-cups
),cups
,no-cups
) \
261 -$(if
$(CONFIG_PACKAGE_qt4-dbus
),dbus
,no-dbus
) \
262 -$(if
$(CONFIG_PACKAGE_qt4-gtkstyle
),gtkstyle
,no-gtkstyle
) \
278 -$(if
$(CONFIG_PACKAGE_qt4-glib
),glib
,no-glib
) \
279 -$(if
$(CONFIG_PACKAGE_qt4-qt3support
),qt3support
,no-qt3support
) \
280 -$(if
$(CONFIG_FEATURE_drawing-backend_DirectFB
),qt-gfx-directfb
,) \
282 -no-gfx-multiscreen \
287 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
288 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
291 define Build
/InstallDev
293 $(1)/usr
/share
/mkspecs \
294 $(1)/usr
/lib
/pkgconfig \
297 $(1)/usr
/lib
/Qt
/plugins
300 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
301 $(1)/usr
/share
/mkspecs
/
304 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
305 $(1)/usr
/lib
/pkgconfig
/
308 $(PKG_INSTALL_DIR
)/usr
/include/* \
312 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
316 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
317 # $(1)/usr/lib/Qt/plugins/
320 define Package
/qt4
/install
323 $(1)/usr
/lib
/Qt
/plugins
326 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
330 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
331 # $(1)/usr/lib/Qt/plugins/codecs/
334 define Package
/qt4-gui
/install
337 $(1)/usr
/lib
/Qt
/plugins
340 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
343 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
345 /usr
/share
/fonts
/ttf-dejavu \
348 # we use the dejavue font package instead
350 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
351 # $(1)/usr/lib/fonts/
354 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
355 # $(1)/usr/lib/Qt/plugins/
358 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
359 # $(1)/usr/lib/Qt/plugins/
362 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
363 # $(1)/usr/lib/Qt/plugins/
366 define Package
/qt4-demos
/install
371 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
382 define Package
/qt4-examples
/install
387 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
398 define Package
/qt4-network
/install
403 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
407 define Package
/qt4-sqlite
/install
409 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
412 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
416 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
417 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
420 define Package
/qt4-mysql
/install
422 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
425 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
429 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
430 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
433 #define Package/qt4-multimedia/install
438 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
442 define Package
/qt4-phonon
/install
447 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
451 define Package
/qt4-svg
/install
454 $(1)/usr
/lib
/Qt
/plugins
457 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
461 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
462 # $(1)/usr/lib/Qt/plugins/
465 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
466 # $(1)/usr/lib/Qt/plugins/
469 define Package
/qt4-webkit
/install
472 $(1)/usr
/lib
/Qt
/plugins
475 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
479 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
480 # $(1)/usr/lib/Qt/plugins/
483 define Package
/qt4-script
/install
486 $(1)/usr
/lib
/Qt
/plugins
489 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
493 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
494 # $(1)/usr/lib/Qt/plugins/
497 define Package
/qt4-scripttools
/install
502 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
506 define Package
/qt4-dbus
/install
511 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
515 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
519 define Package
/qt4-qt3-support
/install
522 $(1)/usr
/lib
/Qt
/plugins
525 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
529 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
530 # $(1)/usr/lib/Qt/plugins/
533 $(eval
$(call BuildPackage
,qt4
))
534 $(eval
$(call BuildPackage
,qt4-gui
))
535 $(eval
$(call BuildPackage
,qt4-demos
))
536 $(eval
$(call BuildPackage
,qt4-examples
))
537 $(eval
$(call BuildPackage
,qt4-network
))
538 $(eval
$(call BuildPackage
,qt4-sqlite
))
539 $(eval
$(call BuildPackage
,qt4-mysql
))
540 #$(eval $(call BuildPackage,qt4-multimedia))
541 #$(eval $(call BuildPackage,qt4-audio-backend))
542 $(eval
$(call BuildPackage
,qt4-phonon
))
543 #$(eval $(call BuildPackage,qt4-phonon-backend))
544 $(eval
$(call BuildPackage
,qt4-svg
))
545 $(eval
$(call BuildPackage
,qt4-webkit
))
546 $(eval
$(call BuildPackage
,qt4-script
))
547 $(eval
$(call BuildPackage
,qt4-scripttools
))
548 #$(eval $(call BuildPackage,qt4-accessibility))
549 #$(eval $(call BuildPackage,qt4-javascript-jit))
550 #$(eval $(call BuildPackage,qt4-cups))
551 $(eval
$(call BuildPackage
,qt4-dbus
))
552 #$(eval $(call BuildPackage,qt4-gtkstyle))
553 #$(eval $(call BuildPackage,qt4-glib))
554 $(eval
$(call BuildPackage
,qt4-qt3support
))