[mingw-qt: 2/65] initial checkin

epienbro epienbro at fedoraproject.org
Tue Mar 6 21:26:55 UTC 2012


commit 9387934045d19893a1e2ca71344efdee1154153f
Author: sailer <sailer at fedoraproject.org>
Date:   Mon Mar 16 02:25:38 2009 +0000

    initial checkin

 mingw32-qt-4.4.3-no-fpu-functions.patch |   34 ++
 mingw32-qt.spec                         |  241 ++++++++++++
 qmake.cache.in                          |   20 +
 qmake.conf                              |  111 ++++++
 qplatformdefs.h                         |  160 ++++++++
 qt-win-configure.patch                  |  655 +++++++++++++++++++++++++++++++
 qt-win-configure.sh                     |   71 ++++
 7 files changed, 1292 insertions(+), 0 deletions(-)
---
diff --git a/mingw32-qt-4.4.3-no-fpu-functions.patch b/mingw32-qt-4.4.3-no-fpu-functions.patch
new file mode 100644
index 0000000..368f6e7
--- /dev/null
+++ b/mingw32-qt-4.4.3-no-fpu-functions.patch
@@ -0,0 +1,34 @@
+diff -ur qt-win-opensource-src-4.4.3.orig/src/corelib/tools/qlocale.cpp qt-win-opensource-src-4.4.3/src/corelib/tools/qlocale.cpp
+--- qt-win-opensource-src-4.4.3.orig/src/corelib/tools/qlocale.cpp	2008-09-27 10:00:55.000000000 +0100
++++ qt-win-opensource-src-4.4.3/src/corelib/tools/qlocale.cpp	2009-02-02 11:39:40.000000000 +0000
+@@ -6238,6 +6238,10 @@
+ 
+ Q_CORE_EXPORT char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)
+ {
++    // RWMJ: The 8087-twiddling functions just don't seem to exist
++    // in MinGW cross-compiler, so comment out that code and hope for
++    // the best ...
++#if 0
+     // Some values of the floating-point control word can cause _qdtoa to crash with an underflow.
+     // We set a safe value here.
+ #ifdef Q_OS_WIN
+@@ -6257,9 +6261,11 @@
+     fenv_t envp;
+     feholdexcept(&envp);
+ #endif
++#endif
+ 
+     char *s = _qdtoa(d, mode, ndigits, decpt, sign, rve, resultp);
+ 
++#if 0 // RWMJ - see above.
+ #ifdef Q_OS_WIN
+     _clear87();
+ #ifndef _M_X64
+@@ -6272,6 +6278,7 @@
+ #if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+     fesetenv(&envp);
+ #endif
++#endif
+ 
+     return s;
+ }
diff --git a/mingw32-qt.spec b/mingw32-qt.spec
new file mode 100644
index 0000000..5c874a6
--- /dev/null
+++ b/mingw32-qt.spec
@@ -0,0 +1,241 @@
+%define __strip %{_mingw32_strip}
+%define __objdump %{_mingw32_objdump}
+%define _use_internal_dependency_generator 0
+%define __find_requires %{_mingw32_findrequires}
+%define __find_provides %{_mingw32_findprovides}
+
+# NOTES, please read these carefully first:
+#
+# . We only build a few libraries at the moment, those listed in
+#   %{subdirs} below.  We could build more without too much effort.
+#
+# . We should build our own qmake instead of relying on the one
+#   from the native Fedora package.  The reason is so that we can
+#   set the default include and library paths correctly.
+
+%define subdirs src/corelib src/xml src/network src/gui src/winmain src/svg src/sql src/qt3support
+
+Name:           mingw32-qt
+Version:        4.5.0
+Release:        2%{?dist}
+Summary:        Qt for Windows
+
+License:        GPLv3 with exceptions or LGPLv2 with exceptions
+Group:          Development/Libraries
+
+URL:            http://www.qtsoftware.com/
+Source0:        ftp://ftp.trolltech.no/qt/source/qt-win-opensource-src-%{version}.zip
+
+# To make the configure patch - see below.
+Source1:        qt-win-configure.sh
+
+# Override .qmake.cache
+Source2:        qmake.cache.in
+
+# Special cross-compilation qmake target.
+Source3:        qmake.conf
+Source4:        qplatformdefs.h
+
+# Qt-win is supplied with a binary configure.exe.  Although we have source
+# for this, (a) it can't be compiled on Linux, and (b) we cannot run
+# the Windows binary during the build.  Instead we run the command by
+# hand and create this diff to record what it did.
+#
+# Generate this patch using "qt-win-configure.sh".
+Patch0:         qt-win-configure.patch
+
+Patch11:        mingw32-qt-4.4.3-no-fpu-functions.patch
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+BuildRequires:  mingw32-filesystem >= 35
+BuildRequires:  mingw32-gcc
+BuildRequires:  mingw32-gcc-c++
+BuildRequires:  mingw32-binutils
+
+# For the native qmake, moc programs.
+# Note that the precise same native version is required - eg. moc will
+# not work unless it's the same version.
+#BuildRequires:  qt-devel = %{version}  Stupid, can't write this ...
+BuildRequires:  qt-devel
+
+BuildRequires:  zip
+BuildRequires:  dos2unix
+
+# This is required because we want qmake, but also because we
+# install the cross-compile qmake specs into a directory owned
+# by this package.
+Requires:       qt-devel
+
+
+%description
+This package contains the Qt software toolkit for developing
+cross-platform applications.
+
+This is the Windows version of Qt, for use in conjunction with the
+Fedora Windows cross-compiler.
+
+
+%prep
+%setup -q -n qt-win-opensource-src-%{version}
+
+%patch0 -p1
+
+%patch11 -p1
+
+for f in LICENSE.GPL3 LICENSE.LGPL LGPL_EXCEPTION.txt KNOWN.ISSUES README; do
+  dos2unix --keepdate $f
+done
+
+# Override the .qmake.cache file.
+rm .qmake.cache
+sed -e s, at builddir@,$(pwd),g < %{SOURCE2} > .qmake.cache
+
+# Cross-compilation qmake target.
+mkdir mkspecs/fedora-win32-cross
+cp %{SOURCE3} %{SOURCE4} mkspecs/fedora-win32-cross
+
+
+%build
+for d in %{subdirs}; do
+  # Precompiled headers from a previous iteration of this loop
+  # cause the compiler deep confusion, so make sure any are removed
+  # _and_ the PCH directories are fresh and empty.
+  rm -rf tmp/obj/release_shared/qt_pch.h.gch
+  mkdir -p tmp/obj/release_shared/qt_pch.h.gch
+  rm -rf tmp/obj/release_shared/qt_gui_pch.h.gch
+  mkdir -p tmp/obj/release_shared/qt_gui_pch.h.gch
+
+  # Now build in this directory.
+  pushd $d
+  qmake-qt4 -win32 *.pro
+#  make %{?_smp_mflags}
+  popd
+
+  # As above ...
+  rm -rf tmp/obj/debug_shared/qt_pch.h.gch
+  mkdir -p tmp/obj/debug_shared/qt_pch.h.gch
+  rm -rf tmp/obj/debug_shared/qt_gui_pch.h.gch
+  mkdir -p tmp/obj/debug_shared/qt_gui_pch.h.gch
+
+  # Now build in this directory.
+  pushd $d
+#  make %{?_smp_mflags} debug
+  popd
+done
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+for d in %{subdirs}; do
+  # As above ... WTF is Qt doing confusing make and make install??
+  rm -rf tmp/obj/release_shared/qt_pch.h.gch
+  mkdir -p tmp/obj/release_shared/qt_pch.h.gch
+  rm -rf tmp/obj/release_shared/qt_gui_pch.h.gch
+  mkdir -p tmp/obj/release_shared/qt_gui_pch.h.gch
+
+  pushd $d
+  make %{?_smp_mflags} INSTALL_ROOT=$RPM_BUILD_ROOT install
+  popd
+
+  # As above ...
+  rm -rf tmp/obj/debug_shared/qt_pch.h.gch
+  mkdir -p tmp/obj/debug_shared/qt_pch.h.gch
+  rm -rf tmp/obj/debug_shared/qt_gui_pch.h.gch
+  mkdir -p tmp/obj/debug_shared/qt_gui_pch.h.gch
+
+  pushd $d
+  make %{?_smp_mflags} INSTALL_ROOT=$RPM_BUILD_ROOT debug-install
+  popd
+done
+
+# Qt ignores our carefully configured directories and just
+# puts stuff in default directories.  Move them to the proper
+# places ...
+# (Actually this may be because we are using the native qmake)
+mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
+mv $RPM_BUILD_ROOT%{_includedir}/* $RPM_BUILD_ROOT%{_mingw32_includedir}
+mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
+mv $RPM_BUILD_ROOT%{_libdir}/*.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
+mv $RPM_BUILD_ROOT%{_libdir}/*.a $RPM_BUILD_ROOT%{_mingw32_libdir}
+rm $RPM_BUILD_ROOT%{_libdir}/qt4/bin/*
+rm $RPM_BUILD_ROOT%{_libdir}/*.prl
+
+# Cross-compiler qmake specs.
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/qt4/mkspecs/fedora-win32-cross
+cp %{SOURCE3} %{SOURCE4} \
+  $RPM_BUILD_ROOT%{_libdir}/qt4/mkspecs/fedora-win32-cross
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%doc configure.output
+%doc LICENSE.GPL3 LICENSE.LGPL LGPL_EXCEPTION.txt KNOWN.ISSUES README
+%{_mingw32_bindir}/QtCore4.dll
+%{_mingw32_bindir}/QtGui4.dll
+%{_mingw32_bindir}/QtNetwork4.dll
+%{_mingw32_bindir}/QtXml4.dll
+%{_mingw32_bindir}/QtSvg4.dll
+%{_mingw32_bindir}/QtSql4.dll
+%{_mingw32_bindir}/Qt3Support4.dll
+%{_mingw32_bindir}/QtCored4.dll
+%{_mingw32_bindir}/QtGuid4.dll
+%{_mingw32_bindir}/QtNetworkd4.dll
+%{_mingw32_bindir}/QtXmld4.dll
+%{_mingw32_bindir}/QtSvgd4.dll
+%{_mingw32_bindir}/QtSqld4.dll
+%{_mingw32_bindir}/Qt3Supportd4.dll
+%{_mingw32_libdir}/libQtCore4.a
+%{_mingw32_libdir}/libQtGui4.a
+%{_mingw32_libdir}/libQtNetwork4.a
+%{_mingw32_libdir}/libQtXml4.a
+%{_mingw32_libdir}/libQtSvg4.a
+%{_mingw32_libdir}/libQtSql4.a
+%{_mingw32_libdir}/libQt3Support4.a
+%{_mingw32_libdir}/libqtmain.a
+%{_mingw32_libdir}/libQtCored4.a
+%{_mingw32_libdir}/libQtGuid4.a
+%{_mingw32_libdir}/libQtNetworkd4.a
+%{_mingw32_libdir}/libQtXmld4.a
+%{_mingw32_libdir}/libQtSvgd4.a
+%{_mingw32_libdir}/libQtSqld4.a
+%{_mingw32_libdir}/libQt3Supportd4.a
+%{_mingw32_libdir}/libqtmaind.a
+%{_mingw32_includedir}/Qt/
+%{_mingw32_includedir}/QtCore/
+%{_mingw32_includedir}/QtGui/
+%{_mingw32_includedir}/QtNetwork/
+%{_mingw32_includedir}/QtXml/
+%{_mingw32_includedir}/QtSvg/
+%{_mingw32_includedir}/QtSql/
+%{_mingw32_includedir}/Qt3Support/
+%{_libdir}/qt4/mkspecs/fedora-win32-cross
+
+
+%changelog
+* Thu Mar 12 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 4.5.0-2
+- enable debug libraries
+- rename to mingw32-qt
+
+* Thu Mar 12 2009 Thomas Sailer <t.sailer at alumni.ethz.ch> - 4.5.0-1
+- update to Qt 4.5.0 (release)
+- also build QtSvg, QtSql, Qt3Support
+
+* Sat Feb 21 2009 Richard W.M. Jones <rjones at redhat.com> - 4.5.0-0.2.rc1
+- Update to Qt 4.5.0-rc1.
+
+* Fri Feb 20 2009 Richard W.M. Jones <rjones at redhat.com> - 4.4.3-4
+- Rebuild for mingw32-gcc 4.4
+
+* Fri Feb  6 2009 Richard W.M. Jones <rjones at redhat.com> - 4.4.3-3
+- Fix required for older W32API in Fedora 10.
+
+* Sun Feb  1 2009 Richard W.M. Jones <rjones at redhat.com> - 4.4.3-2
+- Initial RPM release.
diff --git a/qmake.cache.in b/qmake.cache.in
new file mode 100644
index 0000000..587b1dd
--- /dev/null
+++ b/qmake.cache.in
@@ -0,0 +1,20 @@
+QMAKE_QT_VERSION_OVERRIDE = 4
+OBJECTS_DIR     = @builddir@/tmp/obj/release_shared
+MOC_DIR         = @builddir@/tmp/moc/release_shared
+RCC_DIR         = @builddir@/tmp/rcc/release_shared
+sql-plugins    += sqlite
+styles         += windows plastique cleanlooks motif cde
+imageformat-plugins += gif tiff jpeg
+CONFIG         += dist-config large-config medium-config minimal-config small-config full-config release incremental create_prl link_prl depend_includepath QTDIR_build
+QT_BUILD_PARTS  = libs tools examples demos docs translations
+QMAKESPEC       = @builddir@/mkspecs/fedora-win32-cross
+ARCH            = windows
+QT_BUILD_TREE   = @builddir@
+QT_SOURCE_TREE  = @builddir@
+QMAKE_MOC       = moc-qt4
+QMAKE_UIC       = uic-qt4
+QMAKE_UIC3      = uic3
+QMAKE_RCC       = rcc
+QMAKE_DUMPCPP   = dumpcpp
+QMAKE_INCDIR_QT = $$QT_BUILD_TREE/include
+QMAKE_LIBDIR_QT = $$QT_BUILD_TREE/lib
diff --git a/qmake.conf b/qmake.conf
new file mode 100644
index 0000000..652bd34
--- /dev/null
+++ b/qmake.conf
@@ -0,0 +1,111 @@
+#
+# qmake configuration for fedora-win32-cross
+# (Fedora Windows cross-compiler)
+# by Richard W.M. Jones (rjones at 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-pc-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 -mms-bitfields
+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-pc-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-pc-mingw32/sys-root/mingw/include
+#QMAKE_LIBDIR_QT		= $$[QT_INSTALL_LIBS]
+QMAKE_LIBDIR_QT         = /usr/i686-pc-mingw32/sys-root/mingw/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-pc-mingw32-g++
+QMAKE_LFLAGS		= -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
+QMAKE_LFLAGS_EXCEPTIONS_OFF =
+QMAKE_LFLAGS_RELEASE	= -Wl,-s
+QMAKE_LFLAGS_DEBUG	=
+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_LIBS		=
+QMAKE_LIBS_CORE         = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
+QMAKE_LIBS_GUI          = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32
+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_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_STRIP           = strip
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+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           = 
+
+QMAKE_MOC		= moc-qt4
+QMAKE_UIC		= uic-qt4
+QMAKE_IDC		= idc
+
+QMAKE_RCC		= $$[QT_INSTALL_BINS]/rcc
+
+QMAKE_IDL		= midl
+QMAKE_LIB		= i686-pc-mingw32-ar -ru
+QMAKE_RC		= i686-pc-mingw32-windres
+QMAKE_ZIP		= zip -r -9
+
+#QT_LIBINFIX		= 4
+
+QMAKE_STRIP		= strip
+QMAKE_STRIPFLAGS_LIB 	+= --strip-unneeded
+load(qt_config)
diff --git a/qplatformdefs.h b/qplatformdefs.h
new file mode 100644
index 0000000..30e5945
--- /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 at 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 at 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 <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-win-configure.patch b/qt-win-configure.patch
new file mode 100644
index 0000000..a66f127
--- /dev/null
+++ b/qt-win-configure.patch
@@ -0,0 +1,655 @@
+diff -urN qt-win-opensource-src-4.5.0.orig/configure.cache qt-win-opensource-src-4.5.0/configure.cache
+--- qt-win-opensource-src-4.5.0.orig/configure.cache	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/configure.cache	2009-03-11 21:28:03.000000000 +0100
+@@ -0,0 +1,30 @@
++-platform 
++fedora-win32-cross 
++-confirm-license 
++-no-qmake 
++-dont-process 
++-prefix 
++/usr/i686-pc-mingw32/sys-root/mingw 
++-bindir 
++/usr/i686-pc-mingw32/sys-root/mingw/bin 
++-datadir 
++/usr/i686-pc-mingw32/sys-root/mingw/share 
++-demosdir 
++/usr/i686-pc-mingw32/sys-root/mingw/lib/qt4/demos 
++-docdir 
++/usr/i686-pc-mingw32/sys-root/mingw/share/doc 
++-examplesdir 
++/usr/i686-pc-mingw32/sys-root/mingw/share/qt4/examples 
++-headerdir 
++/usr/i686-pc-mingw32/sys-root/mingw/include 
++-libdir 
++/usr/i686-pc-mingw32/sys-root/mingw/lib 
++-plugindir 
++/usr/i686-pc-mingw32/sys-root/mingw/lib/qt4/plugins 
++-translationdir 
++/usr/i686-pc-mingw32/sys-root/mingw/share/qt4/translations 
++-no-mmx 
++-no-sse 
++-no-sse2 
++-release 
++-shared 
+diff -urN qt-win-opensource-src-4.5.0.orig/configure.output qt-win-opensource-src-4.5.0/configure.output
+--- qt-win-opensource-src-4.5.0.orig/configure.output	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/configure.output	2009-03-11 21:28:03.000000000 +0100
+@@ -0,0 +1,154 @@
++err:wineboot:ProcessRunKeys Error running cmd #2 (2)
++err:wineboot:ProcessRunKeys Error running cmd #0 (2)
++err:service:load_reg_dword Error 1804 while reading value L"Type"
++err:service:scmdatabase_load_services Error 1804 reading registry key for service L"redbook" - skipping
++err:service:load_reg_dword Error 1804 while reading value L"Type"
++err:service:scmdatabase_load_services Error 1804 reading registry key for service L"sbemul" - skipping
++err:service:load_reg_dword Error 1804 while reading value L"Type"
++err:service:scmdatabase_load_services Error 1804 reading registry key for service L"swmidi" - skipping
++err:service:load_reg_dword Error 1804 while reading value L"Type"
++err:service:scmdatabase_load_services Error 1804 reading registry key for service L"UPDATE" - skipping
++err:service:load_reg_dword Error 1804 while reading value L"Type"
++err:service:scmdatabase_load_services Error 1804 reading registry key for service L"wdmaud" - skipping
++err:service:load_reg_dword Error 1804 while reading value L"Type"
++err:service:scmdatabase_load_services Error 1804 reading registry key for service L"WDMFS" - skipping
++err:winedevice:ServiceMain driver L"VIAPFD" failed to load
++No protocol specified
++No protocol specified
++No protocol specified
++
++This is the Qt for Windows Open Source Edition.
++
++You have already accepted the terms of the license.
++
++Setting Direct3D to NO, since the proper Direct3D SDK was not detected.
++Make sure you have the Direct3D SDK installed, and that you have run
++the <path to SDK>\Utilities\Bin\dx_setenv.cmd script.
++The D3D SDK library path *needs* to appear before the Platform SDK library
++path in your LIB environment variable.
++All the required DirectShow/Direct3D files couldn't be found.
++Make sure you have either the platform SDK AND the DirectX SDK or the Windows SDK installed.
++If you have the DirectX SDK installed, please make sure that you have run the <path to SDK>\SetEnv.Cmd script.
++Environment:
++    INCLUDE=
++      Unset
++    LIB=
++      Unset
++    PATH=
++      c:\windows
++      c:\windows\system
++      s:\
++      s:\test
++      f:\
++      s:\xilinx\bin\nt
++      s:\modelsim\win32
++      s:\fujitsu16\bin
++      s:\fujitsu16\flash510
++You are licensed to use this software under the terms of the GNU LGPL version 2.1 or the GNU GPL version 3.
++See J:/rpmbuild/SOURCES/qt-win-opensource-src-4.5.0/LICENSE.LGPL
++ or J:/rpmbuild/SOURCES/qt-win-opensource-src-4.5.0/LICENSE.GPL3
++
++Configuration:
++    dist-config
++    large-config
++    medium-config
++    minimal-config
++    small-config
++    full-config
++    release
++Qt Configuration:
++    release
++    zlib
++    png
++    accessibility
++    qt3support
++    opengl
++    ipv6
++    scripttools
++    xmlpatterns
++    svg
++    minimal-config
++    small-config
++    medium-config
++    large-config
++    full-config
++
++QMAKESPEC...................fedora-win32-cross (commandline)
++Architecture................windows
++Maketool....................make
++Debug symbols...............no
++Accessibility support.......yes
++STL support.................yes
++Exception support...........yes
++RTTI support................yes
++MMX support.................no
++3DNOW support...............no
++SSE support.................no
++SSE2 support................no
++IWMMXT support..............no
++OpenGL support..............yes
++Direct3D support............no
++OpenSSL support.............no
++QtDBus support..............no
++QtXmlPatterns support.......yes
++Phonon support..............no
++WebKit support..............no
++QtScriptTools support.......yes
++Graphics System.............raster
++Qt3 compatibility...........yes
++
++Third Party Libraries:
++    ZLIB support............qt
++    GIF support.............plugin
++    TIFF support............plugin
++    JPEG support............plugin
++    PNG support.............qt
++    MNG support.............plugin
++
++Styles:
++    Windows.................yes
++    Windows XP..............no
++    Windows Vista...........no
++    Plastique...............yes
++    Cleanlooks..............yes
++    Motif...................yes
++    CDE.....................yes
++    Windows CE..............no
++    Windows Mobile..........no
++
++Sql Drivers:
++    ODBC....................no
++    MySQL...................no
++    OCI.....................no
++    PostgreSQL..............no
++    TDS.....................no
++    DB2.....................no
++    SQLite..................plugin (qt)
++    SQLite2.................no
++    InterBase...............no
++
++Sources are in..............J:\rpmbuild\SOURCES\qt-win-opensource-src-4.5.0
++Build is done in............J:\rpmbuild\SOURCES\qt-win-opensource-src-4.5.0
++Install prefix............../usr/i686-pc-mingw32/sys-root/mingw
++Headers installed to......../usr/i686-pc-mingw32/sys-root/mingw/include
++Libraries installed to....../usr/i686-pc-mingw32/sys-root/mingw/lib
++Plugins installed to......../usr/i686-pc-mingw32/sys-root/mingw/lib/qt4/plugins
++Binaries installed to......./usr/i686-pc-mingw32/sys-root/mingw/bin
++Docs installed to.........../usr/i686-pc-mingw32/sys-root/mingw/share/doc
++Data installed to.........../usr/i686-pc-mingw32/sys-root/mingw/share
++Translations installed to.../usr/i686-pc-mingw32/sys-root/mingw/share/qt4/translations
++Examples installed to......./usr/i686-pc-mingw32/sys-root/mingw/share/qt4/examples
++Demos installed to........../usr/i686-pc-mingw32/sys-root/mingw/lib/qt4/demos
++
++Processing of project files have been disabled.
++Only use this option if you really know what you're doing.
++
++No protocol specified
++No protocol specified
++Application tried to create a window, but no driver could be loaded.
++Make sure that your X server is running and that $DISPLAY is set correctly.
++Application tried to create a window, but no driver could be loaded.
++Make sure that your X server is running and that $DISPLAY is set correctly.
++fixme:powrprof:DllMain (0x60750000, 1, (nil)) not fully implemented
++err:rundll32:WinMain Unable to find the entry point L"LoadCurrentPwrScheme" in L"powrprof.dll"
++fixme:powrprof:DllMain (0x60750000, 0, (nil)) not fully implemented
+diff -urN qt-win-opensource-src-4.5.0.orig/include/Qt/qconfig.h qt-win-opensource-src-4.5.0/include/Qt/qconfig.h
+--- qt-win-opensource-src-4.5.0.orig/include/Qt/qconfig.h	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/include/Qt/qconfig.h	2009-03-11 21:28:03.000000000 +0100
+@@ -0,0 +1 @@
++#include "../../src/corelib/global/qconfig.h"
+diff -urN qt-win-opensource-src-4.5.0.orig/include/QtCore/qconfig.h qt-win-opensource-src-4.5.0/include/QtCore/qconfig.h
+--- qt-win-opensource-src-4.5.0.orig/include/QtCore/qconfig.h	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/include/QtCore/qconfig.h	2009-03-11 21:28:03.000000000 +0100
+@@ -0,0 +1 @@
++#include "../../src/corelib/global/qconfig.h"
+diff -urN qt-win-opensource-src-4.5.0.orig/mkspecs/default/qmake.conf qt-win-opensource-src-4.5.0/mkspecs/default/qmake.conf
+--- qt-win-opensource-src-4.5.0.orig/mkspecs/default/qmake.conf	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/mkspecs/default/qmake.conf	2009-03-11 21:28:03.000000000 +0100
+@@ -0,0 +1,109 @@
++#
++# qmake configuration for fedora-win32-cross
++# (Fedora Windows cross-compiler)
++# by Richard W.M. Jones (rjones at 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-pc-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 -mms-bitfields
++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-pc-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-pc-mingw32/sys-root/mingw/include
++#QMAKE_LIBDIR_QT		= $$[QT_INSTALL_LIBS]
++QMAKE_LIBDIR_QT         = /usr/i686-pc-mingw32/sys-root/mingw/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-pc-mingw32-g++
++QMAKE_LFLAGS		= -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
++QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
++QMAKE_LFLAGS_EXCEPTIONS_OFF =
++QMAKE_LFLAGS_RELEASE	= -Wl,-s
++QMAKE_LFLAGS_DEBUG	=
++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_LIBS		=
++QMAKE_LIBS_CORE         = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32
++QMAKE_LIBS_GUI          = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32
++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_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_STRIP           = strip
++QMAKE_STRIPFLAGS_LIB += --strip-unneeded
++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           = 
++
++QMAKE_MOC		= moc-qt4
++QMAKE_UIC		= uic-qt4
++QMAKE_IDC		= idc
++
++QMAKE_IDL		= midl
++QMAKE_LIB		= i686-pc-mingw32-ar -ru
++QMAKE_RC		= i686-pc-mingw32-windres
++QMAKE_ZIP		= zip -r -9
++
++QMAKE_STRIP		= strip
++QMAKE_STRIPFLAGS_LIB 	+= --strip-unneeded
++load(qt_config)
++
++QMAKESPEC_ORIGINAL=J:/rpmbuild/SOURCES/qt-win-opensource-src-4.5.0/mkspecs/fedora-win32-cross
+diff -urN qt-win-opensource-src-4.5.0.orig/mkspecs/default/qplatformdefs.h qt-win-opensource-src-4.5.0/mkspecs/default/qplatformdefs.h
+--- qt-win-opensource-src-4.5.0.orig/mkspecs/default/qplatformdefs.h	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/mkspecs/default/qplatformdefs.h	2009-03-11 21:27:56.000000000 +0100
+@@ -0,0 +1,160 @@
++/****************************************************************************
++**
++** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
++** Contact: Qt Software Information (qt-info at 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 at 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 <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 -urN qt-win-opensource-src-4.5.0.orig/mkspecs/qconfig.pri qt-win-opensource-src-4.5.0/mkspecs/qconfig.pri
+--- qt-win-opensource-src-4.5.0.orig/mkspecs/qconfig.pri	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/mkspecs/qconfig.pri	2009-03-11 21:28:03.000000000 +0100
+@@ -0,0 +1,11 @@
++CONFIG+= release shared stl exceptions rtti
++QT_ARCH = windows
++QT_EDITION = OpenSource
++QT_CONFIG += release zlib png accessibility qt3support opengl ipv6 scripttools xmlpatterns svg minimal-config small-config medium-config large-config full-config
++#versioning 
++QT_VERSION = 4.5.0
++QT_MAJOR_VERSION = 4
++QT_MINOR_VERSION = 5
++QT_PATCH_VERSION = 0
++#Qt for Windows CE c-runtime deployment
++QT_CE_C_RUNTIME = no
+diff -urN qt-win-opensource-src-4.5.0.orig/.qmake.cache qt-win-opensource-src-4.5.0/.qmake.cache
+--- qt-win-opensource-src-4.5.0.orig/.qmake.cache	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/.qmake.cache	2009-03-11 21:28:03.000000000 +0100
+@@ -0,0 +1,20 @@
++QMAKE_QT_VERSION_OVERRIDE = 4
++OBJECTS_DIR     = tmp\obj\release_shared
++MOC_DIR         = tmp\moc\release_shared
++RCC_DIR         = tmp\rcc\release_shared
++sql-plugins    += sqlite
++styles         += windows plastique cleanlooks motif cde
++imageformat-plugins += gif tiff jpeg
++CONFIG         += dist-config large-config medium-config minimal-config small-config full-config release incremental create_prl link_prl depend_includepath QTDIR_build
++QT_BUILD_PARTS  = libs tools examples demos docs translations
++QMAKESPEC       = J:\rpmbuild\SOURCES\qt-win-opensource-src-4.5.0\mkspecs\fedora-win32-cross
++ARCH            = windows
++QT_BUILD_TREE   = J:\rpmbuild\SOURCES\qt-win-opensource-src-4.5.0
++QT_SOURCE_TREE  = J:\rpmbuild\SOURCES\qt-win-opensource-src-4.5.0
++QMAKE_MOC       = $$QT_BUILD_TREE\bin\moc.exe
++QMAKE_UIC       = $$QT_BUILD_TREE\bin\uic.exe
++QMAKE_UIC3      = $$QT_BUILD_TREE\bin\uic3.exe
++QMAKE_RCC       = $$QT_BUILD_TREE\bin\rcc.exe
++QMAKE_DUMPCPP   = $$QT_BUILD_TREE\bin\dumpcpp.exe
++QMAKE_INCDIR_QT = $$QT_BUILD_TREE\include
++QMAKE_LIBDIR_QT = $$QT_BUILD_TREE\lib
+diff -urN qt-win-opensource-src-4.5.0.orig/src/corelib/global/qconfig.cpp qt-win-opensource-src-4.5.0/src/corelib/global/qconfig.cpp
+--- qt-win-opensource-src-4.5.0.orig/src/corelib/global/qconfig.cpp	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/src/corelib/global/qconfig.cpp	2009-03-11 21:28:03.000000000 +0100
+@@ -0,0 +1,27 @@
++/* Licensed */
++static const char qt_configure_licensee_str          [512 + 12] = "qt_lcnsuser=Open Source";
++static const char qt_configure_licensed_products_str [512 + 12] = "qt_lcnsprod=OpenSource";
++static const char qt_configure_prefix_path_str       [512 + 12] = "qt_prfxpath=/usr/i686-pc-mingw32/sys-root/mingw";
++static const char qt_configure_documentation_path_str[512 + 12] = "qt_docspath=/usr/i686-pc-mingw32/sys-root/mingw/share/doc";
++static const char qt_configure_headers_path_str      [512 + 12] = "qt_hdrspath=/usr/i686-pc-mingw32/sys-root/mingw/include";
++static const char qt_configure_libraries_path_str    [512 + 12] = "qt_libspath=/usr/i686-pc-mingw32/sys-root/mingw/lib";
++static const char qt_configure_binaries_path_str     [512 + 12] = "qt_binspath=/usr/i686-pc-mingw32/sys-root/mingw/bin";
++static const char qt_configure_plugins_path_str      [512 + 12] = "qt_plugpath=/usr/i686-pc-mingw32/sys-root/mingw/lib/qt4/plugins";
++static const char qt_configure_data_path_str         [512 + 12] = "qt_datapath=/usr/i686-pc-mingw32/sys-root/mingw/share";
++static const char qt_configure_translations_path_str [512 + 12] = "qt_trnspath=/usr/i686-pc-mingw32/sys-root/mingw/share/qt4/translations";
++static const char qt_configure_examples_path_str     [512 + 12] = "qt_xmplpath=/usr/i686-pc-mingw32/sys-root/mingw/share/qt4/examples";
++static const char qt_configure_demos_path_str        [512 + 12] = "qt_demopath=/usr/i686-pc-mingw32/sys-root/mingw/lib/qt4/demos";
++/* strlen( "qt_lcnsxxxx" ) == 12 */
++#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
++#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
++#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
++#define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
++#define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12;
++#define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12;
++#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;
++#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;
++#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;
++#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;
++#define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;
++#define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;
++
+diff -urN qt-win-opensource-src-4.5.0.orig/src/corelib/global/qconfig.h qt-win-opensource-src-4.5.0/src/corelib/global/qconfig.h
+--- qt-win-opensource-src-4.5.0.orig/src/corelib/global/qconfig.h	1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.5.0/src/corelib/global/qconfig.h	2009-03-11 21:28:03.000000000 +0100
+@@ -0,0 +1,102 @@
++/* Everything */
++
++#ifndef QT_DLL
++#define QT_DLL
++#endif
++
++/* License information */
++#define QT_PRODUCT_LICENSEE "Open Source"
++#define QT_PRODUCT_LICENSE "OpenSource"
++
++// Qt Edition
++#ifndef QT_EDITION
++#  define QT_EDITION QT_EDITION_OPENSOURCE
++#endif
++
++#if (defined(_DEBUG) || defined(DEBUG))
++# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
++#  define QT_BUILD_KEY "Windows x64 msvc debug full-config"
++# else
++#  define QT_BUILD_KEY "Windows msvc debug full-config"
++# endif
++#else
++# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
++#  define QT_BUILD_KEY "Windows x64 msvc release full-config"
++# else
++#  define QT_BUILD_KEY "Windows msvc release full-config"
++# endif
++#endif
++
++/* Machine byte-order */
++#define Q_BIG_ENDIAN 4321
++#define Q_LITTLE_ENDIAN 1234
++#define Q_BYTE_ORDER Q_LITTLE_ENDIAN
++
++// Compile time features
++#define QT_ARCH_WINDOWS
++#if defined(QT_GRAPHICSSYSTEM_RASTER) && defined(QT_NO_GRAPHICSSYSTEM_RASTER)
++# undef QT_GRAPHICSSYSTEM_RASTER
++#elif !defined(QT_GRAPHICSSYSTEM_RASTER)
++# define QT_GRAPHICSSYSTEM_RASTER
++#endif
++
++#if defined(QT_NO_DBUS) && defined(QT_DBUS)
++# undef QT_NO_DBUS
++#elif !defined(QT_NO_DBUS)
++# define QT_NO_DBUS
++#endif
++
++#if defined(QT_NO_DIRECT3D) && defined(QT_DIRECT3D)
++# undef QT_NO_DIRECT3D
++#elif !defined(QT_NO_DIRECT3D)
++# define QT_NO_DIRECT3D
++#endif
++
++#if defined(QT_NO_OPENSSL) && defined(QT_OPENSSL)
++# undef QT_NO_OPENSSL
++#elif !defined(QT_NO_OPENSSL)
++# define QT_NO_OPENSSL
++#endif
++
++#if defined(QT_NO_PHONON) && defined(QT_PHONON)
++# undef QT_NO_PHONON
++#elif !defined(QT_NO_PHONON)
++# define QT_NO_PHONON
++#endif
++
++#if defined(QT_NO_STYLE_GTK) && defined(QT_STYLE_GTK)
++# undef QT_NO_STYLE_GTK
++#elif !defined(QT_NO_STYLE_GTK)
++# define QT_NO_STYLE_GTK
++#endif
++
++#if defined(QT_NO_STYLE_WINDOWSCE) && defined(QT_STYLE_WINDOWSCE)
++# undef QT_NO_STYLE_WINDOWSCE
++#elif !defined(QT_NO_STYLE_WINDOWSCE)
++# define QT_NO_STYLE_WINDOWSCE
++#endif
++
++#if defined(QT_NO_STYLE_WINDOWSMOBILE) && defined(QT_STYLE_WINDOWSMOBILE)
++# undef QT_NO_STYLE_WINDOWSMOBILE
++#elif !defined(QT_NO_STYLE_WINDOWSMOBILE)
++# define QT_NO_STYLE_WINDOWSMOBILE
++#endif
++
++#if defined(QT_NO_STYLE_WINDOWSVISTA) && defined(QT_STYLE_WINDOWSVISTA)
++# undef QT_NO_STYLE_WINDOWSVISTA
++#elif !defined(QT_NO_STYLE_WINDOWSVISTA)
++# define QT_NO_STYLE_WINDOWSVISTA
++#endif
++
++#if defined(QT_NO_STYLE_WINDOWSXP) && defined(QT_STYLE_WINDOWSXP)
++# undef QT_NO_STYLE_WINDOWSXP
++#elif !defined(QT_NO_STYLE_WINDOWSXP)
++# define QT_NO_STYLE_WINDOWSXP
++#endif
++
++#if defined(QT_NO_WEBKIT) && defined(QT_WEBKIT)
++# undef QT_NO_WEBKIT
++#elif !defined(QT_NO_WEBKIT)
++# define QT_NO_WEBKIT
++#endif
++
diff --git a/qt-win-configure.sh b/qt-win-configure.sh
new file mode 100755
index 0000000..42dfb81
--- /dev/null
+++ b/qt-win-configure.sh
@@ -0,0 +1,71 @@
+#!/bin/bash -
+
+# Before running this, you will need the following RPMs installed:
+#   . wine
+#   . qt-devel
+#   . mingw32-filesystem
+# and you need to have downloaded the source zip file.  Run this
+# command from the RPM SOURCES directory in order to (re-)create
+# qt-win-configure.patch
+
+# Notes:
+#   . -no-mmx is needed because we didn't enable MMX instructions
+#     when building GCC (I think?).  The error is:
+#     /usr/lib64/gcc/i686-pc-mingw32/4.3.2/include/mmintrin.h:35:3:
+#     error: #error "MMX instruction set not enabled"
+#   . Same as above for -no-sse and -no-sse2
+
+version=4.5.0
+platform=fedora-win32-cross
+
+set -e
+
+if [ ! -f qt-win-opensource-src-$version.zip -o \
+     ! -f qmake.conf -o \
+     ! -f qplatformdefs.h ]; then
+  echo "You're trying to run this from the wrong directory."
+  echo "Run it from the RPM SOURCES directory, or Fedora CVS checkout."
+  exit 1
+fi
+
+echo "Unpacking source file ... (this can take a minute or two)"
+
+srcdir=qt-win-opensource-src-$version
+
+rm -rf $srcdir.orig $srcdir
+
+unzip -qq qt-win-opensource-src-$version.zip
+cp -a $srcdir $srcdir.orig
+mkdir $srcdir/mkspecs/fedora-win32-cross
+cp qmake.conf qplatformdefs.h $srcdir/mkspecs/fedora-win32-cross
+
+cd $srcdir
+
+wine configure.exe \
+  -platform $platform \
+  -confirm-license \
+  -no-qmake \
+  -dont-process \
+  -prefix $(rpm --eval %{_mingw32_prefix}) \
+  -bindir $(rpm --eval %{_mingw32_bindir}) \
+  -datadir $(rpm --eval %{_mingw32_datadir}) \
+  -demosdir $(rpm --eval %{_mingw32_libdir})/qt4/demos \
+  -docdir $(rpm --eval %{_mingw32_docdir}) \
+  -examplesdir $(rpm --eval %{_mingw32_datadir})/qt4/examples \
+  -headerdir $(rpm --eval %{_mingw32_includedir}) \
+  -libdir $(rpm --eval %{_mingw32_libdir}) \
+  -plugindir $(rpm --eval %{_mingw32_libdir})/qt4/plugins \
+  -translationdir $(rpm --eval %{_mingw32_datadir})/qt4/translations \
+  -no-mmx -no-sse -no-sse2 \
+  -release \
+  -shared > configure.output 2>&1
+
+cd ..
+
+rm -r $srcdir/mkspecs/fedora-win32-cross
+
+diff -urN $srcdir.orig $srcdir > qt-win-configure.patch ||:
+
+rm -r $srcdir.orig $srcdir
+
+echo qt-win-configure.patch successfully updated


More information about the scm-commits mailing list