move qt4 package from Xorg to Video feed
authorMirko Vogt <mirko@openwrt.org>
Thu, 11 Jun 2015 10:58:15 +0000 (12:58 +0200)
committerMirko Vogt <mirko@openwrt.org>
Thu, 11 Jun 2015 11:05:42 +0000 (13:05 +0200)
There's some minor changes, especially to seperate
an qt4 from an qt5 installation (Host and target).
Also the x11 support got dropped - framebuffer only.
Some obvious and trivial bug fixes got applied as well,
however, apart from that, it basically is, what it was.

The Xorg feed is totally unmaintained currently,
also the early approach of running an Xserver on
embedded devices - hence the feed's name - thankfully
didn't really become the standard either.

So let's reorganise some of the stuff from the Xorg
feed worth keeping within the new Video feed.

frameworks/qt4/Makefile [new file with mode: 0644]
frameworks/qt4/files/qmake.conf [new file with mode: 0644]
frameworks/qt4/files/qmake.mk [new file with mode: 0644]
frameworks/qt4/files/qplatformdefs.h [new file with mode: 0644]
frameworks/qt4/patches/100-do_not_use_res.defdname.patch [new file with mode: 0644]
frameworks/qt4/patches/200-depend-on-decoration.patch [new file with mode: 0644]
frameworks/qt4/patches/300-compile-fixes.patch [new file with mode: 0644]

diff --git a/frameworks/qt4/Makefile b/frameworks/qt4/Makefile
new file mode 100644 (file)
index 0000000..96a7f39
--- /dev/null
@@ -0,0 +1,816 @@
+#
+# Copyright (C) 2008-2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# TODO:
+#  - 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.8.1
+PKG_RELEASE:=1
+PKG_MD5SUM:=7960ba8e18ca31f0c6e4895a312f92ff
+
+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-pgsql \
+       CONFIG_PACKAGE_qt4-webkit \
+       CONFIG_PACKAGE_qt4-script \
+       CONFIG_PACKAGE_qt4-scriptools \
+       CONFIG_PACKAGE_qt4-openssl \
+       CONFIG_PACKAGE_qt4-xmlpatterns \
+       CONFIG_PACKAGE_qt4-tslibmousedriver \
+       CONFIG_PACKAGE_qt4-declarative \
+       CONFIG_PACKAGE_qt4-drivers-gfx-vnc \
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+-include $(if $(DUMP),,./files/qmake.mk)
+
+define Package/qt4/Default
+  SECTION:=video-frameworks
+  CATEGORY:=Video
+  SUBMENU:=Frameworks and Toolkits
+  TITLE:=qt4
+  DEPENDS:=qt4
+  URL:=http://qt.nokia.com/
+  MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
+endef
+
+define Package/qt4
+  $(call Package/qt4/Default)
+  DEPENDS:=+zlib +librt +libstdcpp
+  MENU:=1
+endef
+
+define Package/qt4-gui
+  $(call Package/qt4/Default)
+  DEFAULT:=
+  DEPENDS+=+PACKAGE_qt4-gui:libpng +PACKAGE_qt4-gui:libtiff +PACKAGE_qt4-gui:libjpeg +PACKAGE_qt4-gui:libfreetype +qt4-network \
+       +FEATURE_drawing-backend_libX11:libX11 \
+       +FEATURE_drawing-backend_libX11:libXext @DISPLAY_SUPPORT
+  TITLE+=(gui)
+endef
+
+define Package/qt4-demos
+  $(call Package/qt4/Default)
+  TITLE+=(demos)
+  DEPENDS+=+qt4-gui
+endef
+
+define Package/qt4-examples
+  $(call Package/qt4/Default)
+  TITLE+=(examples)
+  DEPENDS+=+qt4-gui +qt4-svg +qt4-sqlite +qt4-xml
+endef
+
+define Package/qt4-network
+  $(call Package/qt4/Default)
+  TITLE+=(network)
+endef
+
+define Package/qt4-sqlite
+  $(call Package/qt4/Default)
+  TITLE+=(sqlite)
+  DEPENDS+=+PACKAGE_qt4-sqlite:libsqlite3
+endef
+
+define Package/qt4-mysql
+  $(call Package/qt4/Default)
+  TITLE+=(mysql)
+  DEPENDS+=+PACKAGE_qt4-mysql:libmysqlclient
+endef
+
+define Package/qt4-pgsql
+  $(call Package/qt4/Default)
+  TITLE+=(pgsql)
+  DEPENDS+=+PACKAGE_qt4-pgsql:libpq
+endef
+
+define Package/qt4-openssl
+  $(call Package/qt4/Default)
+  TITLE+=(openssl)
+  DEPENDS+=+PACKAGE_qt4-openssl:libopenssl
+endef
+
+#define Package/qt4-multimedia
+#  $(call Package/qt4/Default)
+#  TITLE+=(multimedia)
+#endef
+
+#define Package/qt4-audio-backend
+#  $(call Package/qt4/Default)
+#  TITLE+=(audio-backend)
+#endef
+
+define Package/qt4-phonon
+  $(call Package/qt4/Default)
+  TITLE+=(phonon)
+  DEPENDS+=+qt4-gui +qt4-xml +qt4-dbus +qt4-network
+endef
+
+#define Package/qt4-phonon-backend
+#  $(call Package/qt4/Default)
+#  TITLE+=(phonon-backend)
+#endef
+
+define Package/qt4-svg
+  $(call Package/qt4/Default)
+  TITLE+=(svg)
+  DEPENDS+=+qt4-gui +qt4-network
+endef
+
+define Package/qt4-webkit
+  $(call Package/qt4/Default)
+  TITLE+=(webkit)
+  DEPENDS+=+PACKAGE_qt4-webkit:libsqlite3 +qt4-phonon +qt4-dbus +qt4-xml +qt4-gui +qt4-network
+endef
+
+define Package/qt4-script
+  $(call Package/qt4/Default)
+  TITLE+=(script)
+endef
+
+define Package/qt4-scripttools
+  $(call Package/qt4/Default)
+  TITLE+=(scripttools)
+  DEPENDS+=+qt4-script +qt4-gui +qt4-network
+endef
+
+#define Package/qt4-accessibility
+#  $(call Package/qt4/Default)
+#  TITLE+=(accessibility)
+#endef
+
+#define Package/qt4-javascript-jit
+#  $(call Package/qt4/Default)
+#  TITLE+=(javascript-jit)
+#endef
+
+#define Package/qt4-cups
+#  $(call Package/qt4/Default)
+#  TITLE+=(cups)
+#endef
+
+define Package/qt4-dbus
+$(call Package/qt4/Default)
+TITLE+=(dbus)
+DEPENDS+=+PACKAGE_qt4-dbus:libdbus +qt4-xml
+endef
+
+#define Package/qt4-gtkstyle
+#  $(call Package/qt4/Default)
+#  TITLE+=(gtkstyle)
+#endef
+
+#define Package/qt4-glib
+#  $(call Package/qt4/Default)
+#  TITLE+=(glib)
+#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
+
+define Package/qt4-xml
+  $(call Package/qt4/Default)
+  TITLE+=(xml)
+endef
+
+define Package/qt4-xmlpatterns
+  $(call Package/qt4/Default)
+  TITLE+=(xmlpatterns)
+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+=+PACKAGE_qt4-tslibmousedriver: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 +qt4-drivers-gfx-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 -I$(STAGING_DIR)/usr/include/directfb
+TARGET_CFLAGS+=-fpermissive
+
+define Build/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/linux-openwrt-g++
+       $(CP) ./files/qmake.conf $(PKG_BUILD_DIR)/mkspecs/linux-openwrt-g++/qmake.conf
+       $(CP) ./files/qplatformdefs.h $(PKG_BUILD_DIR)/mkspecs/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)" \
+               CFLAGS= \
+               CXXFLAGS= \
+               LDFLAGS= \
+               STAGING_DIR="$(STAGING_DIR)" \
+               STAGING_DIR_HOST="$(STAGING_DIR)/../host" \
+               ./configure \
+                       -arch $(ARCH) \
+                       -prefix $(CONFIGURE_PREFIX) \
+                       -bindir $(CONFIGURE_PREFIX)/bin \
+                       -libdir $(CONFIGURE_PREFIX)/lib \
+                       -datadir $(CONFIGURE_PREFIX)/share/Qt \
+                       -plugindir $(CONFIGURE_PREFIX)/lib/Qt/plugins \
+                       -demosdir $(CONFIGURE_PREFIX)/share/Qt/demos \
+                       -examplesdir $(CONFIGURE_PREFIX)/share/Qt/examples \
+                       -sysconfdir /etc/Qt \
+                       -no-rpath \
+                       -force-pkg-config \
+                       -continue \
+                       -nomake tools \
+                       $(if $(CONFIG_PACKAGE_qt4-demos),-make,-nomake) demos \
+                       $(if $(CONFIG_PACKAGE_qt4-examples),-make,-nomake) examples \
+                       -nomake docs \
+                       -nomake translations \
+                       -xplatform linux-openwrt-g++ \
+                       -platform linux-g++ \
+                       $(if $(CONFIG_QT4_WS_X11),-x11,-embedded) \
+                       -release \
+                       -confirm-license \
+                       -opensource \
+                       -stl \
+                       $(if $(CONFIG_PACKAGE_qt4-xmlpatterns),-xmlpatterns,-no-xmlpatterns) \
+                       -no-fast \
+                       -no-largefile \
+                       -exceptions \
+                       -no-mmx \
+                       -no-3dnow \
+                       -no-sse \
+                       -no-sse2 \
+                       -no-sse3 \
+                       -no-ssse3 \
+                       -no-sse4.1 \
+                       -no-sse4.2 \
+                       -no-avx \
+                       -no-neon \
+                       -no-armfpa \
+                       -system-zlib \
+                       -system-libtiff \
+                       -system-libpng \
+                       -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-pgsql),-plugin-sql-psql) \
+                       -no-decoration-styled \
+                       -no-decoration-windows \
+                       -no-decoration-default \
+                       -verbose \
+                       -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 \
+                       -no-cups \
+                       -iconv \
+                       $(if $(CONFIG_PACKAGE_qt4-dbus),-dbus,-no-dbus) \
+                       -no-gtkstyle \
+                       -no-nas-sound \
+                       -no-opengl \
+                       -no-openvg \
+                       -no-sm \
+                       -no-xshape \
+                       $(if $(CONFIG_QT4_WS_X11),-no-xsync,-xsync) \
+                       -no-xinerama \
+                       $(if $(CONFIG_QT4_WS_X11),-no-xcursor,-xcursor) \
+                       -no-xfixes \
+                       -no-xrandr \
+                       -no-xrender \
+                       -no-mitshm \
+                       $(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_FEATURE_drawing-backend_DirectFB),$(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 \
+                       $(if $(CONFIG_PACKAGE_qt4-tslibmousedriver),-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-qt4 \
+               $(1)/usr/lib/pkgconfig \
+               $(1)/usr/lib \
+               $(1)/usr/include \
+               $(1)/usr/lib/Qt/plugins
+
+       $(CP) \
+               ./files/qmake.mk \
+               $(1)/mk/qmake4.mk
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/share/Qt/mkspecs/* \
+               $(1)/usr/share/mkspecs-qt4/
+
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
+               $(1)/usr/lib/pkgconfig/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/include/* \
+               $(1)/usr/include/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/*.so* \
+               $(1)/usr/lib/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/* \
+       #       $(1)/usr/lib/Qt/plugins/
+endef
+
+define Package/qt4/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib \
+               $(1)/usr/lib/Qt/plugins
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtCore.so* \
+               $(1)/usr/lib/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/codecs/*.so \
+       #       $(1)/usr/lib/Qt/plugins/codecs/
+endef
+
+define Package/qt4-gui/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib \
+               $(1)/usr/lib/Qt/plugins
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtGui.so* \
+               $(1)/usr/lib/
+
+       #HACK: Qt4 requires having truetype fonts stored in /usr/lib/fonts - no subdirectories allowed, so use the dejavue set by default
+       ln -s \
+               /usr/share/fonts/ttf-dejavu \
+               $(1)/usr/lib/fonts
+
+       # we use the dejavue font package instead
+       #$(INSTALL_DATA) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/fonts/*.ttf \
+       #       $(1)/usr/lib/fonts/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
+       #       $(1)/usr/lib/Qt/plugins/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
+       #       $(1)/usr/lib/Qt/plugins/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/inputmethods \
+       #       $(1)/usr/lib/Qt/plugins/
+endef
+
+define Package/qt4-demos/install
+       $(INSTALL_DIR) \
+               $(1)/usr/share/Qt
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/share/Qt/demos \
+               $(1)/usr/share/Qt/
+
+       $(FIND) \
+               $(1) \
+               -name "*.cpp" -o \
+               -name "*.h" -o \
+               -name "*.pro" \
+               | $(XARGS) rm
+endef
+
+define Package/qt4-examples/install
+       $(INSTALL_DIR) \
+               $(1)/usr/share/Qt
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/share/Qt/examples \
+               $(1)/usr/share/Qt/
+
+       $(FIND) \
+               $(1) \
+               -name "*.cpp" -o \
+               -name "*.h" -o \
+               -name "*.pro" \
+               | $(XARGS) rm
+endef
+
+define Package/qt4-network/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtNetwork.so* \
+               $(1)/usr/lib/
+endef
+
+define Package/qt4-sqlite/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/sqldrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtSql.so* \
+               $(1)/usr/lib/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/sqldrivers/libqsqlite.so \
+               $(1)/usr/lib/Qt/plugins/sqldrivers/
+endef
+
+define Package/qt4-mysql/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/sqldrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtSql.so* \
+               $(1)/usr/lib/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/sqldrivers/libqsqlmysql.so \
+               $(1)/usr/lib/Qt/plugins/sqldrivers/
+endef
+
+define Package/qt4-pgsql/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib/Qt/plugins/sqldrivers
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtSql.so* \
+               $(1)/usr/lib/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/sqldrivers/libqsqlpsql.so \
+               $(1)/usr/lib/Qt/plugins/sqldrivers/
+endef
+
+#define Package/qt4-multimedia/install
+#      $(INSTALL_DIR) \
+#              $(1)/usr/bin
+#
+#      $(CP) \
+#              $(PKG_INSTALL_DIR)/usr/bin/examples/* \
+#              $(1)/usr/bin/
+#endef
+
+define Package/qt4-phonon/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libphonon.so* \
+               $(1)/usr/lib/
+endef
+
+define Package/qt4-svg/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib \
+               $(1)/usr/lib/Qt/plugins
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtSvg.so* \
+               $(1)/usr/lib/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/iconengines \
+       #       $(1)/usr/lib/Qt/plugins/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/imageformats \
+       #       $(1)/usr/lib/Qt/plugins/
+endef
+
+define Package/qt4-webkit/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib \
+               $(1)/usr/lib/Qt/plugins
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtWebKit.so* \
+               $(1)/usr/lib/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/designer \
+       #       $(1)/usr/lib/Qt/plugins/
+endef
+
+define Package/qt4-script/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib \
+               $(1)/usr/lib/Qt/plugins
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtScript.so* \
+               $(1)/usr/lib/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/script \
+       #       $(1)/usr/lib/Qt/plugins/
+endef
+
+define Package/qt4-scripttools/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtScriptTools.so* \
+               $(1)/usr/lib/
+endef
+
+define Package/qt4-dbus/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtDBus.so* \
+               $(1)/usr/lib/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/bin/qdbus \
+       #       $(1)/usr/bin/
+endef
+
+define Package/qt4-qt3-support/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib \
+               $(1)/usr/lib/Qt/plugins
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQt3Support.so* \
+               $(1)/usr/lib/
+
+       #$(CP) \
+       #       $(PKG_INSTALL_DIR)/usr/lib/Qt/plugins/accessible \
+       #       $(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
+
+define Package/qt4-xmlpatterns/install
+       $(INSTALL_DIR) \
+               $(1)/usr/lib
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libQtXmlPatterns.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))
+$(eval $(call BuildPackage,qt4-examples))
+$(eval $(call BuildPackage,qt4-network))
+$(eval $(call BuildPackage,qt4-sqlite))
+$(eval $(call BuildPackage,qt4-mysql))
+$(eval $(call BuildPackage,qt4-pgsql))
+$(eval $(call BuildPackage,qt4-openssl))
+#$(eval $(call BuildPackage,qt4-multimedia))
+#$(eval $(call BuildPackage,qt4-audio-backend))
+$(eval $(call BuildPackage,qt4-phonon))
+#$(eval $(call BuildPackage,qt4-phonon-backend))
+$(eval $(call BuildPackage,qt4-svg))
+$(eval $(call BuildPackage,qt4-webkit))
+$(eval $(call BuildPackage,qt4-script))
+$(eval $(call BuildPackage,qt4-scripttools))
+#$(eval $(call BuildPackage,qt4-accessibility))
+#$(eval $(call BuildPackage,qt4-javascript-jit))
+#$(eval $(call BuildPackage,qt4-cups))
+$(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-xmlpatterns))
+
+$(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))
diff --git a/frameworks/qt4/files/qmake.conf b/frameworks/qt4/files/qmake.conf
new file mode 100644 (file)
index 0000000..d0adbeb
--- /dev/null
@@ -0,0 +1,46 @@
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
+include(../common/linux.conf)
+include(../common/qws.conf)
+
+# QMAKE_{INC,LIB}DIR_QT needs to be overridden,
+# as they're set to $$[QT_INSTALL_{HEADERS,LIBS}] by default
+# which are compiled into the qmake binary statically
+QMAKE_INCDIR_QT                                        = $$(TARGET_INCDIRS)
+QMAKE_LIBDIR_QT                                        = $$(TARGET_LIBDIRS)
+QMAKE_INCDIR                                   = $$(TARGET_INCDIRS)
+QMAKE_LIBDIR                                   = $$(TARGET_LIBDIRS)
+QMAKE_MOC                                              = $$(STAGING_DIR_HOST)/bin/moc
+QMAKE_UIC                                              = $$(STAGING_DIR_HOST)/bin/uic
+QMAKE_RCC                                              = $$(STAGING_DIR_HOST)/bin/rcc
+QMAKE_CC                                               = $$(TARGET_CC)
+QMAKE_CXX                                              = $$(TARGET_CXX)
+QMAKE_AR                                               = $$(TARGET_AR)
+QMAKE_OBJCOPY                                  = $$(TARGET_OBJCOPY)
+QMAKE_RANLIB                                   = $$(TARGET_RANLIB)
+QMAKE_CFLAGS                                   = $$(TARGET_CFLAGS)
+QMAKE_CXXFLAGS                                 = $$(TARGET_CFLAGS)
+QMAKE_LINK                                             = $$(TARGET_CXX)
+QMAKE_LINK_C                                   = $$(TARGET_CC)
+QMAKE_LIBS                                             = $$(TARGET_LIBS)
+QMAKE_LFLAGS                                   = $$(TARGET_LDFLAGS) # this will end up in redundant "-L"-strings, as they're already in $QMAKE_LIBDIR_QT, however TARGET_LDFLAGS may contain not only directories but special linker options
+
+#unset vars which would intefere with vars/flags passed over by OpenWrt
+QMAKE_STRIP                                            = # do not strip
+QMAKE_STRIPFLAGS_LIB                   = # do not strip
+QMAKE_CFLAGS_WARN_ON                   = 
+QMAKE_CFLAGS_WARN_OFF                  = 
+QMAKE_CFLAGS_RELEASE                   = 
+QMAKE_CFLAGS_DEBUG                             = 
+QMAKE_CFLAGS_PRECOMPILE                        = 
+QMAKE_CFLAGS_USE_PRECOMPILE            = 
+QMAKE_CXXFLAGS_WARN_ON                 = 
+QMAKE_CXXFLAGS_WARN_OFF                        = 
+QMAKE_CXXFLAGS_RELEASE                 = 
+QMAKE_CXXFLAGS_DEBUG                   = 
+QMAKE_CXXFLAGS_PRECOMPILE              = 
+QMAKE_CXXFLAGS_USE_PRECOMPILE  = 
+QMAKE_LFLAGS_RELEASE                   = 
+QMAKE_LFLAGS_NOUNDEF                   = 
+
+load(qt_config)
diff --git a/frameworks/qt4/files/qmake.mk b/frameworks/qt4/files/qmake.mk
new file mode 100644 (file)
index 0000000..5630ef1
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+QMAKE_SPECFILE:=$(STAGING_DIR)/usr/share/mkspecs-qt4/linux-openwrt-g++
+
+TARGET_INCDIRS +=\
+       $(TOOLCHAIN_DIR)/include \
+       $(STAGING_DIR)/include \
+       $(TOOLCHAIN_DIR)/usr/include \
+       $(STAGING_DIR)/usr/include
+
+TARGET_LIBDIRS += \
+       $(TOOLCHAIN_DIR)/lib \
+       $(STAGING_DIR)/lib \
+       $(TOOLCHAIN_DIR)/usr/lib \
+       $(STAGING_DIR)/usr/lib 
+
+define Build/Configure/Qmake
+       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)" \
+       TARGET_LIBS="$(TARGET_LIBS)" \
+       STAGING_DIR_HOST="$(STAGING_DIR)/../host" \
+       STAGING_DIR="$(STAGING_DIR)" \
+       qmake \
+               -spec $(QMAKE_SPECFILE) \
+               -o $(PKG_BUILD_DIR)/$(2)/Makefile \
+               $(PKG_BUILD_DIR)/$(2)/$(1).pro
+endef
+
+# we need to pass everything to $(MAKE) as well, as Makefiles may invoke qmake once again for creating further Makefiles
+define Build/Compile/Default
+       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)" \
+       TARGET_LIBS="$(TARGET_LIBS)" \
+       STAGING_DIR_HOST="$(STAGING_DIR)/../host" \
+       STAGING_DIR="$(STAGING_DIR)" \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
+               $(1);
+endef
diff --git a/frameworks/qt4/files/qplatformdefs.h b/frameworks/qt4/files/qplatformdefs.h
new file mode 100644 (file)
index 0000000..5d22fb4
--- /dev/null
@@ -0,0 +1 @@
+#include "../linux-g++/qplatformdefs.h"
diff --git a/frameworks/qt4/patches/100-do_not_use_res.defdname.patch b/frameworks/qt4/patches/100-do_not_use_res.defdname.patch
new file mode 100644 (file)
index 0000000..0b2d0ef
--- /dev/null
@@ -0,0 +1,35 @@
+--- qt-everywhere-opensource-src-4.7.0-beta1/src/network/kernel/qhostinfo_unix.cpp     2010-05-04 02:43:25.000000000 +0200
++++ qt-everywhere-opensource-src-4.7.0-beta1/src/network/kernel/qhostinfo_unix.cpp.new 2010-06-20 14:43:48.565315801 +0200
+@@ -326,7 +326,7 @@
+ QString QHostInfo::localDomainName()
+ {
+-#if !defined(Q_OS_VXWORKS)
++#if 0
+     resolveLibrary();
+     if (local_res_ninit) {
+         // using thread-safe version
+--- qt-everywhere-opensource-src-4.7.0-beta1/src/qt3support/network/q3dns.cpp  2010-05-04 02:43:25.000000000 +0200
++++ qt-everywhere-opensource-src-4.7.0-beta1/src/qt3support/network/q3dns.cpp.new      2010-06-20 14:43:48.565315801 +0200
+@@ -2499,8 +2499,8 @@
+               break;
+       }
+ #  endif
+-      if ( *res.defdname )
+-          theDomains->append( QString::fromLatin1( res.defdname ).lower().local8Bit() );
++//    if ( *res.defdname )
++//        theDomains->append( QString::fromLatin1( res.defdname ).lower().local8Bit() );
+ #else
+       res_init();
+       int i;
+@@ -2515,8 +2515,8 @@
+               break;
+       }
+ #  endif
+-      if ( *_res.defdname )
+-          theDomains->append( QString::fromLatin1( _res.defdname ).lower().local8Bit() );
++//    if ( *_res.defdname )
++//        theDomains->append( QString::fromLatin1( _res.defdname ).lower().local8Bit() );
+ #endif
+       // the code above adds "0.0.0.0" as a name server at the slightest
diff --git a/frameworks/qt4/patches/200-depend-on-decoration.patch b/frameworks/qt4/patches/200-depend-on-decoration.patch
new file mode 100644 (file)
index 0000000..8e37ca8
--- /dev/null
@@ -0,0 +1,15 @@
+--- qt/examples/qws/qws.pro    2010-02-11 16:55:17.000000000 +0100
++++ qt/examples/qws/qws.pro.mod        2010-03-22 10:56:10.372868670 +0100
+@@ -1,7 +1,11 @@
+ TEMPLATE      = subdirs
+ # no /dev/fbX
+ !qnx:!vxworks:SUBDIRS = framebuffer
+-SUBDIRS      += mousecalibration simpledecoration
++SUBDIRS      += mousecalibration
++
++!isEmpty( decorations ) {
++      SUBDIRS += simpledecoration
++}
+ # install
+ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro
diff --git a/frameworks/qt4/patches/300-compile-fixes.patch b/frameworks/qt4/patches/300-compile-fixes.patch
new file mode 100644 (file)
index 0000000..4282709
--- /dev/null
@@ -0,0 +1,14 @@
+---
+ src/corelib/animation/qvariantanimation.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- qt-everywhere-opensource-src-4.7.0-beta2.orig/src/corelib/animation/qvariantanimation.h
++++ qt-everywhere-opensource-src-4.7.0-beta2/src/corelib/animation/qvariantanimation.h
+@@ -117,6 +117,7 @@ private:
+ };
+ template <typename T>
++static inline __attribute__((__always_inline__))
+ void qRegisterAnimationInterpolator(QVariant (*func)(const T &from, const T &to, qreal progress)) {
+     QVariantAnimation::registerInterpolator(reinterpret_cast<QVariantAnimation::Interpolator>(func), qMetaTypeId<T>());
+ }