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
27 include $(INCLUDE_DIR
)/package.mk
29 # this should be moved to a more generic place later, as other packages are configured different as well depending on available nptl support
30 ifeq ($(CONFIG_USE_GLIBC
),y
)
33 ifeq ($(CONFIG_USE_EGLIBC
),y
)
36 ifeq ($(CONFIG_UCLIBC_VERSION_0_9_32
),y
)
40 define Package
/qt4
/Default
41 SECTION
:=xorg-framework
46 URL
:=http
://qt.nokia.com
/
50 $(call Package
/qt4
/Default
)
51 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
54 define Package
/qt4-gui
55 $(call Package
/qt4
/Default
)
56 #DEPENDS+=+FEATURE_drawing-backend_DirectFB:directfb +libpng +libtiff +libjpeg +libfreetype
57 DEPENDS
+=+libpng
+libtiff
+libjpeg
+libfreetype
+qt4-network
61 define Package
/qt4-demos
62 $(call Package
/qt4
/Default
)
67 define Package
/qt4-examples
68 $(call Package
/qt4
/Default
)
73 define Package
/qt4-network
74 $(call Package
/qt4
/Default
)
78 define Package
/qt4-sqlite
79 $(call Package
/qt4
/Default
)
84 define Package
/qt4-mysql
85 $(call Package
/qt4
/Default
)
87 DEPENDS
+=+libmysqlclient
90 #define Package/qt4-multimedia
91 # $(call Package/qt4/Default)
95 #define Package/qt4-audio-backend
96 # $(call Package/qt4/Default)
97 # TITLE+=(audio-backend)
100 define Package
/qt4-phonon
101 $(call Package
/qt4
/Default
)
103 DEPENDS
+=+qt4-gui
+qt4-xml
+qt4-dbus
+qt4-network
106 #define Package/qt4-phonon-backend
107 # $(call Package/qt4/Default)
108 # TITLE+=(phonon-backend)
111 define Package
/qt4-svg
112 $(call Package
/qt4
/Default
)
114 #DEPENDS+=+qt4-gui @BROKEN
115 DEPENDS
+=+qt4-gui
+qt4-network
118 define Package
/qt4-webkit
119 $(call Package
/qt4
/Default
)
121 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
124 define Package
/qt4-script
125 $(call Package
/qt4
/Default
)
127 DEPENDS
+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32
# versions of uclibc prior 0.9.32 do not have nptl support
130 define Package
/qt4-scripttools
131 $(call Package
/qt4
/Default
)
133 DEPENDS
+=+qt4-script
+qt4-gui
+qt4-network
136 #define Package/qt4-accessibility
137 # $(call Package/qt4/Default)
138 # TITLE+=(accessibility)
141 #define Package/qt4-javascript-jit
142 # $(call Package/qt4/Default)
143 # TITLE+=(javascript-jit)
146 #define Package/qt4-cups
147 # $(call Package/qt4/Default)
151 define Package
/qt4-dbus
152 $(call Package
/qt4
/Default
)
154 DEPENDS
+=+libdbus
+qt4-xml
157 #define Package/qt4-gtkstyle
158 # $(call Package/qt4/Default)
162 #define Package/qt4-glib
163 # $(call Package/qt4/Default)
167 define Package
/qt4-qt3support
168 $(call Package
/qt4
/Default
)
170 DEPENDS
+=+qt4-gui
+qt4-xml
173 define Package
/qt4-declarative
174 $(call Package
/qt4
/Default
)
176 DEPENDS
+=+qt4-script
+qt4-xml
+qt4-gui
+qt4-network
179 define Package
/qt4-xml
180 $(call Package
/qt4
/Default
)
185 define Package
/qt4-drivers-mouse
/Default
186 $(call Package
/qt4
/Default
)
190 define Package
/qt4-drivers-mouse-tpmousedriver
191 $(call Package
/qt4-drivers-mouse
/Default
)
195 define Package
/qt4-drivers-mouse-pcmousedriver
196 $(call Package
/qt4-drivers-mouse
/Default
)
200 define Package
/qt4-drivers-mouse-tslibmousedriver
201 $(call Package
/qt4-drivers-mouse
/Default
)
202 TITLE
+=tslibmousedriver
206 define Package
/qt4-drivers-gfx
/Default
207 $(call Package
/qt4
/Default
)
211 define Package
/qt4-drivers-gfx-directfb
212 $(call Package
/qt4-drivers-gfx
/Default
)
216 define Package
/qt4-drivers-gfx-linuxfb
217 $(call Package
/qt4-drivers-gfx
/Default
)
222 define Package
/qt4-drivers-kbd
/Default
223 $(call Package
/qt4
/Default
)
227 define Package
/qt4-drivers-kbd-linuxinput
228 $(call Package
/qt4-drivers-kbd
/Default
)
233 TARGET_INCDIRS
+=$(STAGING_DIR
)/include $(STAGING_DIR
)/usr
/include $(TOOLCHAIN_DIR
)/include $(TOOLCHAIN_DIR
)/usr
/include
234 TARGET_LIBDIRS
+=$(STAGING_DIR
)/lib
$(STAGING_DIR
)/usr
/lib
$(TOOLCHAIN_DIR
)/lib
$(TOOLCHAIN_DIR
)/usr
/lib
235 TARGET_LDFLAGS
+=-Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
,-rpath-link
=$(PKG_BUILD_DIR
)/lib
236 TARGET_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include/freetype2
-I
$(PKG_BUILD_DIR
)/include
238 define Build
/Configure
240 # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
241 # 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
242 # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
243 # do not use fontconfig as it doesn't work anyway for qte
244 # 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
245 mkdir
-p
$(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++
246 cp
-a .
/files
/{qmake.conf
,qplatformdefs.h
} $(PKG_BUILD_DIR
)/mkspecs
/qws
/linux-openwrt-g
++/
247 ( cd
$(PKG_BUILD_DIR
) ; \
248 TARGET_CC
="$(TARGET_CROSS)gcc" \
249 TARGET_CXX
="$(TARGET_CROSS)g++" \
250 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
251 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
252 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
253 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
254 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
255 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
256 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
257 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
258 STAGING_DIR
="$(STAGING_DIR)" \
259 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
261 -prefix $(CONFIGURE_PREFIX
) \
262 -bindir $(CONFIGURE_PREFIX
)/bin \
263 -libdir $(CONFIGURE_PREFIX
)/lib \
264 -datadir $(CONFIGURE_PREFIX
)/share
/Qt \
265 -plugindir
$(CONFIGURE_PREFIX
)/lib
/Qt
/plugins \
266 -demosdir
$(CONFIGURE_PREFIX
)/share
/Qt
/demos \
267 -examplesdir
$(CONFIGURE_PREFIX
)/share
/Qt
/examples \
268 -sysconfdir
/etc
/Qt \
272 $(if
$(CONFIG_PACKAGE_qt4-demos
),-make
,-nomake
) demos \
273 $(if
$(CONFIG_PACKAGE_qt4-examples
),-make
,-nomake
) examples \
275 -nomake translations \
276 -xplatform qws
/linux-openwrt-g
++ \
277 -platform linux-g
++ \
294 -no-decoration-styled \
295 -no-decoration-windows \
296 -no-decoration-default \
303 $(if
$(NPTL
),-webkit
,-no-webkit
) \
305 $(if
$(NPTL
),-script
,-no-script
) \
306 $(if
$(NPTL
),-scripttools
,-no-scripttools
) \
308 $(if
$(NPTL
),-declarative
,-no-declarative
) \
332 -no-gfx-transformed \
335 -no-gfx-multiscreen \
337 -plugin-gfx-directfb \
338 -plugin-gfx-linuxfb \
341 -qt-mouse-linuxinput \
342 -plugin-mouse-linuxtp \
344 -plugin-mouse-tslib \
348 -plugin-kbd-linuxinput \
353 # just passing <make install> results in not building 3rdparty/webkit/JavaScriptCore
354 # unfortunately in this particular case, <make> makes further <qmake> calls, therewith
355 # uses the qmake.conf which needs get the cross-compiling vars passed once again
356 TARGET_CC
="$(TARGET_CROSS)gcc" \
357 TARGET_CXX
="$(TARGET_CROSS)g++" \
358 TARGET_AR
="$(TARGET_CROSS)ar cqs" \
359 TARGET_OBJCOPY
="$(TARGET_CROSS)objcopy" \
360 TARGET_RANLIB
="$(TARGET_CROSS)ranlib" \
361 TARGET_CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
362 TARGET_CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
363 TARGET_LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
364 TARGET_INCDIRS
="$(TARGET_INCDIRS)" \
365 TARGET_LIBDIRS
="$(TARGET_LIBDIRS)" \
366 STAGING_DIR
="$(STAGING_DIR)" \
367 STAGING_DIR_HOST
="$(STAGING_DIR)/../host" \
368 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)
369 INSTALL_ROOT
=$(PKG_INSTALL_DIR
) \
370 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
373 define Build
/InstallDev
375 $(STAGING_DIR_HOST
)/bin
377 # host tools (qmake, moc, rcc, uic)
379 $(PKG_INSTALL_DIR
)/usr
/bin
/{qmake
,moc
,rcc
,uic
} \
380 $(STAGING_DIR_HOST
)/bin
/
384 $(1)/usr
/share
/mkspecs \
385 $(1)/usr
/lib
/pkgconfig \
388 $(1)/usr
/lib
/Qt
/plugins
395 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/mkspecs
/* \
396 $(1)/usr
/share
/mkspecs
/
399 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/* \
400 $(1)/usr
/lib
/pkgconfig
/
403 $(PKG_INSTALL_DIR
)/usr
/include/* \
407 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
411 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
412 # $(1)/usr/lib/Qt/plugins/
415 define Package
/qt4
/install
418 $(1)/usr
/lib
/Qt
/plugins
421 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtCore.so
* \
425 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
426 # $(1)/usr/lib/Qt/plugins/codecs/
429 define Package
/qt4-gui
/install
432 $(1)/usr
/lib
/Qt
/plugins
435 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtGui.so
* \
438 #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
440 /usr
/share
/fonts
/ttf-dejavu \
443 # we use the dejavue font package instead
445 # $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
446 # $(1)/usr/lib/fonts/
449 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
450 # $(1)/usr/lib/Qt/plugins/
453 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
454 # $(1)/usr/lib/Qt/plugins/
457 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
458 # $(1)/usr/lib/Qt/plugins/
461 define Package
/qt4-demos
/install
466 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/demos \
477 define Package
/qt4-examples
/install
482 $(PKG_INSTALL_DIR
)/usr
/share
/Qt
/examples \
493 define Package
/qt4-network
/install
498 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtNetwork.so
* \
502 define Package
/qt4-sqlite
/install
504 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
507 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
511 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlite.so \
512 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
515 define Package
/qt4-mysql
/install
517 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
520 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSql.so
* \
524 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/sqldrivers
/libqsqlmysql.so \
525 $(1)/usr
/lib
/Qt
/plugins
/sqldrivers
/
528 #define Package/qt4-multimedia/install
533 # $(PKG_INSTALL_DIR)/usr/bin/examples/* \
537 define Package
/qt4-phonon
/install
542 $(PKG_INSTALL_DIR
)/usr
/lib
/libphonon.so
* \
546 define Package
/qt4-svg
/install
549 $(1)/usr
/lib
/Qt
/plugins
552 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtSvg.so
* \
556 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
557 # $(1)/usr/lib/Qt/plugins/
560 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
561 # $(1)/usr/lib/Qt/plugins/
564 define Package
/qt4-webkit
/install
567 $(1)/usr
/lib
/Qt
/plugins
570 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtWebKit.so
* \
574 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
575 # $(1)/usr/lib/Qt/plugins/
578 define Package
/qt4-script
/install
581 $(1)/usr
/lib
/Qt
/plugins
584 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScript.so
* \
588 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
589 # $(1)/usr/lib/Qt/plugins/
592 define Package
/qt4-scripttools
/install
597 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtScriptTools.so
* \
601 define Package
/qt4-dbus
/install
606 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDBus.so
* \
610 # $(PKG_INSTALL_DIR)/usr/bin/qdbus \
614 define Package
/qt4-qt3-support
/install
617 $(1)/usr
/lib
/Qt
/plugins
620 $(PKG_INSTALL_DIR
)/usr
/lib
/libQt3Support.so
* \
624 # $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
625 # $(1)/usr/lib/Qt/plugins/
628 define Package
/qt4-declarative
/install
633 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtDeclarative.so
* \
637 define Package
/qt4-xml
/install
642 $(PKG_INSTALL_DIR
)/usr
/lib
/libQtXml.so
* \
648 define Package
/qt4-drivers-mouse-tpmousedriver
/install
650 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
653 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqlinuxtpmousedriver.so \
654 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
657 define Package
/qt4-drivers-mouse-pcmousedriver
/install
659 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
662 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqpcmousedriver.so \
663 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
666 define Package
/qt4-drivers-mouse-tslibmousedriver
/install
668 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
671 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/mousedrivers
/libqtslibmousedriver.so \
672 $(1)/usr
/lib
/Qt
/plugins
/mousedrivers
/
676 define Package
/qt4-drivers-gfx-directfb
/install
678 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
681 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/gfxdrivers
/libqdirectfbscreen.so \
682 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
/
685 define Package
/qt4-drivers-gfx-linuxfb
/install
687 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
690 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/gfxdrivers
/libqscreenlinuxfb.so \
691 $(1)/usr
/lib
/Qt
/plugins
/gfxdrivers
/
695 define Package
/qt4-drivers-kbd-linuxinput
/install
697 $(1)/usr
/lib
/Qt
/plugins
/kbddrivers
700 $(PKG_INSTALL_DIR
)/usr
/lib
/Qt
/plugins
/kbddrivers
/libqlinuxinputkbddriver.so \
701 $(1)/usr
/lib
/Qt
/plugins
/kbddrivers
/
707 $(eval
$(call BuildPackage
,qt4
))
708 $(eval
$(call BuildPackage
,qt4-gui
))
709 $(eval
$(call BuildPackage
,qt4-demos
))
710 $(eval
$(call BuildPackage
,qt4-examples
))
711 $(eval
$(call BuildPackage
,qt4-network
))
712 $(eval
$(call BuildPackage
,qt4-sqlite
))
713 $(eval
$(call BuildPackage
,qt4-mysql
))
714 #$(eval $(call BuildPackage,qt4-multimedia))
715 #$(eval $(call BuildPackage,qt4-audio-backend))
716 $(eval
$(call BuildPackage
,qt4-phonon
))
717 #$(eval $(call BuildPackage,qt4-phonon-backend))
718 $(eval
$(call BuildPackage
,qt4-svg
))
719 $(eval
$(call BuildPackage
,qt4-webkit
))
720 $(eval
$(call BuildPackage
,qt4-script
))
721 $(eval
$(call BuildPackage
,qt4-scripttools
))
722 #$(eval $(call BuildPackage,qt4-accessibility))
723 #$(eval $(call BuildPackage,qt4-javascript-jit))
724 #$(eval $(call BuildPackage,qt4-cups))
725 $(eval
$(call BuildPackage
,qt4-dbus
))
726 #$(eval $(call BuildPackage,qt4-gtkstyle))
727 #$(eval $(call BuildPackage,qt4-glib))
728 $(eval
$(call BuildPackage
,qt4-qt3support
))
729 $(eval
$(call BuildPackage
,qt4-declarative
))
730 $(eval
$(call BuildPackage
,qt4-xml
))
732 $(eval
$(call BuildPackage
,qt4-drivers-mouse-tpmousedriver
))
733 $(eval
$(call BuildPackage
,qt4-drivers-mouse-pcmousedriver
))
734 $(eval
$(call BuildPackage
,qt4-drivers-mouse-tslibmousedriver
))
736 $(eval
$(call BuildPackage
,qt4-drivers-gfx-directfb
))
737 $(eval
$(call BuildPackage
,qt4-drivers-gfx-linuxfb
))
739 $(eval
$(call BuildPackage
,qt4-drivers-kbd-linuxinput
))