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 # - test/add X11/xcb support
10 # - handle plugins in a granular way (find out which packages should provide which plugins)
12 include $(TOPDIR
)/rules.mk
15 PKG_VERSION
:=4.7.0-beta2
18 PKG_SOURCE
:=qt-everywhere-opensource-src-
$(PKG_VERSION
).
tar.gz
19 PKG_SOURCE_URL
:=ftp
://ftp.qt.nokia.com
/qt
/source
20 PKG_BUILD_DIR
=$(BUILD_DIR
)/qt-everywhere-opensource-src-
$(PKG_VERSION
)
22 include $(INCLUDE_DIR
)/package.mk
24 # this should be moved to a more generic place later, as other packages are configured different as well depending on available nptl support
25 ifeq ($(CONFIG_USE_GLIBC
),y
)
28 ifeq ($(CONFIG_USE_EGLIBC
),y
)
31 ifeq ($(CONFIG_UCLIBC_VERSION_0_9_32
),y
)
35 define Package
/qt4
/Default
36 SECTION
:=xorg-framework
41 URL
:=http
://qt.nokia.com
/
45 $(call Package
/qt4
/Default
)
46 DEPENDS
:=@FEATURE_drawing-backend_DirectFB
+FEATURE_drawing-backend_DirectFB
:directfb
+zlib
+libstdcpp
+libsqlite3
+tslib
# require directfb for now, as other systems (libX11, xcb) are untested
49 define Package
/qt4-gui
50 $(call Package
/qt4
/Default
)
51 #DEPENDS+=+FEATURE_drawing-backend_DirectFB:directfb +libpng +libtiff +libjpeg +libfreetype
52 DEPENDS
+=+libpng
+libtiff
+libjpeg
+libfreetype
+qt4-network
56 define Package
/qt4-demos
57 $(call Package
/qt4
/Default
)
62 define Package
/qt4-examples
63 $(call Package
/qt4
/Default
)
68 define Package
/qt4-network
69 $(call Package
/qt4
/Default
)
73 define Package
/qt4-sqlite
74 $(call Package
/qt4
/Default
)
79 define Package
/qt4-mysql
80 $(call Package
/qt4
/Default
)
82 DEPENDS
+=+libmysqlclient
85 #define Package/qt4-multimedia
86 # $(call Package/qt4/Default)
90 #define Package/qt4-audio-backend
91 # $(call Package/qt4/Default)
92 # TITLE+=(audio-backend)
95 define Package
/qt4-phonon
96 $(call Package
/qt4
/Default
)
98 DEPENDS
+=+qt4-gui
+qt4-xml
+qt4-dbus
+qt4-network
101 #define Package/qt4-phonon-backend
102 # $(call Package/qt4/Default)
103 # TITLE+=(phonon-backend)
106 define Package
/qt4-svg
107 $(call Package
/qt4
/Default
)
109 #DEPENDS+=+qt4-gui @BROKEN
110 DEPENDS
+=+qt4-gui
+qt4-network
113 define Package
/qt4-webkit
114 $(call Package
/qt4
/Default
)
116 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32
+libsqlite3
+qt4-phonon
+qt4-dbus
+qt4-xml
+qt4-gui
+qt4-network
# versions of uclibc prior 0.9.32 do not have nptl support
119 define Package
/qt4-script
120 $(call Package
/qt4
/Default
)
122 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32
# versions of uclibc prior 0.9.32 do not have nptl support
125 define Package
/qt4-scripttools
126 $(call Package
/qt4
/Default
)
128 DEPENDS
+=+qt4-script
+qt4-gui
+qt4-network
131 #define Package/qt4-accessibility
132 # $(call Package/qt4/Default)
133 # TITLE+=(accessibility)
136 #define Package/qt4-javascript-jit
137 # $(call Package/qt4/Default)
138 # TITLE+=(javascript-jit)
141 #define Package/qt4-cups
142 # $(call Package/qt4/Default)
146 define Package
/qt4-dbus
147 $(call Package
/qt4
/Default
)
149 DEPENDS
+=+libdbus
+qt4-xml
152 #define Package/qt4-gtkstyle
153 # $(call Package/qt4/Default)
157 #define Package/qt4-glib
158 # $(call Package/qt4/Default)
162 define Package
/qt4-qt3support
163 $(call Package
/qt4
/Default
)
165 DEPENDS
+=+qt4-gui
+qt4-xml
168 define Package
/qt4-declarative
169 $(call Package
/qt4
/Default
)
171 DEPENDS
+=+qt4-script
+qt4-xml
+qt4-gui
+qt4-network
174 define Package
/qt4-xml
175 $(call Package
/qt4
/Default
)
179 TARGET_INCDIRS
+=$(STAGING_DIR
)/include $(STAGING_DIR
)/usr
/include $(TOOLCHAIN_DIR
)/include $(TOOLCHAIN_DIR
)/usr
/include
180 TARGET_LIBDIRS
+=$(STAGING_DIR
)/lib
$(STAGING_DIR
)/usr
/lib
$(TOOLCHAIN_DIR
)/lib
$(TOOLCHAIN_DIR
)/usr
/lib
181 TARGET_LDFLAGS
+=-Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
,-rpath-link
=$(PKG_BUILD_DIR
)/lib
182 TARGET_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/freetype2
-I
$(PKG_BUILD_DIR
)/include
184 define Build
/Configure
186 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
187 # svg: always compile in svg-support, as once qt is built without, strange include errors occur when we're going to compile qt4-svg afterwards
188 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
189 # do not use fontconfig as it doesn't work anyway for qte
190 # bindir: bindir is where the host tools (qmake, moc, rcc, uic) will get installed into - they are just used on the host and not goig to be packaged
191 mkdir
-p
$(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++
192 cp
-a .
/files
/{qmake.conf
,qplatformdefs.h
} $(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++/
193 ( cd
$(PKG_BUILD_DIR
) ; \
194 TARGET_CC
="$(TARGET_CROSS)gcc" \
195 TARGET_CXX
="$(TARGET_CROSS)g++" \
196 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
197 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
198 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
199 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
200 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
201 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
202 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
203 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
204 STAGING_DIR
="$(STAGING_DIR)" \
205 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
207 -prefix $(CONFIGURE_PREFIX
) \
208 -bindir $(CONFIGURE_PREFIX
)/bin \
209 -libdir $(CONFIGURE_PREFIX
)/lib \
210 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
211 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
212 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
213 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
214 -sysconfdir
/etc
/Qt \
221 -nomake translations \
222 -xplatform qws
/linux-openwrt-g
++ \
223 -platform linux-g
++ \
240 -no-decoration-styled \
241 -no-decoration-windows \
242 -no-decoration-default \
249 -$(if
$(NPTL
),webkit
,-no-webkit
) \
251 -$(if
$(NPTL
),script
,-no-script
) \
252 -$(if
$(NPTL
),scripttools
,-no-scripttools
) \
254 -$(if
$(NPTL
),declarative
,-no-declarative
) \
278 -no-gfx-transformed \
281 -no-gfx-multiscreen \
283 -plugin-gfx-directfb \
284 -plugin-gfx-linuxfb \
287 -qt-mouse-linuxinput \
288 -plugin-mouse-linuxtp \
290 -plugin-mouse-tslib \
294 -plugin-kbd-linuxinput \
299 # just passing <make install> results in not building 3rdparty/webkit/JavaScriptCore
300 # unfortunately in this particular case, <make> makes further <qmake> calls, therewith
301 # uses the qmake.conf which needs get the cross-compiling vars passed once again
302 TARGET_CC
="$(TARGET_CROSS)gcc" \
303 TARGET_CXX
="$(TARGET_CROSS)g++" \
304 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
305 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
306 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
307 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
308 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
309 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
310 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
311 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
312 STAGING_DIR
="$(STAGING_DIR)" \
313 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
314 $(MAKE
) -C
$(PKG_BUILD_DIR
)
315 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
316 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
319 define Build
/InstallDev
321 $(STAGING_DIR_HOST
)/bin
323 # host tools (qmake, moc, rcc, uic)
325 $(PKG_INSTALL_DIR
)/usr
/bin
/{qmake
,moc
,rcc
,uic
} \
326 $(STAGING_DIR_HOST
)/bin
/
330 $(1)/usr
/share
/mkspecs \
331 $(1)/usr
/lib
/pkgconfig \
334 $(1)/usr
/lib
/Qt
/plugins
341 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
342 $(1)/usr
/share
/mkspecs
/
345 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
346 $(1)/usr
/lib
/pkgconfig
/
349 $(PKG_INSTALL_DIR
)/usr
/include/* \
353 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
357 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
358 # $(1)/usr/lib/Qt/plugins/
361 define Package
/qt4
/install
364 $(1)/usr
/lib
/Qt
/plugins
367 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
371 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
372 # $(1)/usr/lib/Qt/plugins/codecs/
375 define Package
/qt4-gui
/install
378 $(1)/usr
/lib
/Qt
/plugins
381 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
384 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
386 /usr
/share
/fonts
/ttf-dejavu \
389 # we use the dejavue font package instead
391 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
392 # $(1)/usr/lib/fonts/
395 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
396 # $(1)/usr/lib/Qt/plugins/
399 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
400 # $(1)/usr/lib/Qt/plugins/
403 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
404 # $(1)/usr/lib/Qt/plugins/
407 define Package
/qt4-demos
/install
412 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
423 define Package
/qt4-examples
/install
428 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
439 define Package
/qt4-network
/install
444 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
448 define Package
/qt4-sqlite
/install
450 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
453 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
457 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
458 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
461 define Package
/qt4-mysql
/install
463 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
466 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
470 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
471 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
474 #define Package/qt4-multimedia/install
479 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
483 define Package
/qt4-phonon
/install
488 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
492 define Package
/qt4-svg
/install
495 $(1)/usr
/lib
/Qt
/plugins
498 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
502 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
503 # $(1)/usr/lib/Qt/plugins/
506 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
507 # $(1)/usr/lib/Qt/plugins/
510 define Package
/qt4-webkit
/install
513 $(1)/usr
/lib
/Qt
/plugins
516 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
520 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
521 # $(1)/usr/lib/Qt/plugins/
524 define Package
/qt4-script
/install
527 $(1)/usr
/lib
/Qt
/plugins
530 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
534 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
535 # $(1)/usr/lib/Qt/plugins/
538 define Package
/qt4-scripttools
/install
543 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
547 define Package
/qt4-dbus
/install
552 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
556 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
560 define Package
/qt4-qt3-support
/install
563 $(1)/usr
/lib
/Qt
/plugins
566 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
570 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
571 # $(1)/usr/lib/Qt/plugins/
574 define Package
/qt4-declarative
/install
579 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDeclarative.so
* \
583 define Package
/qt4-xml
/install
588 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtXml.so
* \
593 $(eval
$(call BuildPackage
,qt4
))
594 $(eval
$(call BuildPackage
,qt4-gui
))
595 $(eval
$(call BuildPackage
,qt4-demos
))
596 $(eval
$(call BuildPackage
,qt4-examples
))
597 $(eval
$(call BuildPackage
,qt4-network
))
598 $(eval
$(call BuildPackage
,qt4-sqlite
))
599 $(eval
$(call BuildPackage
,qt4-mysql
))
600 #$(eval $(call BuildPackage,qt4-multimedia))
601 #$(eval $(call BuildPackage,qt4-audio-backend))
602 $(eval
$(call BuildPackage
,qt4-phonon
))
603 #$(eval $(call BuildPackage,qt4-phonon-backend))
604 $(eval
$(call BuildPackage
,qt4-svg
))
605 $(eval
$(call BuildPackage
,qt4-webkit
))
606 $(eval
$(call BuildPackage
,qt4-script
))
607 $(eval
$(call BuildPackage
,qt4-scripttools
))
608 #$(eval $(call BuildPackage,qt4-accessibility))
609 #$(eval $(call BuildPackage,qt4-javascript-jit))
610 #$(eval $(call BuildPackage,qt4-cups))
611 $(eval
$(call BuildPackage
,qt4-dbus
))
612 #$(eval $(call BuildPackage,qt4-gtkstyle))
613 #$(eval $(call BuildPackage,qt4-glib))
614 $(eval
$(call BuildPackage
,qt4-qt3support
))
615 $(eval
$(call BuildPackage
,qt4-declarative
))
616 $(eval
$(call BuildPackage
,qt4-xml
))