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
35 $(call Package
/qt4
/Default
)
36 DEPENDS
:=@FEATURE_drawing-backend_DirectFB
+FEATURE_drawing-backend_DirectFB
:DirectFB
+zlib
+libstdcpp
+libsqlite3
# require directfb for now, as other systems (libX11, xcb) are untested
39 define Package
/qt4-gui
40 $(call Package
/qt4
/Default
)
41 #DEPENDS+=+FEATURE_drawing-backend_DirectFB:DirectFB +libpng +libtiff +libjpeg +libfreetype
42 DEPENDS
+=+libpng
+libtiff
+libjpeg
+libfreetype
46 define Package
/qt4-demos
47 $(call Package
/qt4
/Default
)
52 define Package
/qt4-examples
53 $(call Package
/qt4
/Default
)
58 define Package
/qt4-network
59 $(call Package
/qt4
/Default
)
63 #define Package/qt4-multimedia
64 # $(call Package/qt4/Default)
68 #define Package/qt4-audio-backend
69 # $(call Package/qt4/Default)
70 # TITLE+=(audio-backend)
73 define Package
/qt4-phonon
74 $(call Package
/qt4
/Default
)
79 #define Package/qt4-phonon-backend
80 # $(call Package/qt4/Default)
81 # TITLE+=(phonon-backend)
84 define Package
/qt4-svg
85 $(call Package
/qt4
/Default
)
87 #DEPENDS+=+qt4-gui @BROKEN
91 define Package
/qt4-webkit
92 $(call Package
/qt4
/Default
)
94 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC
# until we do not have nptl-support within uclibc javascriptcore will fail to link against uclibc
97 define Package
/qt4-script
98 $(call Package
/qt4
/Default
)
100 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC
# until we do not have nptl-support within uclibc, javascriptcore will fail to link against uclibc
103 define Package
/qt4-scripttools
104 $(call Package
/qt4
/Default
)
109 #define Package/qt4-accessibility
110 # $(call Package/qt4/Default)
111 # TITLE+=(accessibility)
114 #define Package/qt4-javascript-jit
115 # $(call Package/qt4/Default)
116 # TITLE+=(javascript-jit)
119 #define Package/qt4-cups
120 # $(call Package/qt4/Default)
124 define Package
/qt4-dbus
125 $(call Package
/qt4
/Default
)
130 #define Package/qt4-gtkstyle
131 # $(call Package/qt4/Default)
135 #define Package/qt4-glib
136 # $(call Package/qt4/Default)
140 define Package
/qt4-qt3support
141 $(call Package
/qt4
/Default
)
145 TARGET_CFLAGS
+="-I$(STAGING_DIR)/usr/include/freetype2"
147 define Build
/Configure
148 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
149 # 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
150 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
151 # do not use fontconfig as it doesn't work anyway for qte
153 cd
$(PKG_BUILD_DIR
); \
154 QPATH
='mkspecs/qws/linux-openwrt-g++' ; \
156 echo
'#include "../../linux-g++/qplatformdefs.h"' \
157 >> $$$$QPATH/qplatformdefs.h
; \
158 echo
'include(../../common/g++.conf)' \
159 >> $$$$QPATH/qmake.conf
; \
160 echo
'include(../../common/linux.conf)' \
161 >> $$$$QPATH/qmake.conf
; \
162 echo
'include(../../common/qws.conf)' \
163 >> $$$$QPATH/qmake.conf
; \
164 echo
"QMAKE_CC = $(TARGET_CC)" \
165 >> $$$$QPATH/qmake.conf
; \
166 echo
"QMAKE_CXX = $(TARGET_CXX)" \
167 >> $$$$QPATH/qmake.conf
; \
168 echo
"QMAKE_AR = $(TARGET_CROSS)ar cqs" \
169 >> $$$$QPATH/qmake.conf
; \
170 echo
"QMAKE_OBJCOPY = $(TARGET_CROSS)objcopy" \
171 >> $$$$QPATH/qmake.conf
; \
172 echo
"QMAKE_RANLIB = $(TARGET_CROSS)ranlib" \
173 >> $$$$QPATH/qmake.conf
; \
174 echo
"QMAKE_CFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
175 >> $$$$QPATH/qmake.conf
; \
176 echo
"QMAKE_CXXFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
177 >> $$$$QPATH/qmake.conf
; \
178 echo
"QMAKE_LINK = $(TARGET_CXX)" \
179 >> $$$$QPATH/qmake.conf
; \
180 echo
"QMAKE_LINK_SHLIB = $(TARGET_CXX)" \
181 >> $$$$QPATH/qmake.conf
; \
182 echo
"QMAKE_LINK_C = $(TARGET_CC)" \
183 >> $$$$QPATH/qmake.conf
; \
184 echo
"QMAKE_LINK_C_SHLIB = $(TARGET_CC)" \
185 >> $$$$QPATH/qmake.conf
; \
186 echo
"QMAKE_LFLAGS = -L$(PKG_BUILD_DIR)/lib $(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \
187 >> $$$$QPATH/qmake.conf
; \
188 echo
"QMAKE_STRIP = : " \
189 >> $$$$QPATH/qmake.conf
; \
190 echo
"QMAKE_STRIPFLAGS_LIB = " \
191 >> $$$$QPATH/qmake.conf
; \
192 echo
'load(qt_config)' \
193 >> $$$$QPATH/qmake.conf
; \
194 echo yes | .
/configure \
195 -prefix $(CONFIGURE_PREFIX
) \
196 -bindir $(CONFIGURE_PREFIX
)/bin \
197 -libdir $(CONFIGURE_PREFIX
)/lib \
198 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
199 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
200 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
201 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
202 -sysconfdir
/etc
/Qt \
206 -$(if
$(CONFIG_PACKAGE_qt4-demos
),make demos
,nomake demos
) \
207 -$(if
$(CONFIG_PACKAGE_qt4-examples
),make examples
,nomake examples
) \
209 -nomake translations \
211 -platform linux-g
++ \
224 -no-decoration-styled \
225 -no-decoration-windows \
226 -no-decoration-default \
228 -$(if
$(CONFIG_PACKAGE_qt4-multimedia
),multimedia
,no-multimedia
) \
229 -$(if
$(CONFIG_PACKAGE_qt4-audio-backend
),audio-backend
,no-audio-backend
) \
230 -$(if
$(CONFIG_PACKAGE_qt4-phonon
),phonon
,no-phonon
) \
231 -$(if
$(CONFIG_PACKAGE_qt4-phonon-backend
),phonon-backend
,no-phonon-backend
) \
233 -$(if
$(CONFIG_PACKAGE_qt4-webkit
),webkit
,no-webkit
) \
234 -$(if
$(CONFIG_PACKAGE_qt4-javascript-jit
),javascript-jit
,no-javascript-jit
) \
235 -$(if
$(CONFIG_PACKAGE_qt4-script
),script
,no-script
) \
236 -$(if
$(CONFIG_PACKAGE_qt4-scripttools
),scripttools
,no-scripttools
) \
237 -$(if
$(CONFIG_PACKAGE_qt4-accessibility
),accessibility
,no-accessibility
) \
241 -$(if
$(CONFIG_PACKAGE_qt4-cups
),cups
,no-cups
) \
243 -$(if
$(CONFIG_PACKAGE_qt4-dbus
),dbus
,no-dbus
) \
244 -$(if
$(CONFIG_PACKAGE_qt4-gtkstyle
),gtkstyle
,no-gtkstyle
) \
260 -$(if
$(CONFIG_PACKAGE_qt4-glib
),glib
,no-glib
) \
261 -$(if
$(CONFIG_PACKAGE_qt4-qt3support
),qt3support
,no-qt3support
) \
262 -$(if
$(CONFIG_FEATURE_drawing-backend_DirectFB
),qt-gfx-directfb
,) \
264 -no-gfx-multiscreen \
269 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
270 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
273 define Build
/InstallDev
275 $(1)/usr
/share
/mkspecs \
276 $(1)/usr
/lib
/pkgconfig \
279 $(1)/usr
/lib
/Qt
/plugins
282 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
283 $(1)/usr
/share
/mkspecs
/
286 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
287 $(1)/usr
/lib
/pkgconfig
/
290 $(PKG_INSTALL_DIR
)/usr
/include/* \
294 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
298 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
299 # $(1)/usr/lib/Qt/plugins/
302 define Package
/qt4
/install
305 $(1)/usr
/lib
/Qt
/plugins
308 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
312 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
313 # $(1)/usr/lib/Qt/plugins/codecs/
316 define Package
/qt4-gui
/install
319 $(1)/usr
/lib
/Qt
/plugins
322 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
325 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
327 /usr
/share
/fonts
/ttf-dejavu \
330 # we use the dejavue font package instead
332 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
333 # $(1)/usr/lib/fonts/
336 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
337 # $(1)/usr/lib/Qt/plugins/
340 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
341 # $(1)/usr/lib/Qt/plugins/
344 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
345 # $(1)/usr/lib/Qt/plugins/
348 define Package
/qt4-demos
/install
353 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
364 define Package
/qt4-examples
/install
369 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
380 define Package
/qt4-network
/install
385 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
389 #define Package/qt4-multimedia/install
394 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
398 define Package
/qt4-phonon
/install
403 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
407 define Package
/qt4-svg
/install
410 $(1)/usr
/lib
/Qt
/plugins
413 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
417 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
418 # $(1)/usr/lib/Qt/plugins/
421 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
422 # $(1)/usr/lib/Qt/plugins/
425 define Package
/qt4-webkit
/install
428 $(1)/usr
/lib
/Qt
/plugins
431 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
435 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
436 # $(1)/usr/lib/Qt/plugins/
439 define Package
/qt4-script
/install
442 $(1)/usr
/lib
/Qt
/plugins
445 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
449 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
450 # $(1)/usr/lib/Qt/plugins/
453 define Package
/qt4-scripttools
/install
458 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
462 define Package
/qt4-dbus
/install
467 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
471 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
475 define Package
/qt4-qt3-support
/install
478 $(1)/usr
/lib
/Qt
/plugins
481 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
485 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
486 # $(1)/usr/lib/Qt/plugins/
489 $(eval
$(call BuildPackage
,qt4
))
490 $(eval
$(call BuildPackage
,qt4-gui
))
491 $(eval
$(call BuildPackage
,qt4-demos
))
492 $(eval
$(call BuildPackage
,qt4-examples
))
493 $(eval
$(call BuildPackage
,qt4-network
))
494 #$(eval $(call BuildPackage,qt4-multimedia))
495 #$(eval $(call BuildPackage,qt4-audio-backend))
496 $(eval
$(call BuildPackage
,qt4-phonon
))
497 #$(eval $(call BuildPackage,qt4-phonon-backend))
498 $(eval
$(call BuildPackage
,qt4-svg
))
499 $(eval
$(call BuildPackage
,qt4-webkit
))
500 $(eval
$(call BuildPackage
,qt4-script
))
501 $(eval
$(call BuildPackage
,qt4-scripttools
))
502 #$(eval $(call BuildPackage,qt4-accessibility))
503 #$(eval $(call BuildPackage,qt4-javascript-jit))
504 #$(eval $(call BuildPackage,qt4-cups))
505 $(eval
$(call BuildPackage
,qt4-dbus
))
506 #$(eval $(call BuildPackage,qt4-gtkstyle))
507 #$(eval $(call BuildPackage,qt4-glib))
508 $(eval
$(call BuildPackage
,qt4-qt3support
))