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 include $(INCLUDE_DIR
)/package.mk
25 # this should be moved to a more generic place later, as other packages are configured different as well depending on available nptl support
26 ifeq ($(CONFIG_USE_GLIBC
),y
)
29 ifeq ($(CONFIG_USE_EGLIBC
),y
)
32 ifeq ($(CONFIG_UCLIBC_VERSION_0_9_32
),y
)
36 define Package
/qt4
/Default
37 SECTION
:=xorg-framework
42 URL
:=http
://qt.nokia.com
/
46 $(call Package
/qt4
/Default
)
47 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
50 define Package
/qt4-gui
51 $(call Package
/qt4
/Default
)
52 #DEPENDS+=+FEATURE_drawing-backend_DirectFB:directfb +libpng +libtiff +libjpeg +libfreetype
53 DEPENDS
+=+libpng
+libtiff
+libjpeg
+libfreetype
+qt4-network
57 define Package
/qt4-demos
58 $(call Package
/qt4
/Default
)
63 define Package
/qt4-examples
64 $(call Package
/qt4
/Default
)
69 define Package
/qt4-network
70 $(call Package
/qt4
/Default
)
74 define Package
/qt4-sqlite
75 $(call Package
/qt4
/Default
)
80 define Package
/qt4-mysql
81 $(call Package
/qt4
/Default
)
83 DEPENDS
+=+libmysqlclient
86 #define Package/qt4-multimedia
87 # $(call Package/qt4/Default)
91 #define Package/qt4-audio-backend
92 # $(call Package/qt4/Default)
93 # TITLE+=(audio-backend)
96 define Package
/qt4-phonon
97 $(call Package
/qt4
/Default
)
99 DEPENDS
+=+qt4-gui
+qt4-xml
+qt4-dbus
+qt4-network
102 #define Package/qt4-phonon-backend
103 # $(call Package/qt4/Default)
104 # TITLE+=(phonon-backend)
107 define Package
/qt4-svg
108 $(call Package
/qt4
/Default
)
110 #DEPENDS+=+qt4-gui @BROKEN
111 DEPENDS
+=+qt4-gui
+qt4-network
114 define Package
/qt4-webkit
115 $(call Package
/qt4
/Default
)
117 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
120 define Package
/qt4-script
121 $(call Package
/qt4
/Default
)
123 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32
# versions of uclibc prior 0.9.32 do not have nptl support
126 define Package
/qt4-scripttools
127 $(call Package
/qt4
/Default
)
129 DEPENDS
+=+qt4-script
+qt4-gui
+qt4-network
132 #define Package/qt4-accessibility
133 # $(call Package/qt4/Default)
134 # TITLE+=(accessibility)
137 #define Package/qt4-javascript-jit
138 # $(call Package/qt4/Default)
139 # TITLE+=(javascript-jit)
142 #define Package/qt4-cups
143 # $(call Package/qt4/Default)
147 define Package
/qt4-dbus
148 $(call Package
/qt4
/Default
)
150 DEPENDS
+=+libdbus
+qt4-xml
153 #define Package/qt4-gtkstyle
154 # $(call Package/qt4/Default)
158 #define Package/qt4-glib
159 # $(call Package/qt4/Default)
163 define Package
/qt4-qt3support
164 $(call Package
/qt4
/Default
)
166 DEPENDS
+=+qt4-gui
+qt4-xml
169 define Package
/qt4-declarative
170 $(call Package
/qt4
/Default
)
172 DEPENDS
+=+qt4-script
+qt4-xml
+qt4-gui
+qt4-network
175 define Package
/qt4-xml
176 $(call Package
/qt4
/Default
)
181 define Package
/qt4-drivers-mouse
/Default
182 $(call Package
/qt4
/Default
)
186 define Package
/qt4-drivers-mouse-tpmousedriver
187 $(call Package
/qt4-drivers-mouse
/Default
)
191 define Package
/qt4-drivers-mouse-pcmousedriver
192 $(call Package
/qt4-drivers-mouse
/Default
)
196 define Package
/qt4-drivers-mouse-tslibmousedriver
197 $(call Package
/qt4-drivers-mouse
/Default
)
198 TITLE
+=tslibmousedriver
202 define Package
/qt4-drivers-gfx
/Default
203 $(call Package
/qt4
/Default
)
207 define Package
/qt4-drivers-gfx-directfb
208 $(call Package
/qt4-drivers-gfx
/Default
)
212 define Package
/qt4-drivers-gfx-linuxfb
213 $(call Package
/qt4-drivers-gfx
/Default
)
218 define Package
/qt4-drivers-kbd
/Default
219 $(call Package
/qt4
/Default
)
223 define Package
/qt4-drivers-kbd-linuxinput
224 $(call Package
/qt4-drivers-kbd
/Default
)
229 TARGET_INCDIRS
+=$(STAGING_DIR
)/include $(STAGING_DIR
)/usr
/include $(TOOLCHAIN_DIR
)/include $(TOOLCHAIN_DIR
)/usr
/include
230 TARGET_LIBDIRS
+=$(STAGING_DIR
)/lib
$(STAGING_DIR
)/usr
/lib
$(TOOLCHAIN_DIR
)/lib
$(TOOLCHAIN_DIR
)/usr
/lib
231 TARGET_LDFLAGS
+=-Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
,-rpath-link
=$(PKG_BUILD_DIR
)/lib
232 TARGET_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/freetype2
-I
$(PKG_BUILD_DIR
)/include
234 define Build
/Configure
236 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
237 # 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
238 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
239 # do not use fontconfig as it doesn't work anyway for qte
240 # 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
241 mkdir
-p
$(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++
242 cp
-a .
/files
/{qmake.conf
,qplatformdefs.h
} $(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++/
243 ( cd
$(PKG_BUILD_DIR
) ; \
244 TARGET_CC
="$(TARGET_CROSS)gcc" \
245 TARGET_CXX
="$(TARGET_CROSS)g++" \
246 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
247 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
248 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
249 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
250 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
251 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
252 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
253 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
254 STAGING_DIR
="$(STAGING_DIR)" \
255 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
257 -prefix $(CONFIGURE_PREFIX
) \
258 -bindir $(CONFIGURE_PREFIX
)/bin \
259 -libdir $(CONFIGURE_PREFIX
)/lib \
260 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
261 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
262 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
263 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
264 -sysconfdir
/etc
/Qt \
271 -nomake translations \
272 -xplatform qws
/linux-openwrt-g
++ \
273 -platform linux-g
++ \
290 -no-decoration-styled \
291 -no-decoration-windows \
292 -no-decoration-default \
299 $(if
$(NPTL
),-webkit
,-no-webkit
) \
301 $(if
$(NPTL
),-script
,-no-script
) \
302 $(if
$(NPTL
),-scripttools
,-no-scripttools
) \
304 $(if
$(NPTL
),-declarative
,-no-declarative
) \
328 -no-gfx-transformed \
331 -no-gfx-multiscreen \
333 -plugin-gfx-directfb \
334 -plugin-gfx-linuxfb \
337 -qt-mouse-linuxinput \
338 -plugin-mouse-linuxtp \
340 -plugin-mouse-tslib \
344 -plugin-kbd-linuxinput \
349 # just passing <make install> results in not building 3rdparty/webkit/JavaScriptCore
350 # unfortunately in this particular case, <make> makes further <qmake> calls, therewith
351 # uses the qmake.conf which needs get the cross-compiling vars passed once again
352 TARGET_CC
="$(TARGET_CROSS)gcc" \
353 TARGET_CXX
="$(TARGET_CROSS)g++" \
354 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
355 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
356 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
357 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
358 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
359 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
360 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
361 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
362 STAGING_DIR
="$(STAGING_DIR)" \
363 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
364 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)
365 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
366 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
369 define Build
/InstallDev
371 $(STAGING_DIR_HOST
)/bin
373 # host tools (qmake, moc, rcc, uic)
375 $(PKG_INSTALL_DIR
)/usr
/bin
/{qmake
,moc
,rcc
,uic
} \
376 $(STAGING_DIR_HOST
)/bin
/
380 $(1)/usr
/share
/mkspecs \
381 $(1)/usr
/lib
/pkgconfig \
384 $(1)/usr
/lib
/Qt
/plugins
391 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
392 $(1)/usr
/share
/mkspecs
/
395 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
396 $(1)/usr
/lib
/pkgconfig
/
399 $(PKG_INSTALL_DIR
)/usr
/include/* \
403 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
407 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
408 # $(1)/usr/lib/Qt/plugins/
411 define Package
/qt4
/install
414 $(1)/usr
/lib
/Qt
/plugins
417 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
421 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
422 # $(1)/usr/lib/Qt/plugins/codecs/
425 define Package
/qt4-gui
/install
428 $(1)/usr
/lib
/Qt
/plugins
431 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
434 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
436 /usr
/share
/fonts
/ttf-dejavu \
439 # we use the dejavue font package instead
441 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
442 # $(1)/usr/lib/fonts/
445 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
446 # $(1)/usr/lib/Qt/plugins/
449 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
450 # $(1)/usr/lib/Qt/plugins/
453 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
454 # $(1)/usr/lib/Qt/plugins/
457 define Package
/qt4-demos
/install
462 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
473 define Package
/qt4-examples
/install
478 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
489 define Package
/qt4-network
/install
494 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
498 define Package
/qt4-sqlite
/install
500 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
503 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
507 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
508 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
511 define Package
/qt4-mysql
/install
513 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
516 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
520 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
521 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
524 #define Package/qt4-multimedia/install
529 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
533 define Package
/qt4-phonon
/install
538 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
542 define Package
/qt4-svg
/install
545 $(1)/usr
/lib
/Qt
/plugins
548 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
552 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
553 # $(1)/usr/lib/Qt/plugins/
556 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
557 # $(1)/usr/lib/Qt/plugins/
560 define Package
/qt4-webkit
/install
563 $(1)/usr
/lib
/Qt
/plugins
566 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
570 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
571 # $(1)/usr/lib/Qt/plugins/
574 define Package
/qt4-script
/install
577 $(1)/usr
/lib
/Qt
/plugins
580 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
584 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
585 # $(1)/usr/lib/Qt/plugins/
588 define Package
/qt4-scripttools
/install
593 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
597 define Package
/qt4-dbus
/install
602 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
606 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
610 define Package
/qt4-qt3-support
/install
613 $(1)/usr
/lib
/Qt
/plugins
616 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
620 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
621 # $(1)/usr/lib/Qt/plugins/
624 define Package
/qt4-declarative
/install
629 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDeclarative.so
* \
633 define Package
/qt4-xml
/install
638 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtXml.so
* \
644 define Package
/qt4-drivers-mouse-tpmousedriver
/install
646 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
649 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqlinuxtpmousedriver.so \
650 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
653 define Package
/qt4-drivers-mouse-pcmousedriver
/install
655 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
658 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqpcmousedriver.so \
659 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
662 define Package
/qt4-drivers-mouse-tslibmousedriver
/install
664 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
667 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqtslibmousedriver.so \
668 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
672 define Package
/qt4-drivers-gfx-directfb
/install
674 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
677 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/gfxdrivers
/libqdirectfbscreen.so \
678 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
/
681 define Package
/qt4-drivers-gfx-linuxfb
/install
683 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
686 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/gfxdrivers
/libqscreenlinuxfb.so \
687 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
/
691 define Package
/qt4-drivers-kbd-linuxinput
/install
693 $(1)/usr
/lib
/Qt
/plugins
/kbddrivers
696 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/kbddrivers
/libqlinuxinputkbddriver.so \
697 $(1)/usr
/lib
/Qt
/plugins
/kbddrivers
/
703 $(eval
$(call BuildPackage
,qt4
))
704 $(eval
$(call BuildPackage
,qt4-gui
))
705 $(eval
$(call BuildPackage
,qt4-demos
))
706 $(eval
$(call BuildPackage
,qt4-examples
))
707 $(eval
$(call BuildPackage
,qt4-network
))
708 $(eval
$(call BuildPackage
,qt4-sqlite
))
709 $(eval
$(call BuildPackage
,qt4-mysql
))
710 #$(eval $(call BuildPackage,qt4-multimedia))
711 #$(eval $(call BuildPackage,qt4-audio-backend))
712 $(eval
$(call BuildPackage
,qt4-phonon
))
713 #$(eval $(call BuildPackage,qt4-phonon-backend))
714 $(eval
$(call BuildPackage
,qt4-svg
))
715 $(eval
$(call BuildPackage
,qt4-webkit
))
716 $(eval
$(call BuildPackage
,qt4-script
))
717 $(eval
$(call BuildPackage
,qt4-scripttools
))
718 #$(eval $(call BuildPackage,qt4-accessibility))
719 #$(eval $(call BuildPackage,qt4-javascript-jit))
720 #$(eval $(call BuildPackage,qt4-cups))
721 $(eval
$(call BuildPackage
,qt4-dbus
))
722 #$(eval $(call BuildPackage,qt4-gtkstyle))
723 #$(eval $(call BuildPackage,qt4-glib))
724 $(eval
$(call BuildPackage
,qt4-qt3support
))
725 $(eval
$(call BuildPackage
,qt4-declarative
))
726 $(eval
$(call BuildPackage
,qt4-xml
))
728 $(eval
$(call BuildPackage
,qt4-drivers-mouse-tpmousedriver
))
729 $(eval
$(call BuildPackage
,qt4-drivers-mouse-pcmousedriver
))
730 $(eval
$(call BuildPackage
,qt4-drivers-mouse-tslibmousedriver
))
732 $(eval
$(call BuildPackage
,qt4-drivers-gfx-directfb
))
733 $(eval
$(call BuildPackage
,qt4-drivers-gfx-linuxfb
))
735 $(eval
$(call BuildPackage
,qt4-drivers-kbd-linuxinput
))