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
)
180 define Package
/qt4-drivers-mouse
/Default
181 $(call Package
/qt4
/Default
)
185 define Package
/qt4-drivers-mouse-tpmousedriver
186 $(call Package
/qt4-drivers-mouse
/Default
)
190 define Package
/qt4-drivers-mouse-pcmousedriver
191 $(call Package
/qt4-drivers-mouse
/Default
)
195 define Package
/qt4-drivers-mouse-tslibmousedriver
196 $(call Package
/qt4-drivers-mouse
/Default
)
197 TITLE
+=tslibmousedriver
201 define Package
/qt4-drivers-gfx
/Default
202 $(call Package
/qt4
/Default
)
206 define Package
/qt4-drivers-gfx-directfb
207 $(call Package
/qt4-drivers-gfx
/Default
)
211 define Package
/qt4-drivers-gfx-linuxfb
212 $(call Package
/qt4-drivers-gfx
/Default
)
217 define Package
/qt4-drivers-kbd
/Default
218 $(call Package
/qt4
/Default
)
222 define Package
/qt4-drivers-kbd-linuxinput
223 $(call Package
/qt4-drivers-kbd
/Default
)
228 TARGET_INCDIRS
+=$(STAGING_DIR
)/include $(STAGING_DIR
)/usr
/include $(TOOLCHAIN_DIR
)/include $(TOOLCHAIN_DIR
)/usr
/include
229 TARGET_LIBDIRS
+=$(STAGING_DIR
)/lib
$(STAGING_DIR
)/usr
/lib
$(TOOLCHAIN_DIR
)/lib
$(TOOLCHAIN_DIR
)/usr
/lib
230 TARGET_LDFLAGS
+=-Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
,-rpath-link
=$(PKG_BUILD_DIR
)/lib
231 TARGET_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/freetype2
-I
$(PKG_BUILD_DIR
)/include
233 define Build
/Configure
235 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
236 # 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
237 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
238 # do not use fontconfig as it doesn't work anyway for qte
239 # 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
240 mkdir
-p
$(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++
241 cp
-a .
/files
/{qmake.conf
,qplatformdefs.h
} $(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++/
242 ( cd
$(PKG_BUILD_DIR
) ; \
243 TARGET_CC
="$(TARGET_CROSS)gcc" \
244 TARGET_CXX
="$(TARGET_CROSS)g++" \
245 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
246 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
247 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
248 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
249 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
250 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
251 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
252 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
253 STAGING_DIR
="$(STAGING_DIR)" \
254 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
256 -prefix $(CONFIGURE_PREFIX
) \
257 -bindir $(CONFIGURE_PREFIX
)/bin \
258 -libdir $(CONFIGURE_PREFIX
)/lib \
259 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
260 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
261 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
262 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
263 -sysconfdir
/etc
/Qt \
270 -nomake translations \
271 -xplatform qws
/linux-openwrt-g
++ \
272 -platform linux-g
++ \
289 -no-decoration-styled \
290 -no-decoration-windows \
291 -no-decoration-default \
298 $(if
$(NPTL
),-webkit
,-no-webkit
) \
300 $(if
$(NPTL
),-script
,-no-script
) \
301 $(if
$(NPTL
),-scripttools
,-no-scripttools
) \
303 $(if
$(NPTL
),-declarative
,-no-declarative
) \
327 -no-gfx-transformed \
330 -no-gfx-multiscreen \
332 -plugin-gfx-directfb \
333 -plugin-gfx-linuxfb \
336 -qt-mouse-linuxinput \
337 -plugin-mouse-linuxtp \
339 -plugin-mouse-tslib \
343 -plugin-kbd-linuxinput \
348 # just passing <make install> results in not building 3rdparty/webkit/JavaScriptCore
349 # unfortunately in this particular case, <make> makes further <qmake> calls, therewith
350 # uses the qmake.conf which needs get the cross-compiling vars passed once again
351 TARGET_CC
="$(TARGET_CROSS)gcc" \
352 TARGET_CXX
="$(TARGET_CROSS)g++" \
353 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
354 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
355 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
356 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
357 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
358 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
359 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
360 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
361 STAGING_DIR
="$(STAGING_DIR)" \
362 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
363 $(MAKE
) -C
$(PKG_BUILD_DIR
)
364 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
365 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
368 define Build
/InstallDev
370 $(STAGING_DIR_HOST
)/bin
372 # host tools (qmake, moc, rcc, uic)
374 $(PKG_INSTALL_DIR
)/usr
/bin
/{qmake
,moc
,rcc
,uic
} \
375 $(STAGING_DIR_HOST
)/bin
/
379 $(1)/usr
/share
/mkspecs \
380 $(1)/usr
/lib
/pkgconfig \
383 $(1)/usr
/lib
/Qt
/plugins
390 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
391 $(1)/usr
/share
/mkspecs
/
394 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
395 $(1)/usr
/lib
/pkgconfig
/
398 $(PKG_INSTALL_DIR
)/usr
/include/* \
402 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
406 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
407 # $(1)/usr/lib/Qt/plugins/
410 define Package
/qt4
/install
413 $(1)/usr
/lib
/Qt
/plugins
416 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
420 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
421 # $(1)/usr/lib/Qt/plugins/codecs/
424 define Package
/qt4-gui
/install
427 $(1)/usr
/lib
/Qt
/plugins
430 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
433 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
435 /usr
/share
/fonts
/ttf-dejavu \
438 # we use the dejavue font package instead
440 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
441 # $(1)/usr/lib/fonts/
444 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
445 # $(1)/usr/lib/Qt/plugins/
448 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
449 # $(1)/usr/lib/Qt/plugins/
452 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
453 # $(1)/usr/lib/Qt/plugins/
456 define Package
/qt4-demos
/install
461 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
472 define Package
/qt4-examples
/install
477 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
488 define Package
/qt4-network
/install
493 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
497 define Package
/qt4-sqlite
/install
499 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
502 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
506 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
507 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
510 define Package
/qt4-mysql
/install
512 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
515 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
519 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
520 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
523 #define Package/qt4-multimedia/install
528 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
532 define Package
/qt4-phonon
/install
537 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
541 define Package
/qt4-svg
/install
544 $(1)/usr
/lib
/Qt
/plugins
547 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
551 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
552 # $(1)/usr/lib/Qt/plugins/
555 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
556 # $(1)/usr/lib/Qt/plugins/
559 define Package
/qt4-webkit
/install
562 $(1)/usr
/lib
/Qt
/plugins
565 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
569 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
570 # $(1)/usr/lib/Qt/plugins/
573 define Package
/qt4-script
/install
576 $(1)/usr
/lib
/Qt
/plugins
579 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
583 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
584 # $(1)/usr/lib/Qt/plugins/
587 define Package
/qt4-scripttools
/install
592 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
596 define Package
/qt4-dbus
/install
601 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
605 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
609 define Package
/qt4-qt3-support
/install
612 $(1)/usr
/lib
/Qt
/plugins
615 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
619 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
620 # $(1)/usr/lib/Qt/plugins/
623 define Package
/qt4-declarative
/install
628 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDeclarative.so
* \
632 define Package
/qt4-xml
/install
637 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtXml.so
* \
643 define Package
/qt4-drivers-mouse-tpmousedriver
/install
645 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
648 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqlinuxtpmousedriver.so \
649 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
652 define Package
/qt4-drivers-mouse-pcmousedriver
/install
654 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
657 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqpcmousedriver.so \
658 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
661 define Package
/qt4-drivers-mouse-tslibmousedriver
/install
663 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
666 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqtslibmousedriver.so \
667 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
671 define Package
/qt4-drivers-gfx-directfb
/install
673 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
676 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/gfxdrivers
/libqdirectfbscreen.so \
677 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
/
680 define Package
/qt4-drivers-gfx-linuxfb
/install
682 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
685 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/gfxdrivers
/libqscreenlinuxfb.so \
686 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
/
690 define Package
/qt4-drivers-kbd-linuxinput
/install
692 $(1)/usr
/lib
/Qt
/plugins
/kbddrivers
695 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/kbddrivers
/libqlinuxinputkbddriver.so \
696 $(1)/usr
/lib
/Qt
/plugins
/kbddrivers
/
702 $(eval
$(call BuildPackage
,qt4
))
703 $(eval
$(call BuildPackage
,qt4-gui
))
704 $(eval
$(call BuildPackage
,qt4-demos
))
705 $(eval
$(call BuildPackage
,qt4-examples
))
706 $(eval
$(call BuildPackage
,qt4-network
))
707 $(eval
$(call BuildPackage
,qt4-sqlite
))
708 $(eval
$(call BuildPackage
,qt4-mysql
))
709 #$(eval $(call BuildPackage,qt4-multimedia))
710 #$(eval $(call BuildPackage,qt4-audio-backend))
711 $(eval
$(call BuildPackage
,qt4-phonon
))
712 #$(eval $(call BuildPackage,qt4-phonon-backend))
713 $(eval
$(call BuildPackage
,qt4-svg
))
714 $(eval
$(call BuildPackage
,qt4-webkit
))
715 $(eval
$(call BuildPackage
,qt4-script
))
716 $(eval
$(call BuildPackage
,qt4-scripttools
))
717 #$(eval $(call BuildPackage,qt4-accessibility))
718 #$(eval $(call BuildPackage,qt4-javascript-jit))
719 #$(eval $(call BuildPackage,qt4-cups))
720 $(eval
$(call BuildPackage
,qt4-dbus
))
721 #$(eval $(call BuildPackage,qt4-gtkstyle))
722 #$(eval $(call BuildPackage,qt4-glib))
723 $(eval
$(call BuildPackage
,qt4-qt3support
))
724 $(eval
$(call BuildPackage
,qt4-declarative
))
725 $(eval
$(call BuildPackage
,qt4-xml
))
727 $(eval
$(call BuildPackage
,qt4-drivers-mouse-tpmousedriver
))
728 $(eval
$(call BuildPackage
,qt4-drivers-mouse-pcmousedriver
))
729 $(eval
$(call BuildPackage
,qt4-drivers-mouse-tslibmousedriver
))
731 $(eval
$(call BuildPackage
,qt4-drivers-gfx-directfb
))
732 $(eval
$(call BuildPackage
,qt4-drivers-gfx-linuxfb
))
734 $(eval
$(call BuildPackage
,qt4-drivers-kbd-linuxinput
))