summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxantares2015-06-08 23:04:10 +0200
committerxantares2015-06-08 23:04:10 +0200
commit90d23535e12dc8da1e42af4392abc87f1a579c9c (patch)
tree75623d214751ca5ba387a9dc2e912417f39160f2
downloadaur-90d23535e12dc8da1e42af4392abc87f1a579c9c.tar.gz
Initial import
-rw-r--r--.SRCINFO59
-rw-r--r--PKGBUILD360
-rw-r--r--mingw32-qt-4.8.0-no-webkit-tests.patch13
-rw-r--r--qmake.conf.win32114
-rw-r--r--qmake.conf.win64114
-rw-r--r--qplatformdefs.h160
-rw-r--r--qt-4.8.0-build-qtuitools-dynamically.patch32
-rw-r--r--qt-4.8.0-fix-include-windows-h.patch13
-rw-r--r--qt-4.8.1-fix-activeqt-compilation.patch75
-rw-r--r--qt-dont-perform-ipc-checks-for-win32.patch11
-rw-r--r--qt-dont-set-qt-dll-define-for-static-builds.patch12
-rw-r--r--qt-fix-javascript-jit-on-mingw-x86_64.patch22
-rw-r--r--qt-merge-static-and-shared-library-trees.patch51
-rw-r--r--qt4-fix-linking-against-static-dbus.patch26
14 files changed, 1062 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c78552fb7b5f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,59 @@
+pkgbase = mingw-w64-qt4
+ pkgdesc = A cross-platform application and UI framework (mingw-w64)
+ pkgver = 4.8.7
+ pkgrel = 1
+ url = http://qt-project.org/
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ license = LGPL
+ makedepends = mingw-w64-gcc
+ makedepends = mingw-w64-mariadb-connector-c
+ makedepends = mingw-w64-postgresql-libs
+ makedepends = mingw-w64-pkg-config
+ depends = mingw-w64-crt
+ depends = mingw-w64-zlib
+ depends = mingw-w64-libjpeg-turbo
+ depends = mingw-w64-libiconv
+ depends = mingw-w64-libtiff
+ depends = mingw-w64-sqlite
+ depends = mingw-w64-libpng
+ depends = mingw-w64-openssl
+ depends = mingw-w64-libdbus
+ optdepends = mingw-w64-postgresql-libs: PostgreSQL driver
+ optdepends = mingw-w64-mariadb-connector-c: MariaDB driver
+ conflicts = mingw-w64-qt
+ replaces = mingw-w64-qt<=4.8.5
+ options = !strip
+ options = !buildflags
+ options = !libtool
+ options = staticlibs
+ source = http://download.qt-project.org/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
+ source = qmake.conf.win32
+ source = qmake.conf.win64
+ source = qplatformdefs.h
+ source = qt-merge-static-and-shared-library-trees.patch
+ source = mingw32-qt-4.8.0-no-webkit-tests.patch
+ source = qt-dont-perform-ipc-checks-for-win32.patch
+ source = qt-4.8.0-fix-include-windows-h.patch
+ source = qt-4.8.0-build-qtuitools-dynamically.patch
+ source = qt-fix-javascript-jit-on-mingw-x86_64.patch
+ source = qt-4.8.1-fix-activeqt-compilation.patch
+ source = qt-dont-set-qt-dll-define-for-static-builds.patch
+ source = qt4-fix-linking-against-static-dbus.patch
+ md5sums = d990ee66bf7ab0c785589776f35ba6ad
+ md5sums = 3759f73b9c872ce692b7067daef134a9
+ md5sums = db6257762e051f2b7b18745dca2df43d
+ md5sums = 2cba45b6c52c20aa51265d61c1dd9856
+ md5sums = 6faad05e8897d3d88cc5b0f5205b2bdc
+ md5sums = 91d01b6d31887f78c7933c04544c5758
+ md5sums = 28660113fcb05f62ace400187eb8580a
+ md5sums = 63dc5a13265ed82b2ba3abd0aa7a59f7
+ md5sums = 7f8e12ad3b140e773c7a1f76cdd800f2
+ md5sums = 3fe6e419c1f21c59062db1f562c1f9bf
+ md5sums = 22fc6f20aa6af060c640fc3b9af888a9
+ md5sums = b6d9bcdd1df5115e7063d08bf75c2fd1
+ md5sums = 84a802e6619be4f43b2a9be0ec1a11ef
+
+pkgname = mingw-w64-qt4
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6bf8b7c142ba
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,360 @@
+# Contributor: Miguel Rasero <skuda21@gmail.com>
+# Contributor: Philip A Reimer <antreimer@gmail.com>
+# Contributor: Filip Brcic <brcha@gna.org>
+
+pkgname=mingw-w64-qt4
+pkgver=4.8.7
+pkgrel=1
+pkgdesc='A cross-platform application and UI framework (mingw-w64)'
+arch=('i686' 'x86_64')
+url="http://qt-project.org/"
+license=('GPL3' 'LGPL')
+depends=(
+ 'mingw-w64-crt'
+ 'mingw-w64-zlib'
+ 'mingw-w64-libjpeg-turbo'
+ 'mingw-w64-libiconv'
+ 'mingw-w64-libtiff'
+ 'mingw-w64-sqlite'
+ 'mingw-w64-libpng'
+ 'mingw-w64-openssl'
+ 'mingw-w64-libdbus')
+makedepends=('mingw-w64-gcc' 'mingw-w64-mariadb-connector-c' 'mingw-w64-postgresql-libs' 'mingw-w64-pkg-config')
+optdepends=('mingw-w64-postgresql-libs: PostgreSQL driver'
+ 'mingw-w64-mariadb-connector-c: MariaDB driver')
+options=(!strip !buildflags !libtool staticlibs)
+replaces=("${pkgname/qt4/qt}<=4.8.5")
+conflicts=("${pkgname/qt4/qt}")
+_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
+source=("http://download.qt-project.org/official_releases/qt/4.8/${pkgver}/${_pkgfqn}.tar.gz"
+ 'qmake.conf.win32'
+ 'qmake.conf.win64'
+ 'qplatformdefs.h'
+ 'qt-merge-static-and-shared-library-trees.patch'
+ 'mingw32-qt-4.8.0-no-webkit-tests.patch'
+ 'qt-dont-perform-ipc-checks-for-win32.patch'
+ 'qt-4.8.0-fix-include-windows-h.patch'
+ 'qt-4.8.0-build-qtuitools-dynamically.patch'
+ 'qt-fix-javascript-jit-on-mingw-x86_64.patch'
+ 'qt-4.8.1-fix-activeqt-compilation.patch'
+ 'qt-dont-set-qt-dll-define-for-static-builds.patch'
+ 'qt4-fix-linking-against-static-dbus.patch')
+md5sums=('d990ee66bf7ab0c785589776f35ba6ad'
+ '3759f73b9c872ce692b7067daef134a9'
+ 'db6257762e051f2b7b18745dca2df43d'
+ '2cba45b6c52c20aa51265d61c1dd9856'
+ '6faad05e8897d3d88cc5b0f5205b2bdc'
+ '91d01b6d31887f78c7933c04544c5758'
+ '28660113fcb05f62ace400187eb8580a'
+ '63dc5a13265ed82b2ba3abd0aa7a59f7'
+ '7f8e12ad3b140e773c7a1f76cdd800f2'
+ '3fe6e419c1f21c59062db1f562c1f9bf'
+ '22fc6f20aa6af060c640fc3b9af888a9'
+ 'b6d9bcdd1df5115e7063d08bf75c2fd1'
+ '84a802e6619be4f43b2a9be0ec1a11ef')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+# Helper functions for the split builds
+isRelease() {
+ [ $pkgname = "mingw-w64-qt4" ]
+}
+isDebug() {
+ [ $pkgname = "mingw-w64-qt4-debug" ]
+}
+isStatic() {
+ [ $pkgname = "mingw-w64-qt4-static" ]
+}
+isShared() {
+ ! isStatic
+}
+
+isDebug && depends+=('mingw-w64-qt4')
+isStatic && depends+=('mingw-w64-qt4') && makedepends+=('mingw-w64-qt4-dummy')
+
+prepare() {
+ cd "${srcdir}"/"${_pkgfqn}"
+
+ # When building Qt as static library some files have a different content
+ # when compared to the static library. Merge those changes manually.
+ # This patch also applies some additional changes which are required to make
+ # linking against the static version of Qt work without any manual fiddling
+ patch -Np1 -i "${srcdir}"/qt-merge-static-and-shared-library-trees.patch
+
+ # When linking against the static dbus library, the #define DBUS_EXPORT must be set
+ patch -Np1 -i "${srcdir}"/qt4-fix-linking-against-static-dbus.patch
+
+ # Disable WebKit tests that are failing (as of Qt 4.8.0 rc1) with
+ # out of source builds.
+ patch -Np1 -i "${srcdir}"/mingw32-qt-4.8.0-no-webkit-tests.patch
+
+ # The configure script thinks that there is no IPC/shared memory support
+ # for this platform, while there is support. Fix the configure script
+ patch -Np0 -i "${srcdir}"/qt-dont-perform-ipc-checks-for-win32.patch
+
+ # Fix compilation of the designer tool
+ patch -Np1 -i "${srcdir}"/qt-4.8.0-fix-include-windows-h.patch
+
+ # Make sure the QtUiTools are built as a shared library
+ # https://bugreports.qt.nokia.com/browse/QTBUG-20498
+ patch -Np1 -i "${srcdir}"/qt-4.8.0-build-qtuitools-dynamically.patch
+
+ # Javascript-JIT fails to link on mingw x86_64
+ patch -Np1 -i "${srcdir}"/qt-fix-javascript-jit-on-mingw-x86_64.patch
+
+ # As of qt 4.8.1 the qt build system tries to build a activeqt module for
+ # the designer component. However, this fails to compile:
+ # In file included from ../../../../../include/ActiveQt/qaxselect.h:1:0,
+ # from /home/erik/fedora/mingw-qt/qt-everywhere-opensource-src-4.8.1/tools/designer/src/plugins/activeqt/qaxwidgettaskmenu.cpp:55:
+ # ../../../../../include/ActiveQt/../../../qt-everywhere-opensource-src-4.8.1/src/activeqt/container/qaxselect.h:47:26: fatal error: ui_qaxselect.h: No such file or directory
+ # Workaround this for now until a proper fix has been found
+ patch -Np1 -i "${srcdir}"/qt-4.8.1-fix-activeqt-compilation.patch
+
+ # When building static binaries, make sure the gcc argument -DQT_DLL isn't used
+ patch -Np1 -i "${srcdir}"/qt-dont-set-qt-dll-define-for-static-builds.patch
+
+ # Cross-compilation qmake target.
+ mkdir -p mkspecs/win32-g++-cross
+ mkdir -p mkspecs/win32-g++-cross-x64
+ install -m644 "${srcdir}"/qmake.conf.win32 mkspecs/win32-g++-cross/qmake.conf
+ install -m644 "${srcdir}"/qmake.conf.win64 mkspecs/win32-g++-cross-x64/qmake.conf
+ install -m644 "${srcdir}"/qplatformdefs.h mkspecs/win32-g++-cross/
+ install -m644 "${srcdir}"/qplatformdefs.h mkspecs/win32-g++-cross-x64/
+
+ # MySQL lib is -lmysql not mysqlclient, so fix that in config tests
+ sed -e 's|lmysqlclient_r|lmysql|g' -i "${srcdir}/${_pkgfqn}/config.tests/unix/mysql_r/mysql_r.pro"
+ sed -e 's|lmysqlclient|lmysql|g' -i "${srcdir}/${_pkgfqn}/config.tests/unix/mysql/mysql.pro"
+ # fix configure to not fails in case you have system's libmariadbclient installed
+ sed -e "s|mysql_config|mysql_config_doesnt_exists|g" -i "${srcdir}/${_pkgfqn}/configure"
+}
+
+build() {
+ cd "${srcdir}"/"${_pkgfqn}"
+
+ # Setup flags
+ export CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
+ export CXXFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
+ export CPLUS_INCLUDE_PATH="/usr/i686-w64-mingw32/include/mysql"
+ unset LDFLAGS PKG_CONFIG_PATH
+
+ for _arch in ${_architectures}; do
+
+ if [ ${_arch} = 'i686-w64-mingw32' ]; then
+ platform='win32-g++-cross'
+ else
+ platform='win32-g++-cross-x64'
+ fi
+
+ qt_configure_args="\
+ -qt3support \
+ -optimized-qmake \
+ -verbose \
+ -opensource \
+ -exceptions \
+ -fast \
+ -confirm-license \
+ -force-pkg-config \
+ -little-endian \
+ -xmlpatterns \
+ -multimedia \
+ -audio-backend \
+ -webkit \
+ -script \
+ -scripttools \
+ -declarative \
+ -no-phonon \
+ -javascript-jit \
+ -qt-libmng \
+ -system-zlib \
+ -system-libtiff \
+ -system-libpng \
+ -system-libjpeg \
+ -system-sqlite \
+ -iconv \
+ -openssl \
+ -dbus-linked \
+ -make libs \
+ -make tools \
+ -nomake demos \
+ -nomake docs \
+ -nomake examples \
+ -prefix /usr/${_arch} \
+ -plugin-sql-psql \
+ -plugin-sql-mysql \
+ -bindir /usr/${_arch}/bin \
+ -datadir /usr/${_arch}/share/qt4 \
+ -demosdir /usr/${_arch}/share/qt4/demos \
+ -docdir /usr/${_arch}/share/doc/qt4 \
+ -examplesdir /usr/${_arch}/share/qt4/examples \
+ -headerdir /usr/${_arch}/include \
+ -libdir /usr/${_arch}/lib \
+ -plugindir /usr/${_arch}/lib/qt4/plugins \
+ -sysconfdir /usr/${_arch}/etc \
+ -translationdir /usr/${_arch}/share/qt4/translations \
+ -xplatform ${platform}"
+
+ if isStatic; then
+ mkdir -p ../${_arch}-static
+ pushd ../${_arch}-static
+ ../${_pkgfqn}/configure \
+ -release \
+ -static \
+ $qt_configure_args
+ make
+ popd
+ fi
+
+ if isDebug; then
+ mkdir -p ../${_arch}-debug
+ pushd ../${_arch}-debug
+ ../${_pkgfqn}/configure \
+ -debug \
+ -shared \
+ $qt_configure_args
+ make
+ popd
+ fi
+
+ if isRelease; then
+ mkdir -p ../${_arch}
+ pushd ../${_arch}
+ ../${_pkgfqn}/configure \
+ -release \
+ -shared \
+ $qt_configure_args
+ make
+ popd
+ fi
+
+ done
+}
+
+package() {
+ cd "$srcdir"/"${_pkgfqn}"
+
+ for _arch in ${_architectures}; do
+
+ if [ ${_arch} = 'i686-w64-mingw32' ]; then
+ platform='win32-g++-cross'
+ else
+ platform='win32-g++-cross-x64'
+ fi
+
+ if isRelease; then
+ make install -C ../${_arch} INSTALL_ROOT="${pkgdir}"
+ # Also install the lrelease tool
+ make -C ../${_arch}/tools/linguist/lrelease install INSTALL_ROOT="${pkgdir}"
+ # move QtUiTools4.dll from lib/ to bin/
+ mv "${pkgdir}"/usr/${_arch}/lib/QtUiTools4.dll "${pkgdir}"/usr/${_arch}/bin/
+ # add links with version suffix for convenience
+ ln -s libqtmain.a "${pkgdir}"/usr/${_arch}/lib/libqtmain4.a
+
+ # install qmake and other native tools
+ mkdir -p "${pkgdir}"/usr/bin
+ mkdir -p "${pkgdir}"/usr/${_arch}/bin
+
+ install -m0755 ../${_arch}/bin/qmake "${pkgdir}"/usr/${_arch}/bin
+ ln -s ../${_arch}/bin/qmake "${pkgdir}"/usr/bin/${_arch}-qmake
+
+ for tool in lrelease moc rcc uic ; do
+ ln -s ../${_arch}/bin/$tool "${pkgdir}"/usr/bin/${_arch}-$tool
+ done
+
+ # An argument in the mkspecs profile needs to be un-commented in order to be
+ # useful for developers who wish to use the Qt libraries
+ sed -i s@'#QT_LIBINFIX'@'QT_LIBINFIX'@ "${pkgdir}"/usr/${_arch}/share/qt4/mkspecs/${platform}/qmake.conf
+
+ # Remove some duplicate mkspecs data
+ rm -rf "${pkgdir}"/usr/${_arch}/share/qt4/mkspecs/${platform}/default
+ rm -rf "${pkgdir}"/usr/${_arch}/share/qt4/mkspecs/${platform}/${platform}
+
+ # Workaround a bug where building against the debug binaries will always fail:
+ # https://bugreports.qt.nokia.com/browse/QTBUG-14467
+ sed -i s@'$${QT_LIBINFIX}d'@'d$${QT_LIBINFIX}'@ "${pkgdir}"/usr/${_arch}/share/qt4/mkspecs/features/win32/windows.prf
+ sed -i s@'$${QT_LIBINFIX}d'@'d$${QT_LIBINFIX}'@ "${pkgdir}"/usr/${_arch}/share/qt4/mkspecs/features/qt_functions.prf
+ fi
+
+ if isDebug; then
+ make install -C ../${_arch}-debug INSTALL_ROOT="${pkgdir}"
+ # Drop the debug version of the tool qmlplugindumpd.exe
+ rm -f "${pkgdir}"/usr/${_arch}/bin/qmlplugindumpd.exe
+ # add links with version suffix for convenience
+ ln -s libqtmaind.a "${pkgdir}"/usr/${_arch}/lib/libqtmaind4.a
+
+ # Remove debug binaries, includes, data, ...
+ rm -rf "${pkgdir}"/usr/${_arch}/{bin/*.exe,include,share,imports/{Qt/labs/*/qmldir,QtWebKit/qmldir}}
+ # tools are installed in the release build
+ rm -f "${pkgdir}"/usr/${_arch}/bin/{lrelease,moc,qmake,rcc,uic}
+ # qaxwidget plugin is named the same in debug and release versions, so remove it
+ rm -f "${pkgdir}"/usr/${_arch}/lib/qt4/plugins/designer/qaxwidget.dll
+ fi
+
+ if isStatic; then
+ # Install the static libraries in a temporary prefix so we can merge everything together properly
+ make install -C ../${_arch}-static INSTALL_ROOT="${pkgdir}"
+
+ # Drop the qtmain static library from the static tree as
+ # it's already part of the main tree
+ rm -f "${pkgdir}"/usr/${_arch}/lib/libqtmain*
+
+ # Give the real static libraries the correct filename to avoid future conflicts with Qt5
+ for FN in "${pkgdir}"/usr/${_arch}/lib/*.a ; do
+ FN_NEW=$(echo $FN | sed s/'.a$'/'4.a'/)
+ mv $FN $FN_NEW
+ done
+
+ # Delete files already provided by the base package
+ rm -rf "${pkgdir}"/usr/${_arch}/{bin,include,share,lib/pkgconfig}
+ rm -f "${pkgdir}"/usr/${_arch}/imports/Qt/labs/*/qmldir
+ # I'm assuming these prl files aren't needed
+ rm -f "${pkgdir}"/usr/${_arch}/{lib,lib/qt4/plugins/*,imports/Qt/labs/*}/*.prl
+
+ # Move imports to lib/qt4, just like the plugins
+ mv "${pkgdir}"/usr/${_arch}/imports "${pkgdir}"/usr/${_arch}/lib/qt4/
+ fi
+
+ if isShared; then
+
+ # Remove the ActiveQt pieces from the shared build as they aren't build as shared library so
+ # it's good enough to only bundle the static libraries originating from the static build
+ rm -f "${pkgdir}"/usr/${_arch}/lib/libQAx*
+
+ # Rename the .a files to .dll.a as they're actually import libraries and not static libraries
+ for FN in "${pkgdir}"/usr/${_arch}/lib/*.a ; do
+ # Ignore libqtmain*.a
+ echo $FN | grep -q qtmain && continue
+ # Rename the file
+ FN_NEW=$(echo $FN | sed s/'.a$'/'.dll.a'/)
+ mv $FN $FN_NEW
+ done
+
+ # The .dll's are installed in both bindir and libdir
+ # One copy of the .dll's is sufficient
+ rm -f "${pkgdir}"/usr/${_arch}/lib/*.dll
+
+ # Drop all the files which we don't need
+ rm -f "${pkgdir}"/usr/${_arch}/lib/*.prl
+ rm -rf "${pkgdir}"/usr/${_arch}/share/qt4/q3porting.xml
+ rm -rf "${pkgdir}"/usr/${_arch}/share/qt4/phrasebooks/
+
+ # Move imports to lib/qt4, just like the plugins
+ mv "${pkgdir}"/usr/${_arch}/imports "${pkgdir}"/usr/${_arch}/lib/qt4/
+ fi
+
+ # And finaly, strip the binaries
+ if isRelease; then
+ ${_arch}-strip --strip-all "${pkgdir}"/usr/${_arch}/bin/*.exe
+ ${_arch}-strip --strip-debug "${pkgdir}"/usr/${_arch}/lib/*.a
+ ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/lib/qt4/plugins/*/*.dll
+ ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/lib/qt4/imports/Qt/labs/*/*.dll
+ ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/lib/qt4/imports/QtWebKit/*.dll
+ fi
+ if isStatic; then
+ ${_arch}-strip --strip-debug "${pkgdir}"/usr/${_arch}/lib/*.a
+ ${_arch}-strip --strip-debug "${pkgdir}"/usr/${_arch}/lib/qt4/plugins/*/*.a
+ ${_arch}-strip --strip-debug "${pkgdir}"/usr/${_arch}/lib/qt4/imports/Qt/labs/*/*.a
+ fi
+
+ done
+}
diff --git a/mingw32-qt-4.8.0-no-webkit-tests.patch b/mingw32-qt-4.8.0-no-webkit-tests.patch
new file mode 100644
index 000000000000..3913cdc6abf4
--- /dev/null
+++ b/mingw32-qt-4.8.0-no-webkit-tests.patch
@@ -0,0 +1,13 @@
+diff --git a/src/3rdparty/webkit/Source/WebKit.pro b/src/3rdparty/webkit/Source/WebKit.pro
+index 9be0f4a..6744f58 100644
+--- a/src/3rdparty/webkit/Source/WebKit.pro
++++ b/src/3rdparty/webkit/Source/WebKit.pro
+@@ -22,7 +22,7 @@ contains(QT_CONFIG, declarative) {
+ exists($$PWD/WebKit/qt/declarative): SUBDIRS += WebKit/qt/declarative
+ }
+
+-exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests
++#exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests
+
+ build-qtscript {
+ SUBDIRS += \
diff --git a/qmake.conf.win32 b/qmake.conf.win32
new file mode 100644
index 000000000000..03396a83e00a
--- /dev/null
+++ b/qmake.conf.win32
@@ -0,0 +1,114 @@
+#
+# qmake configuration for fedora-win32-cross
+# (Fedora Windows cross-compiler)
+# by Richard W.M. Jones (rjones@redhat.com)
+#
+# Written for MinGW
+#
+
+MAKEFILE_GENERATOR = MINGW
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header
+QT += core gui
+DEFINES += UNICODE QT_LARGEFILE_SUPPORT
+QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
+
+QMAKE_EXT_OBJ = .o
+QMAKE_EXT_RES = _res.o
+
+QMAKE_CC = i686-w64-mingw32-gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = byacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 --param=ssp-buffer-size=4 -fno-keep-inline-dllexport
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+QMAKE_CXX = i686-w64-mingw32-g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_RTTI_ON = -frtti
+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
+
+QMAKE_INCDIR =
+#QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_INCDIR_QT = /usr/i686-w64-mingw32/include
+#QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_LIBDIR_QT = /usr/i686-w64-mingw32/lib
+
+QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+QMAKE_LINK = i686-w64-mingw32-g++
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
+QMAKE_LFLAGS_EXCEPTIONS_OFF =
+QMAKE_LFLAGS_RELEASE = -g
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
+QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
+QMAKE_LFLAGS_DLL = -shared
+QMAKE_LINK_OBJECT_MAX = 10
+QMAKE_LINK_OBJECT_SCRIPT= object_script
+QMAKE_PREFIX_STATICLIB = lib
+QMAKE_EXTENSION_STATICLIB = a
+
+
+QMAKE_LIBS =
+QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -ltiff -lpng
+QMAKE_LIBS_NETWORK = -lws2_32
+QMAKE_LIBS_OPENGL = -lopengl32 -lglu32 -lgdi32 -luser32
+QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
+QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
+
+QMAKE_DIR_SEP = /
+QMAKE_STREAM_EDITOR = sed
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $(COPY)
+QMAKE_COPY_DIR = $(COPY) -a
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_INSTALL_FILE = install -m 644 -p
+QMAKE_INSTALL_PROGRAM = install -m 755 -p
+
+# "qmake -win32" always appears to generate code like this:
+# $(CHK_DIR_EXISTS) somedir $(MKDIR) somedir
+# We can't write a Unix macro that is compatible, so we have to hack it:
+QMAKE_CHK_DIR_EXISTS = mkdir -p
+QMAKE_MKDIR =
+
+PKG_CONFIG = i686-w64-mingw32-pkg-config
+QMAKE_LRELEASE = i686-w64-mingw32-lrelease
+QMAKE_MOC = i686-w64-mingw32-moc
+QMAKE_UIC = i686-w64-mingw32-uic
+QMAKE_RCC = i686-w64-mingw32-rcc
+
+QMAKE_IDL = midl
+QMAKE_LIB = i686-w64-mingw32-ar -ru
+QMAKE_RC = i686-w64-mingw32-windres
+QMAKE_DLLTOOL = i686-w64-mingw32-dlltool
+QMAKE_ZIP = zip -r -9
+
+QMAKE_STRIP = i686-w64-mingw32-strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+
+load(qt_config)
+
+#QT_LIBINFIX = 4
diff --git a/qmake.conf.win64 b/qmake.conf.win64
new file mode 100644
index 000000000000..c91f5f120a35
--- /dev/null
+++ b/qmake.conf.win64
@@ -0,0 +1,114 @@
+#
+# qmake configuration for fedora-win32-cross-x64
+# (Fedora Windows cross-compiler)
+# by Richard W.M. Jones (rjones@redhat.com) and Erik van Pienbroek <epienbro@fedoraproject.org>
+#
+# Written for MinGW
+#
+
+MAKEFILE_GENERATOR = MINGW
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header
+QT += core gui
+DEFINES += UNICODE QT_LARGEFILE_SUPPORT
+QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
+
+QMAKE_EXT_OBJ = .o
+QMAKE_EXT_RES = _res.o
+
+QMAKE_CC = x86_64-w64-mingw32-gcc
+QMAKE_LEX = flex
+QMAKE_LEXFLAGS =
+QMAKE_YACC = byacc
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 --param=ssp-buffer-size=4 -fno-keep-inline-dllexport
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON = -Wall
+QMAKE_CFLAGS_WARN_OFF = -w
+QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+QMAKE_CXX = x86_64-w64-mingw32-g++
+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_RTTI_ON = -frtti
+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
+
+QMAKE_INCDIR =
+#QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
+QMAKE_INCDIR_QT = /usr/x86_64-w64-mingw32/include
+#QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+QMAKE_LIBDIR_QT = /usr/x86_64-w64-mingw32/lib
+
+QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+QMAKE_LINK = x86_64-w64-mingw32-g++
+QMAKE_LFLAGS =
+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
+QMAKE_LFLAGS_EXCEPTIONS_OFF =
+QMAKE_LFLAGS_RELEASE = -g
+QMAKE_LFLAGS_DEBUG = -g
+QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
+QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
+QMAKE_LFLAGS_DLL = -shared
+QMAKE_LINK_OBJECT_MAX = 10
+QMAKE_LINK_OBJECT_SCRIPT= object_script
+QMAKE_PREFIX_STATICLIB = lib
+QMAKE_EXTENSION_STATICLIB = a
+
+
+QMAKE_LIBS =
+QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -ltiff -lpng
+QMAKE_LIBS_NETWORK = -lws2_32
+QMAKE_LIBS_OPENGL = -lopengl32 -lglu32 -lgdi32 -luser32
+QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
+QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
+
+QMAKE_DIR_SEP = /
+QMAKE_STREAM_EDITOR = sed
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $(COPY)
+QMAKE_COPY_DIR = $(COPY) -a
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_INSTALL_FILE = install -m 644 -p
+QMAKE_INSTALL_PROGRAM = install -m 755 -p
+
+# "qmake -win32" always appears to generate code like this:
+# $(CHK_DIR_EXISTS) somedir $(MKDIR) somedir
+# We can't write a Unix macro that is compatible, so we have to hack it:
+QMAKE_CHK_DIR_EXISTS = mkdir -p
+QMAKE_MKDIR =
+
+PKG_CONFIG = x86_64-w64-mingw32-pkg-config
+QMAKE_LRELEASE = x86_64-w64-mingw32-lrelease
+QMAKE_MOC = x86_64-w64-mingw32-moc
+QMAKE_UIC = x86_64-w64-mingw32-uic
+QMAKE_RCC = x86_64-w64-mingw32-rcc
+
+QMAKE_IDL = midl
+QMAKE_LIB = x86_64-w64-mingw32-ar -ru
+QMAKE_RC = x86_64-w64-mingw32-windres
+QMAKE_DLLTOOL = x86_64-w64-mingw32-dlltool
+QMAKE_ZIP = zip -r -9
+
+QMAKE_STRIP = x86_64-w64-mingw32-strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+
+load(qt_config)
+
+#QT_LIBINFIX = 4
diff --git a/qplatformdefs.h b/qplatformdefs.h
new file mode 100644
index 000000000000..1be310b7ea99
--- /dev/null
+++ b/qplatformdefs.h
@@ -0,0 +1,160 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License versions 2.0 or 3.0 as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information
+** to ensure GNU General Public Licensing requirements will be met:
+** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
+** http://www.gnu.org/copyleft/gpl.html. In addition, as a special
+** exception, Nokia gives you certain additional rights. These rights
+** are described in the Nokia Qt GPL Exception version 1.3, included in
+** the file GPL_EXCEPTION.txt in this package.
+**
+** Qt for Windows(R) Licensees
+** As a special exception, Nokia, as the sole copyright holder for Qt
+** Designer, grants users of the Qt/Eclipse Integration plug-in the
+** right for the Qt/Eclipse Integration to link to functionality
+** provided by Qt Designer and its related libraries.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#ifdef UNICODE
+#ifndef _UNICODE
+#define _UNICODE
+#endif
+#endif
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+#include <tchar.h>
+#include <io.h>
+#include <direct.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <qt_windows.h>
+#include <limits.h>
+
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)
+typedef enum {
+ NameUnknown = 0,
+ NameFullyQualifiedDN = 1,
+ NameSamCompatible = 2,
+ NameDisplay = 3,
+ NameUniqueId = 6,
+ NameCanonical = 7,
+ NameUserPrincipal = 8,
+ NameCanonicalEx = 9,
+ NameServicePrincipal = 10,
+ NameDnsDomain = 12
+} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
+#endif
+
+#define Q_FS_FAT
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct _stati64 // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
+#define QT_STAT ::_stati64
+#define QT_FSTAT ::_fstati64
+#else
+#define QT_STATBUF struct _stat // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
+#define QT_STAT ::_stat
+#define QT_FSTAT ::_fstat
+#endif
+#define QT_STAT_REG _S_IFREG
+#define QT_STAT_DIR _S_IFDIR
+#define QT_STAT_MASK _S_IFMT
+#if defined(_S_IFLNK)
+# define QT_STAT_LNK _S_IFLNK
+#endif
+#define QT_FILENO _fileno
+#define QT_OPEN ::_open
+#define QT_CLOSE ::_close
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_LSEEK ::_lseeki64
+#ifndef UNICODE
+#define QT_TSTAT ::_stati64
+#else
+#define QT_TSTAT ::_wstati64
+#endif
+#else
+#define QT_LSEEK ::_lseek
+#ifndef UNICODE
+#define QT_TSTAT ::_stat
+#else
+#define QT_TSTAT ::_wstat
+#endif
+#endif
+#define QT_READ ::_read
+#define QT_WRITE ::_write
+#define QT_ACCESS ::_access
+#define QT_GETCWD ::_getcwd
+#define QT_CHDIR ::_chdir
+#define QT_MKDIR ::_mkdir
+#define QT_RMDIR ::_rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY _O_RDONLY
+#define QT_OPEN_WRONLY _O_WRONLY
+#define QT_OPEN_RDWR _O_RDWR
+#define QT_OPEN_CREAT _O_CREAT
+#define QT_OPEN_TRUNC _O_TRUNC
+#define QT_OPEN_APPEND _O_APPEND
+#if defined(O_TEXT)
+# define QT_OPEN_TEXT _O_TEXT
+# define QT_OPEN_BINARY _O_BINARY
+#endif
+
+#define QT_FOPEN ::fopen
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#else
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#endif
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_FPOS_T fpos_t
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_OFF_T off64_t
+#else
+#define QT_OFF_T long
+#endif
+
+#define QT_SIGNAL_ARGS int
+
+#define QT_VSNPRINTF ::_vsnprintf
+#define QT_SNPRINTF ::_snprintf
+
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/qt-4.8.0-build-qtuitools-dynamically.patch b/qt-4.8.0-build-qtuitools-dynamically.patch
new file mode 100644
index 000000000000..0b188c240a55
--- /dev/null
+++ b/qt-4.8.0-build-qtuitools-dynamically.patch
@@ -0,0 +1,32 @@
+diff --git a/tools/designer/src/uitools/uitools.pro b/tools/designer/src/uitools/uitools.pro
+index be46afc..b013942 100644
+--- a/tools/designer/src/uitools/uitools.pro
++++ b/tools/designer/src/uitools/uitools.pro
+@@ -1,7 +1,7 @@
+ TEMPLATE = lib
+ TARGET = QtUiTools
+ QT += xml
+-CONFIG += qt staticlib
++CONFIG += qt
+ DESTDIR = ../../../../lib
+ DLLDESTDIR = ../../../../bin
+
+@@ -10,7 +10,6 @@ symbian {
+ load(armcc_warnings)
+ }
+
+-win32|mac:!macx-xcode:CONFIG += debug_and_release build_all
+
+ DEFINES += QFORMINTERNAL_NAMESPACE QT_DESIGNER_STATIC QT_FORMBUILDER_NO_SCRIPT
+ isEmpty(QT_MAJOR_VERSION) {
+--- qt-everywhere-opensource-src-4.8.3/mkspecs/features/uitools.prf.orig 2012-10-28 16:59:16.937372767 +0100
++++ qt-everywhere-opensource-src-4.8.3/mkspecs/features/uitools.prf 2012-10-28 16:59:32.712484407 +0100
+@@ -11,4 +11,8 @@
+ }
+ LIBS += $$QTUITOOLS_LINKAGE
+
++CONFIG(static) {
++ LIBS += -lQtGui$${QT_LIBINFIX} $${QMAKE_LIBS_GUI} -lQtCore$${QT_LIBINFIX} $${QMAKE_LIBS_CORE}
++}
++
+ INCLUDEPATH = $$QMAKE_INCDIR_QT/QtUiTools $$INCLUDEPATH
diff --git a/qt-4.8.0-fix-include-windows-h.patch b/qt-4.8.0-fix-include-windows-h.patch
new file mode 100644
index 000000000000..4e119f99a885
--- /dev/null
+++ b/qt-4.8.0-fix-include-windows-h.patch
@@ -0,0 +1,13 @@
+diff --git a/tools/linguist/shared/profileevaluator.cpp b/tools/linguist/shared/profileevaluator.cpp
+index 0539efa..f8767b7 100644
+--- a/tools/linguist/shared/profileevaluator.cpp
++++ b/tools/linguist/shared/profileevaluator.cpp
+@@ -65,7 +65,7 @@
+ #include <unistd.h>
+ #include <sys/utsname.h>
+ #else
+-#include <Windows.h>
++#include <windows.h>
+ #endif
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/qt-4.8.1-fix-activeqt-compilation.patch b/qt-4.8.1-fix-activeqt-compilation.patch
new file mode 100644
index 000000000000..e942dda9e8f7
--- /dev/null
+++ b/qt-4.8.1-fix-activeqt-compilation.patch
@@ -0,0 +1,75 @@
+diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
+index f5c495a..123e40f 100644
+--- a/src/activeqt/control/qaxserverbase.cpp
++++ b/src/activeqt/control/qaxserverbase.cpp
+@@ -111,8 +111,6 @@
+ };
+
+
+-bool qt_sendSpontaneousEvent(QObject*, QEvent*);
+-
+ /*
+ \class QAxServerBase
+ \brief The QAxServerBase class is an ActiveX control hosting a QWidget.
+@@ -1768,9 +1766,7 @@
+ // make sure we get a resize event even if not embedded as a control
+ if (!m_hWnd && !qt.widget->isVisible() && newSize != oldSize) {
+ QResizeEvent resizeEvent(newSize, oldSize);
+-#ifndef QT_DLL // import from static library
+ extern bool qt_sendSpontaneousEvent(QObject*,QEvent*);
+-#endif
+ qt_sendSpontaneousEvent(qt.widget, &resizeEvent);
+ }
+ m_currentExtent = qt.widget->size();
+@@ -4037,13 +4033,6 @@
+ }
+
+
+-#ifdef QT_DLL // avoid conflict with symbol in static lib
+-bool qt_sendSpontaneousEvent(QObject *o, QEvent *e)
+-{
+- return QCoreApplication::sendSpontaneousEvent(o, e);
+-}
+-#endif
+-
+ /*
+ Tries to set the size of the control.
+ */
+diff --git a/tools/activeqt/testcon/testcon.pro b/tools/activeqt/testcon/testcon.pro
+index 89f8067..696be2e 100644
+--- a/tools/activeqt/testcon/testcon.pro
++++ b/tools/activeqt/testcon/testcon.pro
+@@ -7,6 +7,9 @@ CONFIG += qaxserver qaxserver_no_postlink qaxcontainer
+ INCLUDEPATH += $$QT_SOURCE_TREE/tools/activeqt/container/debug \
+ $$QT_SOURCE_TREE/tools/activeqt/container/release \
+ $$QT_BUILD_TREE/src/activeqt/container \
++ $$QT_BUILD_TREE/src/activeqt/container/.uic/release-shared \
++ $$QT_BUILD_TREE/src/activeqt/container/.uic/release-static \
++ $$QT_BUILD_TREE/src/activeqt/container/.uic/debug-shared \
+
+ SOURCES = main.cpp docuwindow.cpp mainwindow.cpp invokemethod.cpp changeproperties.cpp ambientproperties.cpp controlinfo.cpp
+ HEADERS = docuwindow.h mainwindow.h invokemethod.h changeproperties.h ambientproperties.h controlinfo.h
+diff --git a/tools/designer/src/plugins/activeqt/activeqt.pro b/tools/designer/src/plugins/activeqt/activeqt.pro
+index f58df8a..5d9bdd4 100644
+--- a/tools/designer/src/plugins/activeqt/activeqt.pro
++++ b/tools/designer/src/plugins/activeqt/activeqt.pro
+@@ -10,6 +10,8 @@ build_all:!build_pass {
+
+ INCLUDEPATH += $$QT_SOURCE_TREE/src/activeqt/shared/ \
+ $$QT_BUILD_TREE/src/activeqt/container \
++ $$QT_BUILD_TREE/src/activeqt/container/.uic/release-shared \
++ $$QT_BUILD_TREE/src/activeqt/container/.uic/debug-shared \
+ ../../lib/uilib
+
+ # Input
+--- qt-everywhere-opensource-src-4.8.3/src/gui/kernel/qapplication.cpp.orig 2012-10-26 21:31:47.415811691 +0200
++++ qt-everywhere-opensource-src-4.8.3/src/gui/kernel/qapplication.cpp 2012-10-26 21:32:19.534024502 +0200
+@@ -5550,7 +5550,7 @@
+ return platform;
+ }
+
+-bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
++Q_GUI_EXPORT bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
+ {
+ return QCoreApplication::sendSpontaneousEvent(receiver, event);
+ }
diff --git a/qt-dont-perform-ipc-checks-for-win32.patch b/qt-dont-perform-ipc-checks-for-win32.patch
new file mode 100644
index 000000000000..84dd91c95f1b
--- /dev/null
+++ b/qt-dont-perform-ipc-checks-for-win32.patch
@@ -0,0 +1,11 @@
+--- configure.orig 2013-05-31 20:15:02.561717527 +0200
++++ configure 2013-05-31 20:16:23.689083855 +0200
+@@ -5313,7 +5313,7 @@
+ fi
+
+ # check IPC support
+-if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
++if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" -a "$XPLATFORM_MINGW" = "no" ]; then
+ # Raptor does not support configure tests.
+ if ! compileTest unix/ipc_sysv "ipc_sysv" ; then
+ # SYSV IPC is not supported - check POSIX IPC
diff --git a/qt-dont-set-qt-dll-define-for-static-builds.patch b/qt-dont-set-qt-dll-define-for-static-builds.patch
new file mode 100644
index 000000000000..f5aebd4183bb
--- /dev/null
+++ b/qt-dont-set-qt-dll-define-for-static-builds.patch
@@ -0,0 +1,12 @@
+--- qt-everywhere-opensource-src-4.8.6/mkspecs/features/qt.prf.orig 2013-07-05 00:05:01.084522022 +0200
++++ qt-everywhere-opensource-src-4.8.6/mkspecs/features/qt.prf 2013-07-05 00:05:19.402521256 +0200
+@@ -7,7 +7,7 @@
+ QT_ENV_DLL = $$(QT_DLL)
+ QT_ENV_NO_DLL = $$(QT_NODLL)
+ isEmpty(QT_ENV_NO_DLL) {
+- shared|!isEmpty(QT_ENV_DLL):DEFINES += QT_DLL
++ shared|!isEmpty(QT_ENV_DLL):!static:DEFINES += QT_DLL
+ }
+ contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL):QMAKE_QT_DLL = 1
+ }
+
diff --git a/qt-fix-javascript-jit-on-mingw-x86_64.patch b/qt-fix-javascript-jit-on-mingw-x86_64.patch
new file mode 100644
index 000000000000..5171f188416c
--- /dev/null
+++ b/qt-fix-javascript-jit-on-mingw-x86_64.patch
@@ -0,0 +1,22 @@
+--- qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp.orig 2012-02-08 18:42:31.512669347 +0100
++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp 2012-02-08 18:43:18.812512826 +0100
+@@ -68,7 +68,7 @@
+
+ namespace JSC {
+
+-#if OS(DARWIN) || OS(WINDOWS)
++#if OS(DARWIN) || (OS(WINDOWS) && CPU(X86))
+ #define SYMBOL_STRING(name) "_" #name
+ #else
+ #define SYMBOL_STRING(name) #name
+--- qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h.orig 2012-02-08 18:56:13.967325973 +0100
++++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h 2012-02-08 18:58:18.977552112 +0100
+@@ -1120,7 +1120,7 @@
+ /* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in.
+ On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */
+ #if ENABLE(ASSEMBLER)
+-#if CPU(X86_64)
++#if CPU(X86_64) && !OS(WINDOWS)
+ #define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1
+ #else
+ #define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1
diff --git a/qt-merge-static-and-shared-library-trees.patch b/qt-merge-static-and-shared-library-trees.patch
new file mode 100644
index 000000000000..95e9a1ae240a
--- /dev/null
+++ b/qt-merge-static-and-shared-library-trees.patch
@@ -0,0 +1,51 @@
+--- a/mkspecs/features/qt_functions.prf.orig 2014-08-01 23:54:20.441986402 +0200
++++ b/mkspecs/features/qt_functions.prf 2014-08-01 23:55:33.603172013 +0200
+@@ -83,6 +83,19 @@
+ QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX}
+ }
+ LIBS += $$LINKAGE
++
++ win32:CONFIG(static) {
++ isEqual(LIB_NAME, QtCore) {
++ LIBS += $$QMAKE_LIBS_CORE
++ } else:isEqual(LIB_NAME, QtGui) {
++ LIBS += $$QMAKE_LIBS_GUI
++ } else:isEqual(LIB_NAME, QtNetwork) {
++ LIBS += $$QMAKE_LIBS_NETWORK
++ } else:isEqual(LIB_NAME, QtOpenGL) {
++ LIBS += $$QMAKE_LIBS_OPENGL
++ }
++ }
++
+ export(LIBS)
+ export(INCLUDEPATH)
+ export(QMAKE_FRAMEWORKPATH)
+--- a/mkspecs/features/default_post.prf.orig 2014-08-01 23:51:16.864011435 +0200
++++ b/mkspecs/features/default_post.prf 2014-08-01 23:51:29.830221559 +0200
+@@ -96,6 +96,11 @@
+ QMAKE_INCDIR += $$QMAKE_INCDIR_POST
+ QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
+
++win32:contains(CONFIG, static) {
++ DEFINES += QT_STATIC
++ QMAKE_LFLAGS += -static
++}
++
+ # Let every project have a standard GNU `check' target
+ !contains(QMAKE_EXTRA_TARGETS, check) {
+ # `make check' should iterate through all subdirs
+--- a/configure.orig 2012-12-10 23:51:02.920255366 +0100
++++ b/configure 2012-12-10 23:55:58.101753703 +0100
+@@ -6032,6 +6032,12 @@
+ QT_EDITION = $Edition
+ QT_CONFIG += $QT_CONFIG
+
++contains(CONFIG, static) {
++ CONFIG -= shared
++ QT_CONFIG += static jpeg gif
++ QT_CONFIG -= shared
++}
++
+ #versioning
+ QT_VERSION = $QT_VERSION
+ QT_MAJOR_VERSION = $QT_MAJOR_VERSION
diff --git a/qt4-fix-linking-against-static-dbus.patch b/qt4-fix-linking-against-static-dbus.patch
new file mode 100644
index 000000000000..cd8518755bd9
--- /dev/null
+++ b/qt4-fix-linking-against-static-dbus.patch
@@ -0,0 +1,26 @@
+--- a/src/dbus/qdbus_symbols_p.h.orig 2014-08-02 12:32:15.112000000 +0200
++++ b/src/dbus/qdbus_symbols_p.h 2014-08-02 12:33:33.286000000 +0200
+@@ -55,6 +55,11 @@
+ #define QDBUS_SYMBOLS_P_H
+
+ #include <QtCore/qglobal.h>
++
++#ifdef QT_STATIC
++#define DBUS_STATIC_BUILD
++#endif
++
+ #include <dbus/dbus.h>
+
+ #ifndef QT_NO_DBUS
+
+--- a/src/dbus/dbus.pro.orig 2014-08-15 17:16:01.449377079 +0200
++++ b/src/dbus/dbus.pro 2014-08-15 17:16:27.092456707 +0200
+@@ -27,7 +27,7 @@
+ }
+ win32 {
+ wince*:LIBS_PRIVATE += -lws2
+- else:LIBS_PRIVATE += -lws2_32 \
++ else:LIBS_PRIVATE += -ldbus-1 -lws2_32 -liphlpapi \
+ -ladvapi32 \
+ -lnetapi32 \
+ -luser32