[packages/qt4] Qt-core does not depend on sqlite
[openwrt/svn-archive/archive.git] / Xorg / lib / qt4 / Makefile
index d074b4caaa29630a05e509e35965a5b4645b86bd..fd9dd1242c6484ce98dfa1c8eae8c86d7ef0bf3d 100644 (file)
@@ -6,22 +6,56 @@
 #
 
 # TODO:
-#  - handle software which uses qmake in a more generic way (move functionality / generic qmake-config into buildroot)
-#  - use generic qmake, moc, etc. executables since building them within the qt stack will get redundant and annyoing when other sw will need them as well
-#  - test/add X11/xcb support
+#  - test/add xcb support
 #  - handle plugins in a granular way (find out which packages should provide which plugins)
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qt4
-PKG_VERSION:=4.6.2
+PKG_VERSION:=4.7.0
 PKG_RELEASE:=1
+PKG_MD5SUM:=3a2f25b9b115037277f4fb759194a7a5
 
 PKG_SOURCE:=qt-everywhere-opensource-src-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.qt.nokia.com/qt/source
 PKG_BUILD_DIR=$(BUILD_DIR)/qt-everywhere-opensource-src-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+
+PKG_CONFIG_DEPENDS:= \
+       CONFIG_QT4_WS_QWS \
+       CONFIG_QT4_WS_X11 \
+       CONFIG_PACKAGE_directfb \
+       CONFIG_PACKAGE_qt4-demos \
+       CONFIG_PACKAGE_qt4-examples \
+       CONFIG_PACKAGE_qt4-svg \
+       CONFIG_PACKAGE_qt4-qt3support \
+       CONFIG_PACKAGE_qt4-dbus \
+       CONFIG_PACKAGE_qt4-phonon \
+       CONFIG_PACKAGE_qt4-sqlite \
+       CONFIG_PACKAGE_qt4-mysql \
+       CONFIG_PACKAGE_qt4-webkit \
+       CONFIG_PACKAGE_qt4-script \
+       CONFIG_PACKAGE_qt4-scriptools \
+       CONFIG_PACKAGE_qt4-openssl
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+-include $(if $(DUMP),,./files/qmake.mk)
+
+# this should be moved to a more generic place later, as other packages are configured different as well depending on available nptl support
+ifeq ($(CONFIG_USE_GLIBC),y)
+  NPTL:=y
+endif
+ifeq ($(CONFIG_USE_EGLIBC),y)
+  NPTL:=y
+endif
+ifeq ($(CONFIG_UCLIBC_VERSION_0_9_32),y)
+  NPTL:=y
+endif
+
+define Package/qt4/config
+       source "$(SOURCE)/Config.in"
+endef
 
 define Package/qt4/Default
   SECTION:=xorg-framework
@@ -29,18 +63,21 @@ define Package/qt4/Default
   SUBMENU:=framework
   TITLE:=qt4
   DEPENDS:=qt4
+  DEFAULT:=m if PACKAGE_qt4-gui && ALL
   URL:=http://qt.nokia.com/
 endef
 
 define Package/qt4
   $(call Package/qt4/Default)
-  DEPENDS:=@FEATURE_drawing-backend_DirectFB +FEATURE_drawing-backend_DirectFB:DirectFB +zlib +libstdcpp +libsqlite3 # require directfb for now, as other systems (libX11, xcb) are untested
+  DEPENDS:=+zlib +libstdcpp
 endef
 
 define Package/qt4-gui
   $(call Package/qt4/Default)
-  #DEPENDS+=+FEATURE_drawing-backend_DirectFB:DirectFB +libpng +libtiff +libjpeg +libfreetype
-  DEPENDS+=+libpng +libtiff +libjpeg +libfreetype
+  DEFAULT:=
+  DEPENDS+=+libpng +libtiff +libjpeg +libfreetype +qt4-network \
+       +FEATURE_drawing-backend_libX11:libX11 \
+       +FEATURE_drawing-backend_libX11:libXext @DISPLAY_SUPPORT
   TITLE+=(gui)
 endef
 
@@ -53,7 +90,7 @@ endef
 define Package/qt4-examples
   $(call Package/qt4/Default)
   TITLE+=(examples)
-  DEPENDS+=+qt4-gui
+  DEPENDS+=+qt4-gui +qt4-svg
 endef
 
 define Package/qt4-network
@@ -73,6 +110,12 @@ define Package/qt4-mysql
   DEPENDS+=+libmysqlclient
 endef
 
+define Package/qt4-openssl
+  $(call Package/qt4/Default)
+  TITLE+=(openssl)
+  DEPENDS+=+libopenssl
+endef
+
 #define Package/qt4-multimedia
 #  $(call Package/qt4/Default)
 #  TITLE+=(multimedia)
@@ -86,7 +129,7 @@ endef
 define Package/qt4-phonon
   $(call Package/qt4/Default)
   TITLE+=(phonon)
-  DEPENDS+=+qt4-gui
+  DEPENDS+=+qt4-gui +qt4-xml +qt4-dbus +qt4-network
 endef
 
 #define Package/qt4-phonon-backend
@@ -97,26 +140,25 @@ endef
 define Package/qt4-svg
   $(call Package/qt4/Default)
   TITLE+=(svg)
-  #DEPENDS+=+qt4-gui @BROKEN
-  DEPENDS+=+qt4-gui
+  DEPENDS+=+qt4-gui +qt4-network
 endef
 
 define Package/qt4-webkit
   $(call Package/qt4/Default)
   TITLE+=(webkit)
-  DEPENDS+=@USE_GLIBC||@USE_EGLIBC # until we do not have nptl-support within uclibc javascriptcore will fail to link against uclibc
+  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
 endef
 
 define Package/qt4-script
   $(call Package/qt4/Default)
   TITLE+=(script)
-  DEPENDS+=@USE_GLIBC||@USE_EGLIBC # until we do not have nptl-support within uclibc, javascriptcore will fail to link against uclibc
+  DEPENDS+=@USE_GLIBC||@USE_EGLIBC||@UCLIBC_VERSION_0_9_32 # versions of uclibc prior 0.9.32 do not have nptl support
 endef
 
 define Package/qt4-scripttools
   $(call Package/qt4/Default)
   TITLE+=(scripttools)
-  DEPENDS+=+qt4-script
+  DEPENDS+=+qt4-script +qt4-gui +qt4-network
 endef
 
 #define Package/qt4-accessibility
@@ -137,7 +179,7 @@ endef
 define Package/qt4-dbus
   $(call Package/qt4/Default)
   TITLE+=(dbus)
-  DEPENDS+=+libdbus
+  DEPENDS+=+libdbus +qt4-xml
 endef
 
 #define Package/qt4-gtkstyle
@@ -153,58 +195,115 @@ endef
 define Package/qt4-qt3support
   $(call Package/qt4/Default)
   TITLE+=(qt3support)
+  DEPENDS+=+qt4-gui +qt4-xml
+endef
+
+define Package/qt4-declarative
+  $(call Package/qt4/Default)
+  TITLE+=(declarative)
+  DEPENDS+=+qt4-script +qt4-xml +qt4-gui +qt4-network
 endef
 
-TARGET_CFLAGS+="-I$(STAGING_DIR)/usr/include/freetype2"
+define Package/qt4-xml
+  $(call Package/qt4/Default)
+  TITLE+=(xml)
+endef
+
+###
+define Package/qt4-drivers-mouse/Default
+  $(call Package/qt4/Default)
+  TITLE+=mousedrivers
+  DEPENDS+=@QT4_WS_QWS
+endef
+
+define Package/qt4-drivers-mouse-tpmousedriver
+  $(call Package/qt4-drivers-mouse/Default)
+  TITLE+=tpmousedriver
+endef
+
+define Package/qt4-drivers-mouse-pcmousedriver
+  $(call Package/qt4-drivers-mouse/Default)
+  TITLE+=pcmousedriver
+endef
+
+define Package/qt4-drivers-mouse-tslibmousedriver
+  $(call Package/qt4-drivers-mouse/Default)
+  TITLE+=tslibmousedriver
+  DEPENDS+=+tslib
+endef
+
+###
+define Package/qt4-drivers-gfx/Default
+  $(call Package/qt4/Default)
+  TITLE+=gfxdrivers
+  DEPENDS+=@QT4_WS_QWS
+endef
+
+define Package/qt4-drivers-gfx-directfb
+  $(call Package/qt4-drivers-gfx/Default)
+  TITLE+=directfb
+  DEPENDS+=@FEATURE_drawing-backend_DirectFB +FEATURE_drawing-backend_DirectFB:directfb
+endef
+
+define Package/qt4-drivers-gfx-linuxfb
+  $(call Package/qt4-drivers-gfx/Default)
+  TITLE+=linuxfb
+endef
+
+define Package/qt4-drivers-gfx-vnc
+  $(call Package/qt4-drivers-gfx/Default)
+  TITLE+=VNC
+endef
+
+###
+define Package/qt4-drivers-kbd/Default
+  $(call Package/qt4/Default)
+  TITLE+=kbddrivers
+  DEPENDS+=@QT4_WS_QWS
+endef
+
+
+TARGET_INCDIRS+=$(STAGING_DIR)/include $(STAGING_DIR)/usr/include $(TOOLCHAIN_DIR)/include $(TOOLCHAIN_DIR)/usr/include
+TARGET_LIBDIRS+=$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib $(TOOLCHAIN_DIR)/lib $(TOOLCHAIN_DIR)/usr/lib
+TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib,-rpath-link=$(PKG_BUILD_DIR)/lib
+TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/freetype2 -I$(PKG_BUILD_DIR)/include
+
+ifeq ($(CONFIG_QT4_WS_QWS),y)
+  FILEPFX:=qws-
+endif
+ifeq ($(CONFIG_QT4_WS_X11),y)
+  FILEPFX:=x11-
+endif
+ifeq ($(CONFIG_PACKAGE_qt4-gui),)
+  # If GUI is disabled, we use the X11 prefix. That's good enough, for now.
+  # The X11 files also work for non-GUI.
+  FILEPFX:=x11-
+endif
 
 define Build/Configure
-       # demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
-       # svg: svg support always compiled in, as once qt is built without, strange include errors occur when we're going to compile qt4-svg afterwards
-       # linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
-       # do not use fontconfig as it doesn't work anyway for qte
-       ( \
-               cd $(PKG_BUILD_DIR); \
-               QPATH='mkspecs/qws/linux-openwrt-g++' ; \
-               mkdir $$$$QPATH ; \
-               echo '#include "../../linux-g++/qplatformdefs.h"' \
-                       >> $$$$QPATH/qplatformdefs.h ; \
-               echo 'include(../../common/g++.conf)' \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo 'include(../../common/linux.conf)' \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo 'include(../../common/qws.conf)' \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_CC                  = $(TARGET_CC)" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_CXX                 = $(TARGET_CXX)" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_AR                  = $(TARGET_CROSS)ar cqs" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_OBJCOPY             = $(TARGET_CROSS)objcopy" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_RANLIB              = $(TARGET_CROSS)ranlib" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_CFLAGS              = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_CXXFLAGS            = $(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_LINK                = $(TARGET_CXX)" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_LINK_SHLIB          = $(TARGET_CXX)" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_LINK_C              = $(TARGET_CC)" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_LINK_C_SHLIB        = $(TARGET_CC)" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_LFLAGS              = -L$(PKG_BUILD_DIR)/lib $(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_STRIP               = : " \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo "QMAKE_STRIPFLAGS_LIB      = " \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo 'load(qt_config)' \
-                       >> $$$$QPATH/qmake.conf ; \
-               echo yes | ./configure \
+       # NOTES:
+       #  demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
+       #  linuxfb/directfb: since directfb is not much overhead compared to plain framebuffer, force using directfb
+       #  do not use fontconfig as it doesn't work anyway for qte
+       #  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
+       mkdir -p $(PKG_BUILD_DIR)/mkspecs/$(QMAKE_PLATFORM_PREFIX)linux-openwrt-g++
+       $(CP) ./files/$(FILEPFX)qmake.conf $(PKG_BUILD_DIR)/mkspecs/$(QMAKE_PLATFORM_PREFIX)linux-openwrt-g++/qmake.conf
+       $(CP) ./files/$(FILEPFX)qplatformdefs.h $(PKG_BUILD_DIR)/mkspecs/$(QMAKE_PLATFORM_PREFIX)linux-openwrt-g++/qplatformdefs.h
+       ( cd $(PKG_BUILD_DIR) ; \
+               TARGET_CC="$(TARGET_CROSS)gcc" \
+               TARGET_CXX="$(TARGET_CROSS)g++" \
+               TARGET_AR="$(TARGET_CROSS)ar cqs" \
+               TARGET_OBJCOPY="$(TARGET_CROSS)objcopy" \
+               TARGET_RANLIB="$(TARGET_CROSS)ranlib" \
+               TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+               TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+               TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
+               TARGET_INCDIRS="$(TARGET_INCDIRS)" \
+               TARGET_LIBDIRS="$(TARGET_LIBDIRS)" \
+               STAGING_DIR="$(STAGING_DIR)" \
+               STAGING_DIR_HOST="$(STAGING_DIR)/../host" \
+               ./configure \
+                       -arch $(ARCH) \
                        -prefix $(CONFIGURE_PREFIX) \
                        -bindir $(CONFIGURE_PREFIX)/bin \
                        -libdir $(CONFIGURE_PREFIX)/lib \
@@ -216,13 +315,15 @@ define Build/Configure
                        -no-rpath \
                        -force-pkg-config \
                        -nomake tools \
-                       -$(if $(CONFIG_PACKAGE_qt4-demos),make demos,nomake demos) \
-                       -$(if $(CONFIG_PACKAGE_qt4-examples),make examples,nomake examples) \
+                       $(if $(CONFIG_PACKAGE_qt4-demos),-make,-nomake) demos \
+                       $(if $(CONFIG_PACKAGE_qt4-examples),-make,-nomake) examples \
                        -nomake docs \
                        -nomake translations \
-                       -embedded openwrt \
+                       -xplatform $(QMAKE_PLATFORM_PREFIX)linux-openwrt-g++ \
                        -platform linux-g++ \
+                       $(if $(CONFIG_QT4_WS_X11),-x11,-embedded) \
                        -release \
+                       -confirm-license \
                        -opensource \
                        -no-mmx \
                        -no-3dnow \
@@ -234,65 +335,108 @@ define Build/Configure
                        -system-libjpeg \
                        -system-freetype \
                        -system-sqlite \
-                       $(if $(CONFIG_PACKAGE_qt4-sqlite),-plugin-sql-sqlite,) \
-                       $(if $(CONFIG_PACKAGE_qt4-mysql),-plugin-sql-mysql,) \
+                       $(if $(CONFIG_PACKAGE_qt4-sqlite),-plugin-sql-sqlite) \
+                       $(if $(CONFIG_PACKAGE_qt4-mysql),-plugin-sql-mysql) \
                        -no-decoration-styled \
                        -no-decoration-windows \
                        -no-decoration-default \
                        -verbose \
-                       -$(if $(CONFIG_PACKAGE_qt4-multimedia),multimedia,no-multimedia) \
-                       -$(if $(CONFIG_PACKAGE_qt4-audio-backend),audio-backend,no-audio-backend) \
-                       -$(if $(CONFIG_PACKAGE_qt4-phonon),phonon,no-phonon) \
-                       -$(if $(CONFIG_PACKAGE_qt4-phonon-backend),phonon-backend,no-phonon-backend) \
-                       -svg \
-                       -$(if $(CONFIG_PACKAGE_qt4-webkit),webkit,no-webkit) \
-                       -$(if $(CONFIG_PACKAGE_qt4-javascript-jit),javascript-jit,no-javascript-jit) \
-                       -$(if $(CONFIG_PACKAGE_qt4-script),script,no-script) \
-                       -$(if $(CONFIG_PACKAGE_qt4-scripttools),scripttools,no-scripttools) \
-                       -$(if $(CONFIG_PACKAGE_qt4-accessibility),accessibility,no-accessibility) \
-                       -no-declarative \
-                       -no-openssl \
+                       -no-multimedia \
+                       -no-audio-backend \
+                       $(if $(CONFIG_PACKAGE_qt4-phonon),-phonon,-no-phonon) \
+                       -no-phonon-backend \
+                       $(if $(CONFIG_PACKAGE_qt4-svg),-svg,-no-svg) \
+                       $(if $(CONFIG_PACKAGE_qt4-webkit),-webkit,-no-webkit) \
+                       -no-javascript-jit \
+                       $(if $(CONFIG_PACKAGE_qt4-script),-script,-no-script) \
+                       $(if $(CONFIG_PACKAGE_qt4-scripttools),-scripttools,-no-scripttools) \
+                       -no-accessibility \
+                       $(if $(CONFIG_PACKAGE_qt4-declarative),-declarative,-no-declarative) \
+                       $(if $(CONFIG_PACKAGE_qt4-openssl),-openssl -I $(STAGING_DIR)/usr/include,-no-openssl) \
                        -no-nis \
-                       -$(if $(CONFIG_PACKAGE_qt4-cups),cups,no-cups) \
-                       -no-iconv \
-                       -$(if $(CONFIG_PACKAGE_qt4-dbus),dbus,no-dbus) \
-                       -$(if $(CONFIG_PACKAGE_qt4-gtkstyle),gtkstyle,no-gtkstyle) \
+                       -no-cups \
+                       -iconv \
+                       $(if $(CONFIG_PACKAGE_qt4-dbus),-dbus,-no-dbus) \
+                       -no-gtkstyle \
                        -no-nas-sound \
                        -no-opengl \
                        -no-openvg \
                        -no-sm \
                        -no-xshape \
-                       -no-xsync \
+                       $(if $(CONFIG_QT4_WS_X11),-no-xsync,-xsync) \
                        -no-xinerama \
-                       -no-xcursor \
+                       $(if $(CONFIG_QT4_WS_X11),-no-xcursor,-xcursor) \
                        -no-xfixes \
                        -no-xrandr \
                        -no-xrender \
                        -no-mitshm \
-                       -no-fontconfig \
-                       -no-xinput \
-                       -no-xkb \
-                       -$(if $(CONFIG_PACKAGE_qt4-glib),glib,no-glib) \
-                       -$(if $(CONFIG_PACKAGE_qt4-qt3support),qt3support,no-qt3support) \
-                       -$(if $(CONFIG_FEATURE_drawing-backend_DirectFB),qt-gfx-directfb,) \
-                       -qt-gfx-linuxfb \
+                       $(if $(CONFIG_QT4_WS_X11),-no-fontconfig,-fontconfig) \
+                       $(if $(CONFIG_QT4_WS_X11),-no-xinput,-xinput) \
+                       $(if $(CONFIG_QT4_WS_X11),-no-xkb,-xkb) \
+                       -no-glib \
+                       $(if $(CONFIG_PACKAGE_qt4-qt3support),-qt3support,-no-qt3support) \
+                       -no-gfx-transformed \
+                       -no-gfx-qvfb \
+                       $(if $(CONFIG_PACKAGE_qt4-drivers-gfx-vnc),-plugin-gfx-vnc,-no-gfx-vnc) \
                        -no-gfx-multiscreen \
+                       -no-gfx-qnx \
+                       $(if $(CONFIG_PACKAGE_directfb),-plugin-gfx-directfb) \
+                       -plugin-gfx-linuxfb \
+                       -no-mouse-qvfb \
+                       -no-mouse-qnx \
+                       -qt-mouse-linuxinput \
+                       -plugin-mouse-linuxtp \
+                       -plugin-mouse-pc \
+                       -plugin-mouse-tslib \
+                       -no-kbd-qvfb \
+                       -no-kbd-qnx \
+                       -qt-kbd-tty \
+                       -qt-kbd-linuxinput \
        )
 endef
 
 define Build/Compile
+       # just passing <make install> results in not building 3rdparty/webkit/JavaScriptCore
+       # unfortunately in this particular case, <make> makes further <qmake> calls, therewith
+       #  uses the qmake.conf which needs get the cross-compiling vars passed once again
+       TARGET_CC="$(TARGET_CROSS)gcc" \
+       TARGET_CXX="$(TARGET_CROSS)g++" \
+       TARGET_AR="$(TARGET_CROSS)ar cqs" \
+       TARGET_OBJCOPY="$(TARGET_CROSS)objcopy" \
+       TARGET_RANLIB="$(TARGET_CROSS)ranlib" \
+       TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+       TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+       TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
+       TARGET_INCDIRS="$(TARGET_INCDIRS)" \
+       TARGET_LIBDIRS="$(TARGET_LIBDIRS)" \
+       STAGING_DIR="$(STAGING_DIR)" \
+       STAGING_DIR_HOST="$(STAGING_DIR)/../host" \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
        INSTALL_ROOT=$(PKG_INSTALL_DIR) \
                $(MAKE) -C $(PKG_BUILD_DIR) install
 endef
 
 define Build/InstallDev
        $(INSTALL_DIR) \
+               $(STAGING_DIR_HOST)/bin
+
+       # host tools (qmake, moc, rcc, uic)
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/bin/{qmake,moc,rcc,uic} \
+               $(STAGING_DIR_HOST)/bin/
+
+       $(INSTALL_DIR) \
+               $(1)/mk \
                $(1)/usr/share/mkspecs \
                $(1)/usr/lib/pkgconfig \
                $(1)/usr/lib \
                $(1)/usr/include \
                $(1)/usr/lib/Qt/plugins
 
+       $(CP) \
+               ./files/qmake.mk \
+               $(1)/mk/
+
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/share/Qt/mkspecs/* \
                $(1)/usr/share/mkspecs/
@@ -527,6 +671,85 @@ define Package/qt4-qt3-support/install
        #       $(1)/usr/lib/Qt/plugins/
 endef
 
+define Package/qt4-declarative/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtDeclarative.so* \
+               $(1)/usr/lib/
+endef
+
+define Package/qt4-xml/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtXml.so* \
+               $(1)/usr/lib/
+endef
+
+# plugins
+#  mouse drivers
+define Package/qt4-drivers-mouse-tpmousedriver/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/mousedrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/mousedrivers/libqlinuxtpmousedriver.so \
+               $(1)/usr/lib/Qt/plugins/mousedrivers/
+endef
+
+define Package/qt4-drivers-mouse-pcmousedriver/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/mousedrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/mousedrivers/libqpcmousedriver.so \
+               $(1)/usr/lib/Qt/plugins/mousedrivers/
+endef
+
+define Package/qt4-drivers-mouse-tslibmousedriver/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/mousedrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/mousedrivers/libqtslibmousedriver.so \
+               $(1)/usr/lib/Qt/plugins/mousedrivers/
+endef
+
+#  graphics drivers
+define Package/qt4-drivers-gfx-directfb/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/gfxdrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/gfxdrivers/libqdirectfbscreen.so \
+               $(1)/usr/lib/Qt/plugins/gfxdrivers/
+endef
+
+define Package/qt4-drivers-gfx-linuxfb/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/gfxdrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/gfxdrivers/libqscreenlinuxfb.so \
+               $(1)/usr/lib/Qt/plugins/gfxdrivers/
+endef
+
+define Package/qt4-drivers-gfx-vnc/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/gfxdrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/gfxdrivers/libqgfxvnc.so \
+               $(1)/usr/lib/Qt/plugins/gfxdrivers/
+endef
+
+#  keyboard drivers
+
+
+
 $(eval $(call BuildPackage,qt4))
 $(eval $(call BuildPackage,qt4-gui))
 $(eval $(call BuildPackage,qt4-demos))
@@ -534,6 +757,7 @@ $(eval $(call BuildPackage,qt4-examples))
 $(eval $(call BuildPackage,qt4-network))
 $(eval $(call BuildPackage,qt4-sqlite))
 $(eval $(call BuildPackage,qt4-mysql))
+$(eval $(call BuildPackage,qt4-openssl))
 #$(eval $(call BuildPackage,qt4-multimedia))
 #$(eval $(call BuildPackage,qt4-audio-backend))
 $(eval $(call BuildPackage,qt4-phonon))
@@ -549,3 +773,13 @@ $(eval $(call BuildPackage,qt4-dbus))
 #$(eval $(call BuildPackage,qt4-gtkstyle))
 #$(eval $(call BuildPackage,qt4-glib))
 $(eval $(call BuildPackage,qt4-qt3support))
+$(eval $(call BuildPackage,qt4-declarative))
+$(eval $(call BuildPackage,qt4-xml))
+
+$(eval $(call BuildPackage,qt4-drivers-mouse-tpmousedriver))
+$(eval $(call BuildPackage,qt4-drivers-mouse-pcmousedriver))
+$(eval $(call BuildPackage,qt4-drivers-mouse-tslibmousedriver))
+
+$(eval $(call BuildPackage,qt4-drivers-gfx-directfb))
+$(eval $(call BuildPackage,qt4-drivers-gfx-linuxfb))
+$(eval $(call BuildPackage,qt4-drivers-gfx-vnc))