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
)
23 PKG_CONFIG_DEPENDS
:= \
24 CONFIG_PACKAGE_qt4-demos \
25 CONFIG_PACKAGE_qt4-examples \
26 CONFIG_PACKAGE_qt4-svg \
27 CONFIG_PACKAGE_qt4-qt3support \
28 CONFIG_PACKAGE_qt4-dbus \
29 CONFIG_PACKAGE_qt4-phonon \
30 CONFIG_PACKAGE_qt4-sqlite \
31 CONFIG_PACKAGE_qt4-mysql
33 include $(INCLUDE_DIR
)/package.mk
35 # this should be moved to a more generic place later, as other packages are configured different as well depending on available nptl support
36 ifeq ($(CONFIG_USE_GLIBC
),y
)
39 ifeq ($(CONFIG_USE_EGLIBC
),y
)
42 ifeq ($(CONFIG_UCLIBC_VERSION_0_9_32
),y
)
46 define Package
/qt4
/Default
47 SECTION
:=xorg-framework
52 URL
:=http
://qt.nokia.com
/
56 $(call Package
/qt4
/Default
)
57 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
60 define Package
/qt4-gui
61 $(call Package
/qt4
/Default
)
62 DEPENDS
+=+libpng
+libtiff
+libjpeg
+libfreetype
+qt4-network
66 define Package
/qt4-demos
67 $(call Package
/qt4
/Default
)
72 define Package
/qt4-examples
73 $(call Package
/qt4
/Default
)
75 DEPENDS
+=+qt4-gui
+qt4-svg
78 define Package
/qt4-network
79 $(call Package
/qt4
/Default
)
83 define Package
/qt4-sqlite
84 $(call Package
/qt4
/Default
)
89 define Package
/qt4-mysql
90 $(call Package
/qt4
/Default
)
92 DEPENDS
+=+libmysqlclient
95 #define Package/qt4-multimedia
96 # $(call Package/qt4/Default)
100 #define Package/qt4-audio-backend
101 # $(call Package/qt4/Default)
102 # TITLE+=(audio-backend)
105 define Package
/qt4-phonon
106 $(call Package
/qt4
/Default
)
108 DEPENDS
+=+qt4-gui
+qt4-xml
+qt4-dbus
+qt4-network
111 #define Package/qt4-phonon-backend
112 # $(call Package/qt4/Default)
113 # TITLE+=(phonon-backend)
116 define Package
/qt4-svg
117 $(call Package
/qt4
/Default
)
119 DEPENDS
+=+qt4-gui
+qt4-network
122 define Package
/qt4-webkit
123 $(call Package
/qt4
/Default
)
125 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
128 define Package
/qt4-script
129 $(call Package
/qt4
/Default
)
131 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32
# versions of uclibc prior 0.9.32 do not have nptl support
134 define Package
/qt4-scripttools
135 $(call Package
/qt4
/Default
)
137 DEPENDS
+=+qt4-script
+qt4-gui
+qt4-network
140 #define Package/qt4-accessibility
141 # $(call Package/qt4/Default)
142 # TITLE+=(accessibility)
145 #define Package/qt4-javascript-jit
146 # $(call Package/qt4/Default)
147 # TITLE+=(javascript-jit)
150 #define Package/qt4-cups
151 # $(call Package/qt4/Default)
155 define Package
/qt4-dbus
156 $(call Package
/qt4
/Default
)
158 DEPENDS
+=+libdbus
+qt4-xml
161 #define Package/qt4-gtkstyle
162 # $(call Package/qt4/Default)
166 #define Package/qt4-glib
167 # $(call Package/qt4/Default)
171 define Package
/qt4-qt3support
172 $(call Package
/qt4
/Default
)
174 DEPENDS
+=+qt4-gui
+qt4-xml
177 define Package
/qt4-declarative
178 $(call Package
/qt4
/Default
)
180 DEPENDS
+=+qt4-script
+qt4-xml
+qt4-gui
+qt4-network
183 define Package
/qt4-xml
184 $(call Package
/qt4
/Default
)
189 define Package
/qt4-drivers-mouse
/Default
190 $(call Package
/qt4
/Default
)
194 define Package
/qt4-drivers-mouse-tpmousedriver
195 $(call Package
/qt4-drivers-mouse
/Default
)
199 define Package
/qt4-drivers-mouse-pcmousedriver
200 $(call Package
/qt4-drivers-mouse
/Default
)
204 define Package
/qt4-drivers-mouse-tslibmousedriver
205 $(call Package
/qt4-drivers-mouse
/Default
)
206 TITLE
+=tslibmousedriver
210 define Package
/qt4-drivers-gfx
/Default
211 $(call Package
/qt4
/Default
)
215 define Package
/qt4-drivers-gfx-directfb
216 $(call Package
/qt4-drivers-gfx
/Default
)
220 define Package
/qt4-drivers-gfx-linuxfb
221 $(call Package
/qt4-drivers-gfx
/Default
)
226 define Package
/qt4-drivers-kbd
/Default
227 $(call Package
/qt4
/Default
)
231 define Package
/qt4-drivers-kbd-linuxinput
232 $(call Package
/qt4-drivers-kbd
/Default
)
237 TARGET_INCDIRS
+=$(STAGING_DIR
)/include $(STAGING_DIR
)/usr
/include $(TOOLCHAIN_DIR
)/include $(TOOLCHAIN_DIR
)/usr
/include
238 TARGET_LIBDIRS
+=$(STAGING_DIR
)/lib
$(STAGING_DIR
)/usr
/lib
$(TOOLCHAIN_DIR
)/lib
$(TOOLCHAIN_DIR
)/usr
/lib
239 TARGET_LDFLAGS
+=-Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
,-rpath-link
=$(PKG_BUILD_DIR
)/lib
240 TARGET_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/freetype2
-I
$(PKG_BUILD_DIR
)/include
242 define Build
/Configure
244 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
245 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
246 # do not use fontconfig as it doesn't work anyway for qte
247 # 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
248 mkdir
-p
$(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++
249 cp
-a .
/files
/{qmake.conf
,qplatformdefs.h
} $(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++/
250 ( cd
$(PKG_BUILD_DIR
) ; \
251 TARGET_CC
="$(TARGET_CROSS)gcc" \
252 TARGET_CXX
="$(TARGET_CROSS)g++" \
253 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
254 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
255 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
256 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
257 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
258 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
259 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
260 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
261 STAGING_DIR
="$(STAGING_DIR)" \
262 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
264 -prefix $(CONFIGURE_PREFIX
) \
265 -bindir $(CONFIGURE_PREFIX
)/bin \
266 -libdir $(CONFIGURE_PREFIX
)/lib \
267 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
268 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
269 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
270 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
271 -sysconfdir
/etc
/Qt \
275 $(if
$(CONFIG_PACKAGE_qt4-demos
),-make
,-nomake
) demos \
276 $(if
$(CONFIG_PACKAGE_qt4-examples
),-make
,-nomake
) examples \
278 -nomake translations \
279 -xplatform qws
/linux-openwrt-g
++ \
280 -platform linux-g
++ \
295 $(if
$(CONFIG_PACKAGE_qt4-sqlite
),-plugin-sql-sqlite
) \
296 $(if
$(CONFIG_PACKAGE_qt4-mysql
),-plugin-sql-mysql
) \
297 -no-decoration-styled \
298 -no-decoration-windows \
299 -no-decoration-default \
303 $(if
$(CONFIG_PACKAGE_qt4-phonon
),-phonon
,-no-phonon
) \
305 $(if
$(CONFIG_PACKAGE_qt4-svg
),-svg
,-no-svg
) \
306 $(if
$(NPTL
),-webkit
,-no-webkit
) \
308 $(if
$(NPTL
),-script
,-no-script
) \
309 $(if
$(NPTL
),-scripttools
,-no-scripttools
) \
311 $(if
$(NPTL
),-declarative
,-no-declarative
) \
316 $(if
$(CONFIG_PACKAGE_qt4-dbus
),-dbus
,-no-dbus
) \
334 $(if
$(CONFIG_PACKAGE_qt4-qt3support
),-qt3support
,-no-qt3support
) \
335 -no-gfx-transformed \
338 -no-gfx-multiscreen \
340 -plugin-gfx-directfb \
341 -plugin-gfx-linuxfb \
344 -qt-mouse-linuxinput \
345 -plugin-mouse-linuxtp \
347 -plugin-mouse-tslib \
351 -plugin-kbd-linuxinput \
356 # just passing <make install> results in not building 3rdparty/webkit/JavaScriptCore
357 # unfortunately in this particular case, <make> makes further <qmake> calls, therewith
358 # uses the qmake.conf which needs get the cross-compiling vars passed once again
359 TARGET_CC
="$(TARGET_CROSS)gcc" \
360 TARGET_CXX
="$(TARGET_CROSS)g++" \
361 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
362 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
363 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
364 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
365 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
366 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
367 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
368 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
369 STAGING_DIR
="$(STAGING_DIR)" \
370 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
371 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)
372 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
373 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
376 define Build
/InstallDev
378 $(STAGING_DIR_HOST
)/bin
380 # host tools (qmake, moc, rcc, uic)
382 $(PKG_INSTALL_DIR
)/usr
/bin
/{qmake
,moc
,rcc
,uic
} \
383 $(STAGING_DIR_HOST
)/bin
/
387 $(1)/usr
/share
/mkspecs \
388 $(1)/usr
/lib
/pkgconfig \
391 $(1)/usr
/lib
/Qt
/plugins
398 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
399 $(1)/usr
/share
/mkspecs
/
402 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
403 $(1)/usr
/lib
/pkgconfig
/
406 $(PKG_INSTALL_DIR
)/usr
/include/* \
410 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
414 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
415 # $(1)/usr/lib/Qt/plugins/
418 define Package
/qt4
/install
421 $(1)/usr
/lib
/Qt
/plugins
424 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
428 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
429 # $(1)/usr/lib/Qt/plugins/codecs/
432 define Package
/qt4-gui
/install
435 $(1)/usr
/lib
/Qt
/plugins
438 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
441 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
443 /usr
/share
/fonts
/ttf-dejavu \
446 # we use the dejavue font package instead
448 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
449 # $(1)/usr/lib/fonts/
452 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
453 # $(1)/usr/lib/Qt/plugins/
456 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
457 # $(1)/usr/lib/Qt/plugins/
460 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
461 # $(1)/usr/lib/Qt/plugins/
464 define Package
/qt4-demos
/install
469 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
480 define Package
/qt4-examples
/install
485 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
496 define Package
/qt4-network
/install
501 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
505 define Package
/qt4-sqlite
/install
507 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
510 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
514 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
515 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
518 define Package
/qt4-mysql
/install
520 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
523 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
527 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
528 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
531 #define Package/qt4-multimedia/install
536 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
540 define Package
/qt4-phonon
/install
545 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
549 define Package
/qt4-svg
/install
552 $(1)/usr
/lib
/Qt
/plugins
555 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
559 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
560 # $(1)/usr/lib/Qt/plugins/
563 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
564 # $(1)/usr/lib/Qt/plugins/
567 define Package
/qt4-webkit
/install
570 $(1)/usr
/lib
/Qt
/plugins
573 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
577 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
578 # $(1)/usr/lib/Qt/plugins/
581 define Package
/qt4-script
/install
584 $(1)/usr
/lib
/Qt
/plugins
587 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
591 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
592 # $(1)/usr/lib/Qt/plugins/
595 define Package
/qt4-scripttools
/install
600 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
604 define Package
/qt4-dbus
/install
609 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
613 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
617 define Package
/qt4-qt3-support
/install
620 $(1)/usr
/lib
/Qt
/plugins
623 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
627 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
628 # $(1)/usr/lib/Qt/plugins/
631 define Package
/qt4-declarative
/install
636 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDeclarative.so
* \
640 define Package
/qt4-xml
/install
645 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtXml.so
* \
651 define Package
/qt4-drivers-mouse-tpmousedriver
/install
653 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
656 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqlinuxtpmousedriver.so \
657 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
660 define Package
/qt4-drivers-mouse-pcmousedriver
/install
662 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
665 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqpcmousedriver.so \
666 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
669 define Package
/qt4-drivers-mouse-tslibmousedriver
/install
671 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
674 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqtslibmousedriver.so \
675 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
679 define Package
/qt4-drivers-gfx-directfb
/install
681 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
684 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/gfxdrivers
/libqdirectfbscreen.so \
685 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
/
688 define Package
/qt4-drivers-gfx-linuxfb
/install
690 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
693 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/gfxdrivers
/libqscreenlinuxfb.so \
694 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
/
698 define Package
/qt4-drivers-kbd-linuxinput
/install
700 $(1)/usr
/lib
/Qt
/plugins
/kbddrivers
703 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/kbddrivers
/libqlinuxinputkbddriver.so \
704 $(1)/usr
/lib
/Qt
/plugins
/kbddrivers
/
710 $(eval
$(call BuildPackage
,qt4
))
711 $(eval
$(call BuildPackage
,qt4-gui
))
712 $(eval
$(call BuildPackage
,qt4-demos
))
713 $(eval
$(call BuildPackage
,qt4-examples
))
714 $(eval
$(call BuildPackage
,qt4-network
))
715 $(eval
$(call BuildPackage
,qt4-sqlite
))
716 $(eval
$(call BuildPackage
,qt4-mysql
))
717 #$(eval $(call BuildPackage,qt4-multimedia))
718 #$(eval $(call BuildPackage,qt4-audio-backend))
719 $(eval
$(call BuildPackage
,qt4-phonon
))
720 #$(eval $(call BuildPackage,qt4-phonon-backend))
721 $(eval
$(call BuildPackage
,qt4-svg
))
722 $(eval
$(call BuildPackage
,qt4-webkit
))
723 $(eval
$(call BuildPackage
,qt4-script
))
724 $(eval
$(call BuildPackage
,qt4-scripttools
))
725 #$(eval $(call BuildPackage,qt4-accessibility))
726 #$(eval $(call BuildPackage,qt4-javascript-jit))
727 #$(eval $(call BuildPackage,qt4-cups))
728 $(eval
$(call BuildPackage
,qt4-dbus
))
729 #$(eval $(call BuildPackage,qt4-gtkstyle))
730 #$(eval $(call BuildPackage,qt4-glib))
731 $(eval
$(call BuildPackage
,qt4-qt3support
))
732 $(eval
$(call BuildPackage
,qt4-declarative
))
733 $(eval
$(call BuildPackage
,qt4-xml
))
735 $(eval
$(call BuildPackage
,qt4-drivers-mouse-tpmousedriver
))
736 $(eval
$(call BuildPackage
,qt4-drivers-mouse-pcmousedriver
))
737 $(eval
$(call BuildPackage
,qt4-drivers-mouse-tslibmousedriver
))
739 $(eval
$(call BuildPackage
,qt4-drivers-gfx-directfb
))
740 $(eval
$(call BuildPackage
,qt4-drivers-gfx-linuxfb
))
742 $(eval
$(call BuildPackage
,qt4-drivers-kbd-linuxinput
))