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-multimedia
65 # $(call Package/qt4/Default)
69 #define Package/qt4-audio-backend
70 # $(call Package/qt4/Default)
71 # TITLE+=(audio-backend)
74 define Package
/qt4-phonon
75 $(call Package
/qt4
/Default
)
80 #define Package/qt4-phonon-backend
81 # $(call Package/qt4/Default)
82 # TITLE+=(phonon-backend)
85 define Package
/qt4-svg
86 $(call Package
/qt4
/Default
)
88 #DEPENDS+=+qt4-gui @BROKEN
92 define Package
/qt4-webkit
93 $(call Package
/qt4
/Default
)
95 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC
# until we do not have nptl-support within uclibc javascriptcore will fail to link against uclibc
98 define Package
/qt4-script
99 $(call Package
/qt4
/Default
)
101 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC
# until we do not have nptl-support within uclibc, javascriptcore will fail to link against uclibc
104 define Package
/qt4-scripttools
105 $(call Package
/qt4
/Default
)
110 #define Package/qt4-accessibility
111 # $(call Package/qt4/Default)
112 # TITLE+=(accessibility)
115 #define Package/qt4-javascript-jit
116 # $(call Package/qt4/Default)
117 # TITLE+=(javascript-jit)
120 #define Package/qt4-cups
121 # $(call Package/qt4/Default)
125 define Package
/qt4-dbus
126 $(call Package
/qt4
/Default
)
131 #define Package/qt4-gtkstyle
132 # $(call Package/qt4/Default)
136 #define Package/qt4-glib
137 # $(call Package/qt4/Default)
141 define Package
/qt4-qt3support
142 $(call Package
/qt4
/Default
)
146 TARGET_CFLAGS
+="-I$(STAGING_DIR)/usr/include/freetype2"
148 define Build
/Configure
149 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
150 # 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
151 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
152 # do not use fontconfig as it doesn't work anyway for qte
154 cd
$(PKG_BUILD_DIR
); \
155 QPATH
='mkspecs/qws/linux-openwrt-g++' ; \
157 echo
'#include "../../linux-g++/qplatformdefs.h"' \
158 >> $$$$QPATH/qplatformdefs.h
; \
159 echo
'include(../../common/g++.conf)' \
160 >> $$$$QPATH/qmake.conf
; \
161 echo
'include(../../common/linux.conf)' \
162 >> $$$$QPATH/qmake.conf
; \
163 echo
'include(../../common/qws.conf)' \
164 >> $$$$QPATH/qmake.conf
; \
165 echo
"QMAKE_CC = $(TARGET_CC)" \
166 >> $$$$QPATH/qmake.conf
; \
167 echo
"QMAKE_CXX = $(TARGET_CXX)" \
168 >> $$$$QPATH/qmake.conf
; \
169 echo
"QMAKE_AR = $(TARGET_CROSS)ar cqs" \
170 >> $$$$QPATH/qmake.conf
; \
171 echo
"QMAKE_OBJCOPY = $(TARGET_CROSS)objcopy" \
172 >> $$$$QPATH/qmake.conf
; \
173 echo
"QMAKE_RANLIB = $(TARGET_CROSS)ranlib" \
174 >> $$$$QPATH/qmake.conf
; \
175 echo
"QMAKE_CFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
176 >> $$$$QPATH/qmake.conf
; \
177 echo
"QMAKE_CXXFLAGS = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
178 >> $$$$QPATH/qmake.conf
; \
179 echo
"QMAKE_LINK = $(TARGET_CXX)" \
180 >> $$$$QPATH/qmake.conf
; \
181 echo
"QMAKE_LINK_SHLIB = $(TARGET_CXX)" \
182 >> $$$$QPATH/qmake.conf
; \
183 echo
"QMAKE_LINK_C = $(TARGET_CC)" \
184 >> $$$$QPATH/qmake.conf
; \
185 echo
"QMAKE_LINK_C_SHLIB = $(TARGET_CC)" \
186 >> $$$$QPATH/qmake.conf
; \
187 echo
"QMAKE_LFLAGS = -L$(PKG_BUILD_DIR)/lib $(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \
188 >> $$$$QPATH/qmake.conf
; \
189 echo
"QMAKE_STRIP = : " \
190 >> $$$$QPATH/qmake.conf
; \
191 echo
"QMAKE_STRIPFLAGS_LIB = " \
192 >> $$$$QPATH/qmake.conf
; \
193 echo
'load(qt_config)' \
194 >> $$$$QPATH/qmake.conf
; \
195 echo yes | .
/configure \
196 -prefix $(CONFIGURE_PREFIX
) \
197 -bindir $(CONFIGURE_PREFIX
)/bin \
198 -libdir $(CONFIGURE_PREFIX
)/lib \
199 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
200 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
201 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
202 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
203 -sysconfdir
/etc
/Qt \
207 -$(if
$(CONFIG_PACKAGE_qt4-demos
),make demos
,nomake demos
) \
208 -$(if
$(CONFIG_PACKAGE_qt4-examples
),make examples
,nomake examples
) \
210 -nomake translations \
212 -platform linux-g
++ \
225 -no-decoration-styled \
226 -no-decoration-windows \
227 -no-decoration-default \
229 -$(if
$(CONFIG_PACKAGE_qt4-multimedia
),multimedia
,no-multimedia
) \
230 -$(if
$(CONFIG_PACKAGE_qt4-audio-backend
),audio-backend
,no-audio-backend
) \
231 -$(if
$(CONFIG_PACKAGE_qt4-phonon
),phonon
,no-phonon
) \
232 -$(if
$(CONFIG_PACKAGE_qt4-phonon-backend
),phonon-backend
,no-phonon-backend
) \
234 -$(if
$(CONFIG_PACKAGE_qt4-webkit
),webkit
,no-webkit
) \
235 -$(if
$(CONFIG_PACKAGE_qt4-javascript-jit
),javascript-jit
,no-javascript-jit
) \
236 -$(if
$(CONFIG_PACKAGE_qt4-script
),script
,no-script
) \
237 -$(if
$(CONFIG_PACKAGE_qt4-scripttools
),scripttools
,no-scripttools
) \
238 -$(if
$(CONFIG_PACKAGE_qt4-accessibility
),accessibility
,no-accessibility
) \
242 -$(if
$(CONFIG_PACKAGE_qt4-cups
),cups
,no-cups
) \
244 -$(if
$(CONFIG_PACKAGE_qt4-dbus
),dbus
,no-dbus
) \
245 -$(if
$(CONFIG_PACKAGE_qt4-gtkstyle
),gtkstyle
,no-gtkstyle
) \
261 -$(if
$(CONFIG_PACKAGE_qt4-glib
),glib
,no-glib
) \
262 -$(if
$(CONFIG_PACKAGE_qt4-qt3support
),qt3support
,no-qt3support
) \
263 -$(if
$(CONFIG_FEATURE_drawing-backend_DirectFB
),qt-gfx-directfb
,) \
265 -no-gfx-multiscreen \
270 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
271 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
274 define Build
/InstallDev
276 $(1)/usr
/share
/mkspecs \
277 $(1)/usr
/lib
/pkgconfig \
280 $(1)/usr
/lib
/Qt
/plugins
283 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
284 $(1)/usr
/share
/mkspecs
/
287 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
288 $(1)/usr
/lib
/pkgconfig
/
291 $(PKG_INSTALL_DIR
)/usr
/include/* \
295 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
299 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
300 # $(1)/usr/lib/Qt/plugins/
303 define Package
/qt4
/install
306 $(1)/usr
/lib
/Qt
/plugins
309 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
313 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
314 # $(1)/usr/lib/Qt/plugins/codecs/
317 define Package
/qt4-gui
/install
320 $(1)/usr
/lib
/Qt
/plugins
323 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
326 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
328 /usr
/share
/fonts
/ttf-dejavu \
331 # we use the dejavue font package instead
333 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
334 # $(1)/usr/lib/fonts/
337 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
338 # $(1)/usr/lib/Qt/plugins/
341 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
342 # $(1)/usr/lib/Qt/plugins/
345 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
346 # $(1)/usr/lib/Qt/plugins/
349 define Package
/qt4-demos
/install
354 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
365 define Package
/qt4-examples
/install
370 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
381 define Package
/qt4-network
/install
386 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
390 #define Package/qt4-multimedia/install
395 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
399 define Package
/qt4-phonon
/install
404 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
408 define Package
/qt4-svg
/install
411 $(1)/usr
/lib
/Qt
/plugins
414 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
418 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
419 # $(1)/usr/lib/Qt/plugins/
422 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
423 # $(1)/usr/lib/Qt/plugins/
426 define Package
/qt4-webkit
/install
429 $(1)/usr
/lib
/Qt
/plugins
432 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
436 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
437 # $(1)/usr/lib/Qt/plugins/
440 define Package
/qt4-script
/install
443 $(1)/usr
/lib
/Qt
/plugins
446 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
450 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
451 # $(1)/usr/lib/Qt/plugins/
454 define Package
/qt4-scripttools
/install
459 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
463 define Package
/qt4-dbus
/install
468 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
472 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
476 define Package
/qt4-qt3-support
/install
479 $(1)/usr
/lib
/Qt
/plugins
482 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
486 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
487 # $(1)/usr/lib/Qt/plugins/
490 $(eval
$(call BuildPackage
,qt4
))
491 $(eval
$(call BuildPackage
,qt4-gui
))
492 $(eval
$(call BuildPackage
,qt4-demos
))
493 $(eval
$(call BuildPackage
,qt4-examples
))
494 $(eval
$(call BuildPackage
,qt4-network
))
495 #$(eval $(call BuildPackage,qt4-multimedia))
496 #$(eval $(call BuildPackage,qt4-audio-backend))
497 $(eval
$(call BuildPackage
,qt4-phonon
))
498 #$(eval $(call BuildPackage,qt4-phonon-backend))
499 $(eval
$(call BuildPackage
,qt4-svg
))
500 $(eval
$(call BuildPackage
,qt4-webkit
))
501 $(eval
$(call BuildPackage
,qt4-script
))
502 $(eval
$(call BuildPackage
,qt4-scripttools
))
503 #$(eval $(call BuildPackage,qt4-accessibility))
504 #$(eval $(call BuildPackage,qt4-javascript-jit))
505 #$(eval $(call BuildPackage,qt4-cups))
506 $(eval
$(call BuildPackage
,qt4-dbus
))
507 #$(eval $(call BuildPackage,qt4-gtkstyle))
508 #$(eval $(call BuildPackage,qt4-glib))
509 $(eval
$(call BuildPackage
,qt4-qt3support
))