Working, but minimal Qt package.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 2 Feb 2009 15:21:40 +0000 (15:21 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 2 Feb 2009 15:21:40 +0000 (15:21 +0000)
.hgignore
qt-win/mingw32-qt-4.4.3-atomic-volatile.patch [new file with mode: 0644]
qt-win/mingw32-qt-4.4.3-no-fpu-functions.patch [new file with mode: 0644]
qt-win/mingw32-qt-4.4.3-wininput.patch [new file with mode: 0644]
qt-win/mingw32-qt-win.spec
qt-win/qmake.cache.in [new file with mode: 0644]
qt-win/qmake.conf [new file with mode: 0644]
qt-win/qplatformdefs.h [new file with mode: 0644]
qt-win/qt-win-configure.patch
qt-win/qt-win-configure.sh

index 8e2b21f..87433f5 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -128,6 +128,10 @@ portablexdr/portablexdr-4.0.11.tar.gz
 pthreads/pthreads-w32-2-8-0-release.tar.gz
 python/Python-2.5.2.tar.bz2
 qt-win/qt-win-opensource-src-4.4.3.zip
+qt-win/Makefile
+qt-win/Makefile.Debug
+qt-win/Makefile.Release
+qt-win/release
 readline/readline-5.2.tar.gz
 runtime-bootstrap/mingw-runtime-3.14.tar.gz
 runtime/mingw-runtime-3.14-src.tar.gz
diff --git a/qt-win/mingw32-qt-4.4.3-atomic-volatile.patch b/qt-win/mingw32-qt-4.4.3-atomic-volatile.patch
new file mode 100644 (file)
index 0000000..03efb4b
--- /dev/null
@@ -0,0 +1,20 @@
+diff -ur qt-win-opensource-src-4.4.3.orig/src/corelib/arch/qatomic_windows.h qt-win-opensource-src-4.4.3/src/corelib/arch/qatomic_windows.h
+--- qt-win-opensource-src-4.4.3.orig/src/corelib/arch/qatomic_windows.h        2008-09-27 10:00:54.000000000 +0100
++++ qt-win-opensource-src-4.4.3/src/corelib/arch/qatomic_windows.h     2009-02-02 11:07:19.000000000 +0000
+@@ -384,11 +384,11 @@
+ #else\r
\r
+ extern "C" {\r
+-    __declspec(dllimport) long __stdcall InterlockedCompareExchange(long *, long, long);\r
+-    __declspec(dllimport) long __stdcall InterlockedIncrement(long *);\r
+-    __declspec(dllimport) long __stdcall InterlockedDecrement(long *);\r
+-    __declspec(dllimport) long __stdcall InterlockedExchange(long *, long);\r
+-    __declspec(dllimport) long __stdcall InterlockedExchangeAdd(long *, long);\r
++    __declspec(dllimport) long __stdcall InterlockedCompareExchange(volatile long *, long, long);\r
++    __declspec(dllimport) long __stdcall InterlockedIncrement(volatile long *);\r
++    __declspec(dllimport) long __stdcall InterlockedDecrement(volatile long *);\r
++    __declspec(dllimport) long __stdcall InterlockedExchange(volatile long *, long);\r
++    __declspec(dllimport) long __stdcall InterlockedExchangeAdd(volatile long *, long);\r
+ }\r
\r
+ inline bool QBasicAtomicInt::ref()\r
diff --git a/qt-win/mingw32-qt-4.4.3-no-fpu-functions.patch b/qt-win/mingw32-qt-4.4.3-no-fpu-functions.patch
new file mode 100644 (file)
index 0000000..368f6e7
--- /dev/null
@@ -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 @@
\r
+ Q_CORE_EXPORT char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)\r
+ {\r
++    // RWMJ: The 8087-twiddling functions just don't seem to exist\r
++    // in MinGW cross-compiler, so comment out that code and hope for\r
++    // the best ...\r
++#if 0\r
+     // Some values of the floating-point control word can cause _qdtoa to crash with an underflow.\r
+     // We set a safe value here.\r
+ #ifdef Q_OS_WIN\r
+@@ -6257,9 +6261,11 @@
+     fenv_t envp;\r
+     feholdexcept(&envp);\r
+ #endif\r
++#endif\r
\r
+     char *s = _qdtoa(d, mode, ndigits, decpt, sign, rve, resultp);\r
\r
++#if 0 // RWMJ - see above.\r
+ #ifdef Q_OS_WIN\r
+     _clear87();\r
+ #ifndef _M_X64\r
+@@ -6272,6 +6278,7 @@
+ #if defined(Q_OS_LINUX) && !defined(__UCLIBC__)\r
+     fesetenv(&envp);\r
+ #endif\r
++#endif\r
\r
+     return s;\r
+ }\r
diff --git a/qt-win/mingw32-qt-4.4.3-wininput.patch b/qt-win/mingw32-qt-4.4.3-wininput.patch
new file mode 100644 (file)
index 0000000..38c4b8f
--- /dev/null
@@ -0,0 +1,13 @@
+diff -ur qt-win-opensource-src-4.4.3.orig/src/gui/inputmethod/qwininputcontext_win.cpp qt-win-opensource-src-4.4.3/src/gui/inputmethod/qwininputcontext_win.cpp
+--- qt-win-opensource-src-4.4.3.orig/src/gui/inputmethod/qwininputcontext_win.cpp      2008-09-27 10:00:55.000000000 +0100
++++ qt-win-opensource-src-4.4.3/src/gui/inputmethod/qwininputcontext_win.cpp   2009-02-02 12:19:10.000000000 +0000
+@@ -497,6 +497,9 @@
+ }\r
\r
\r
++// http://lists.trolltech.com/qt-interest/2008-05/thread00666-0.html\r
++extern bool qt_sendSpontaneousEvent(QObject *, QEvent *);\r
++\r
+ bool QWinInputContext::endComposition()\r
+ {\r
+     QWidget *fw = focusWidget();\r
index 814595f..f683582 100644 (file)
@@ -4,9 +4,20 @@
 %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
+
 Name:           mingw32-qt-win
 Version:        4.4.3
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Qt for Windows
 
 License:        GPLv2+
@@ -14,25 +25,49 @@ 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.
 #
-# The full configure command we ran is in qt-win-configure.sh.
+# Generate this patch using "qt-win-configure.sh".
 Patch0:         qt-win-configure.patch
 
+# The released source contains multiple, blatant build bugs which have
+# been fixed (further) upstream months ago.  Urgghhh.  These patches
+# fix them.
+Patch10:        mingw32-qt-4.4.3-atomic-volatile.patch
+Patch11:        mingw32-qt-4.4.3-no-fpu-functions.patch
+Patch12:        mingw32-qt-4.4.3-wininput.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 program.
+# For the native qmake, moc programs.
 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
@@ -45,19 +80,76 @@ Fedora Windows cross-compiler.
 
 %prep
 %setup -q -n qt-win-opensource-src-%{version}
+
 %patch0 -p1
 
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+
+for f in changes-%{version} LICENSE.GPL2 LICENSE.GPL3 GPL_EXCEPTION_ADDENDUM.TXT GPL_EXCEPTION.TXT OPENSOURCE-NOTICE.TXT README; do
+  dos2unix --keepdate $f
+done
+
+# Override the .qmake.cache file.
+rm .qmake.cache
+sed -e s,@builddir@,$(pwd),g < %{SOURCE2} > .qmake.cache
+
+# Cross-compilation qmake target.
+mkdir mkspecs/fedora-win32-cross
+cp %{SOURCE3} %{SOURCE4} mkspecs/fedora-win32-cross
+
 
 %build
-make %{?_smp_mflags}
+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
+done
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT install
 
-# Remove static libraries but DON'T remove *.dll.a files.
-rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a
+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
+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
@@ -66,12 +158,26 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
-%doc LICENSE
-%{_mingw32_bindir}/foo.dll
-%{_mingw32_libdir}/foo.dll.a
-# etc.
+%doc changes-%{version} configure.output
+%doc LICENSE.GPL2 LICENSE.GPL3 GPL_EXCEPTION_ADDENDUM.TXT GPL_EXCEPTION.TXT
+%doc OPENSOURCE-NOTICE.TXT README
+%{_mingw32_bindir}/QtCore4.dll
+%{_mingw32_bindir}/QtGui4.dll
+%{_mingw32_bindir}/QtNetwork4.dll
+%{_mingw32_bindir}/QtXml4.dll
+%{_mingw32_libdir}/libQtCore4.a
+%{_mingw32_libdir}/libQtGui4.a
+%{_mingw32_libdir}/libQtNetwork4.a
+%{_mingw32_libdir}/libQtXml4.a
+%{_mingw32_libdir}/libqtmain.a
+%{_mingw32_includedir}/Qt/
+%{_mingw32_includedir}/QtCore/
+%{_mingw32_includedir}/QtGui/
+%{_mingw32_includedir}/QtNetwork/
+%{_mingw32_includedir}/QtXml/
+%{_libdir}/qt4/mkspecs/fedora-win32-cross
 
 
 %changelog
-* Sun Feb  1 2009 Richard W.M. Jones <rjones@redhat.com> - 4.4.3-1
+* Sun Feb  1 2009 Richard W.M. Jones <rjones@redhat.com> - 4.4.3-2
 - Initial RPM release.
diff --git a/qt-win/qmake.cache.in b/qt-win/qmake.cache.in
new file mode 100644 (file)
index 0000000..587b1dd
--- /dev/null
@@ -0,0 +1,20 @@
+QMAKE_QT_VERSION_OVERRIDE = 4\r
+OBJECTS_DIR     = @builddir@/tmp/obj/release_shared\r
+MOC_DIR         = @builddir@/tmp/moc/release_shared\r
+RCC_DIR         = @builddir@/tmp/rcc/release_shared\r
+sql-plugins    += sqlite\r
+styles         += windows plastique cleanlooks motif cde\r
+imageformat-plugins += gif tiff jpeg\r
+CONFIG         += dist-config large-config medium-config minimal-config small-config full-config release incremental create_prl link_prl depend_includepath QTDIR_build\r
+QT_BUILD_PARTS  = libs tools examples demos docs translations\r
+QMAKESPEC       = @builddir@/mkspecs/fedora-win32-cross\r
+ARCH            = windows\r
+QT_BUILD_TREE   = @builddir@\r
+QT_SOURCE_TREE  = @builddir@\r
+QMAKE_MOC       = moc-qt4\r
+QMAKE_UIC       = uic-qt4\r
+QMAKE_UIC3      = uic3\r
+QMAKE_RCC       = rcc\r
+QMAKE_DUMPCPP   = dumpcpp\r
+QMAKE_INCDIR_QT = $$QT_BUILD_TREE/include\r
+QMAKE_LIBDIR_QT = $$QT_BUILD_TREE/lib\r
diff --git a/qt-win/qmake.conf b/qt-win/qmake.conf
new file mode 100644 (file)
index 0000000..1581323
--- /dev/null
@@ -0,0 +1,107 @@
+#\r
+# qmake configuration for fedora-win32-cross\r
+# (Fedora Windows cross-compiler)\r
+# by Richard W.M. Jones (rjones@redhat.com)\r
+#\r
+# Written for MinGW\r
+#\r
+\r
+MAKEFILE_GENERATOR     = MINGW\r
+TEMPLATE               = app\r
+CONFIG                 += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header\r
+QT                     += core gui\r
+DEFINES                        += UNICODE QT_LARGEFILE_SUPPORT\r
+QMAKE_COMPILER_DEFINES  += __GNUC__ WIN32\r
+\r
+QMAKE_EXT_OBJ           = .o\r
+QMAKE_EXT_RES           = _res.o\r
+\r
+QMAKE_CC               = i686-pc-mingw32-gcc\r
+QMAKE_LEX              = flex\r
+QMAKE_LEXFLAGS         =\r
+QMAKE_YACC             = byacc\r
+QMAKE_YACCFLAGS                = -d\r
+QMAKE_CFLAGS           = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 --param=ssp-buffer-size=4 -mms-bitfields\r
+QMAKE_CFLAGS_DEPS      = -M\r
+QMAKE_CFLAGS_WARN_ON   = -Wall\r
+QMAKE_CFLAGS_WARN_OFF  = -w\r
+QMAKE_CFLAGS_RELEASE   = -O2\r
+QMAKE_CFLAGS_DEBUG     = -g\r
+QMAKE_CFLAGS_YACC      = -Wno-unused -Wno-parentheses\r
+\r
+QMAKE_CXX              = i686-pc-mingw32-g++\r
+QMAKE_CXXFLAGS         = $$QMAKE_CFLAGS\r
+QMAKE_CXXFLAGS_DEPS    = $$QMAKE_CFLAGS_DEPS\r
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON\r
+QMAKE_CXXFLAGS_WARN_OFF        = $$QMAKE_CFLAGS_WARN_OFF\r
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE\r
+QMAKE_CXXFLAGS_DEBUG   = $$QMAKE_CFLAGS_DEBUG\r
+QMAKE_CXXFLAGS_YACC    = $$QMAKE_CFLAGS_YACC\r
+QMAKE_CXXFLAGS_THREAD  = $$QMAKE_CFLAGS_THREAD\r
+QMAKE_CXXFLAGS_RTTI_ON = -frtti\r
+QMAKE_CXXFLAGS_RTTI_OFF        = -fno-rtti\r
+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads\r
+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions\r
+\r
+QMAKE_INCDIR           =\r
+#QMAKE_INCDIR_QT               = $$[QT_INSTALL_HEADERS]\r
+QMAKE_INCDIR_QT         = /usr/i686-pc-mingw32/sys-root/mingw/include\r
+#QMAKE_LIBDIR_QT               = $$[QT_INSTALL_LIBS]\r
+QMAKE_LIBDIR_QT         = /usr/i686-pc-mingw32/sys-root/mingw/lib\r
+\r
+QMAKE_RUN_CC           = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src\r
+QMAKE_RUN_CC_IMP       = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<\r
+QMAKE_RUN_CXX          = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src\r
+QMAKE_RUN_CXX_IMP      = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<\r
+\r
+QMAKE_LINK             = i686-pc-mingw32-g++\r
+QMAKE_LFLAGS           = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc\r
+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl\r
+QMAKE_LFLAGS_EXCEPTIONS_OFF =\r
+QMAKE_LFLAGS_RELEASE   = -Wl,-s\r
+QMAKE_LFLAGS_DEBUG     =\r
+QMAKE_LFLAGS_CONSOLE   = -Wl,-subsystem,console\r
+QMAKE_LFLAGS_WINDOWS   = -Wl,-subsystem,windows\r
+QMAKE_LFLAGS_DLL        = -shared\r
+QMAKE_LINK_OBJECT_MAX  = 10\r
+QMAKE_LINK_OBJECT_SCRIPT= object_script\r
+\r
+\r
+QMAKE_LIBS             =\r
+QMAKE_LIBS_CORE         = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32\r
+QMAKE_LIBS_GUI          = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32\r
+QMAKE_LIBS_NETWORK      = -lws2_32\r
+QMAKE_LIBS_OPENGL       = -lopengl32 -lglu32 -lgdi32 -luser32\r
+QMAKE_LIBS_COMPAT       = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32\r
+QMAKE_LIBS_QT_ENTRY     = -lmingw32 -lqtmain\r
+\r
+QMAKE_DIR_SEP         = /\r
+QMAKE_COPY            = cp -f\r
+QMAKE_COPY_FILE       = $(COPY)\r
+QMAKE_COPY_DIR        = $(COPY) -a\r
+QMAKE_MOVE            = mv -f\r
+QMAKE_DEL_FILE        = rm -f\r
+QMAKE_DEL_DIR         = rmdir\r
+QMAKE_STRIP           = strip\r
+QMAKE_STRIPFLAGS_LIB += --strip-unneeded\r
+QMAKE_INSTALL_FILE    = install -m 644 -p\r
+QMAKE_INSTALL_PROGRAM = install -m 755 -p\r
+\r
+# "qmake -win32" always appears to generate code like this:\r
+#   $(CHK_DIR_EXISTS) somedir $(MKDIR) somedir\r
+# We can't write a Unix macro that is compatible, so we have to hack it:\r
+QMAKE_CHK_DIR_EXISTS  = mkdir -p\r
+QMAKE_MKDIR           = \r
+\r
+QMAKE_MOC              = moc-qt4\r
+QMAKE_UIC              = uic-qt4\r
+QMAKE_IDC              = idc\r
+\r
+QMAKE_IDL              = midl\r
+QMAKE_LIB              = i686-pc-mingw32-ar -ru\r
+QMAKE_RC               = i686-pc-mingw32-windres\r
+QMAKE_ZIP              = zip -r -9\r
+\r
+QMAKE_STRIP            = strip\r
+QMAKE_STRIPFLAGS_LIB   += --strip-unneeded\r
+load(qt_config)\r
diff --git a/qt-win/qplatformdefs.h b/qt-win/qplatformdefs.h
new file mode 100644 (file)
index 0000000..30e5945
--- /dev/null
@@ -0,0 +1,160 @@
+/****************************************************************************\r
+**\r
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).\r
+** Contact: Qt Software Information (qt-info@nokia.com)\r
+**\r
+** This file is part of the qmake spec of the Qt Toolkit.\r
+**\r
+** Commercial Usage\r
+** Licensees holding valid Qt Commercial licenses may use this file in\r
+** accordance with the Qt Commercial License Agreement provided with the\r
+** Software or, alternatively, in accordance with the terms contained in\r
+** a written agreement between you and Nokia.\r
+**\r
+**\r
+** GNU General Public License Usage\r
+** Alternatively, this file may be used under the terms of the GNU\r
+** General Public License versions 2.0 or 3.0 as published by the Free\r
+** Software Foundation and appearing in the file LICENSE.GPL included in\r
+** the packaging of this file.  Please review the following information\r
+** to ensure GNU General Public Licensing requirements will be met:\r
+** http://www.fsf.org/licensing/licenses/info/GPLv2.html and\r
+** http://www.gnu.org/copyleft/gpl.html.  In addition, as a special\r
+** exception, Nokia gives you certain additional rights. These rights\r
+** are described in the Nokia Qt GPL Exception version 1.3, included in\r
+** the file GPL_EXCEPTION.txt in this package.\r
+**\r
+** Qt for Windows(R) Licensees\r
+** As a special exception, Nokia, as the sole copyright holder for Qt\r
+** Designer, grants users of the Qt/Eclipse Integration plug-in the\r
+** right for the Qt/Eclipse Integration to link to functionality\r
+** provided by Qt Designer and its related libraries.\r
+**\r
+** If you are unsure which license is appropriate for your use, please\r
+** contact the sales department at qt-sales@nokia.com.\r
+**\r
+****************************************************************************/\r
+\r
+#ifndef QPLATFORMDEFS_H\r
+#define QPLATFORMDEFS_H\r
+\r
+#ifdef UNICODE\r
+#ifndef _UNICODE\r
+#define _UNICODE\r
+#endif\r
+#endif\r
+\r
+// Get Qt defines/settings\r
+\r
+#include "qglobal.h"\r
+\r
+#include <tchar.h>\r
+#include <io.h>\r
+#include <direct.h>\r
+#include <stdio.h>\r
+#include <fcntl.h>\r
+#include <errno.h>\r
+#include <sys/stat.h>\r
+#include <stdlib.h>\r
+#include <windows.h>\r
+#include <limits.h>\r
+\r
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)\r
+typedef enum {\r
+    NameUnknown                  = 0, \r
+    NameFullyQualifiedDN  = 1, \r
+    NameSamCompatible    = 2, \r
+    NameDisplay                  = 3, \r
+    NameUniqueId         = 6, \r
+    NameCanonical        = 7, \r
+    NameUserPrincipal    = 8, \r
+    NameCanonicalEx      = 9, \r
+    NameServicePrincipal  = 10, \r
+    NameDnsDomain        = 12\r
+} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;\r
+#endif\r
+\r
+#define Q_FS_FAT\r
+#ifdef QT_LARGEFILE_SUPPORT\r
+#define QT_STATBUF             struct _stati64         // non-ANSI defs\r
+#define QT_STATBUF4TSTAT       struct _stati64         // non-ANSI defs\r
+#define QT_STAT                        ::_stati64\r
+#define QT_FSTAT               ::_fstati64\r
+#else\r
+#define QT_STATBUF             struct _stat            // non-ANSI defs\r
+#define QT_STATBUF4TSTAT       struct _stat            // non-ANSI defs\r
+#define QT_STAT                        ::_stat\r
+#define QT_FSTAT               ::_fstat\r
+#endif\r
+#define QT_STAT_REG            _S_IFREG\r
+#define QT_STAT_DIR            _S_IFDIR\r
+#define QT_STAT_MASK           _S_IFMT\r
+#if defined(_S_IFLNK)\r
+#  define QT_STAT_LNK          _S_IFLNK\r
+#endif\r
+#define QT_FILENO              _fileno\r
+#define QT_OPEN                        ::_open\r
+#define QT_CLOSE               ::_close\r
+#ifdef QT_LARGEFILE_SUPPORT\r
+#define QT_LSEEK               ::_lseeki64\r
+#ifndef UNICODE\r
+#define QT_TSTAT               ::_stati64\r
+#else\r
+#define QT_TSTAT               ::_wstati64\r
+#endif\r
+#else\r
+#define QT_LSEEK               ::_lseek\r
+#ifndef UNICODE\r
+#define QT_TSTAT               ::_stat\r
+#else\r
+#define QT_TSTAT               ::_wstat\r
+#endif\r
+#endif\r
+#define QT_READ                        ::_read\r
+#define QT_WRITE               ::_write\r
+#define QT_ACCESS              ::_access\r
+#define QT_GETCWD              ::_getcwd\r
+#define QT_CHDIR               ::_chdir\r
+#define QT_MKDIR               ::_mkdir\r
+#define QT_RMDIR               ::_rmdir\r
+#define QT_OPEN_LARGEFILE       0\r
+#define QT_OPEN_RDONLY         _O_RDONLY\r
+#define QT_OPEN_WRONLY         _O_WRONLY\r
+#define QT_OPEN_RDWR           _O_RDWR\r
+#define QT_OPEN_CREAT          _O_CREAT\r
+#define QT_OPEN_TRUNC          _O_TRUNC\r
+#define QT_OPEN_APPEND         _O_APPEND\r
+#if defined(O_TEXT)\r
+# define QT_OPEN_TEXT          _O_TEXT\r
+# define QT_OPEN_BINARY                _O_BINARY\r
+#endif\r
+\r
+#define QT_FOPEN                ::fopen\r
+#ifdef QT_LARGEFILE_SUPPORT\r
+#define QT_FSEEK                ::fseeko64\r
+#define QT_FTELL                ::ftello64\r
+#else\r
+#define QT_FSEEK                ::fseek\r
+#define QT_FTELL                ::ftell\r
+#endif\r
+#define QT_FGETPOS              ::fgetpos\r
+#define QT_FSETPOS              ::fsetpos\r
+#define QT_FPOS_T               fpos_t\r
+#ifdef QT_LARGEFILE_SUPPORT\r
+#define QT_OFF_T                off64_t\r
+#else\r
+#define QT_OFF_T                long\r
+#endif\r
+\r
+#define QT_SIGNAL_ARGS         int\r
+\r
+#define QT_VSNPRINTF           ::_vsnprintf\r
+#define QT_SNPRINTF            ::_snprintf\r
+\r
+# define F_OK  0\r
+# define X_OK  1\r
+# define W_OK  2\r
+# define R_OK  4\r
+\r
+\r
+#endif // QPLATFORMDEFS_H\r
index 6fe0868..f2cc53f 100644 (file)
@@ -1,9 +1,9 @@
 diff -urN qt-win-opensource-src-4.4.3.orig/configure.cache qt-win-opensource-src-4.4.3/configure.cache
 --- qt-win-opensource-src-4.4.3.orig/configure.cache   1970-01-01 01:00:00.000000000 +0100
-+++ qt-win-opensource-src-4.4.3/configure.cache        2009-02-01 23:43:14.000000000 +0000
-@@ -0,0 +1,27 @@
++++ qt-win-opensource-src-4.4.3/configure.cache        2009-02-02 14:39:05.000000000 +0000
+@@ -0,0 +1,30 @@
 +-platform \r
-+win32-g++ \r
++fedora-win32-cross \r
 +-confirm-license \r
 +-no-qmake \r
 +-dont-process \r
@@ -27,24 +27,152 @@ diff -urN qt-win-opensource-src-4.4.3.orig/configure.cache qt-win-opensource-src
 +/usr/i686-pc-mingw32/sys-root/mingw/lib/qt4/plugins \r
 +-translationdir \r
 +/usr/i686-pc-mingw32/sys-root/mingw/share/qt4/translations \r
++-no-mmx \r
++-no-sse \r
++-no-sse2 \r
 +-release \r
 +-shared \r
+diff -urN qt-win-opensource-src-4.4.3.orig/configure.output qt-win-opensource-src-4.4.3/configure.output
+--- qt-win-opensource-src-4.4.3.orig/configure.output  1970-01-01 01:00:00.000000000 +0100
++++ qt-win-opensource-src-4.4.3/configure.output       2009-02-02 14:39:05.000000000 +0000
+@@ -0,0 +1,119 @@
++Xlib:  extension "Generic Event Extension" missing on display "localhost:10.0".
++\r
++This is the Qt for Windows Open Source Edition.\r
++\r
++You have already accepted the terms of the license.\r
++\r
++Setting Direct3D to NO, since the proper Direct3D SDK was not detected.\r
++Make sure you have the Direct3D SDK installed, and that you have run\r
++the <path to SDK>\Utilities\Bin\dx_setenv.cmd script.\r
++The D3D SDK library path *needs* to appear before the Platform SDK library\r
++path in your LIB environment variable.\r
++All the required DirectShow/Direct3D files couldn't be found.\r
++Make sure you have either the platform SDK AND the DirectX SDK or the Windows SDK installed.\r
++If you have the DirectX SDK installed, please make sure that you have run the <path to SDK>\SetEnv.Cmd script.\r
++Environment:\r
++    INCLUDE=\r\r
++      Unset\r
++    LIB=\r\r
++      Unset\r
++    PATH=\r\r
++      C:\windows\system32\r\r
++      C:\windows\r\r
++      Z:\usr\i686-pc-mingw32\sys-root\mingw\bin\r
++You are licensed to use this software under the terms of the GNU GPL version 2 or 3.\r
++See Z:/home/rjones/d/fedora-mingw--devel/qt-win/qt-win-opensource-src-4.4.3/LICENSE.GPL2\r
++ or Z:/home/rjones/d/fedora-mingw--devel/qt-win/qt-win-opensource-src-4.4.3/LICENSE.GPL3\r
++\r
++Configuration:\r
++    dist-config\r\r
++    large-config\r\r
++    medium-config\r\r
++    minimal-config\r\r
++    small-config\r\r
++    full-config\r\r
++    release\r
++Qt Configuration:\r
++    release\r\r
++    zlib\r\r
++    png\r\r
++    accessibility\r\r
++    qt3support\r\r
++    opengl\r\r
++    ipv6\r\r
++    xmlpatterns\r\r
++    svg\r\r
++    minimal-config\r\r
++    small-config\r\r
++    medium-config\r\r
++    large-config\r\r
++    full-config\r
++\r
++QMAKESPEC...................fedora-win32-cross (commandline)\r
++Architecture................windows\r
++Maketool....................make\r
++Debug symbols...............no\r
++Accessibility support.......yes\r
++STL support.................yes\r
++Exception support...........yes\r
++RTTI support................yes\r
++MMX support.................no\r
++3DNOW support...............no\r
++SSE support.................no\r
++SSE2 support................no\r
++IWMMXT support..............no\r
++OpenGL support..............yes\r
++Direct3D support............no\r
++OpenSSL support.............no\r
++QtDBus support..............no\r
++QtXmlPatterns support.......yes\r
++Phonon support..............no\r
++WebKit support..............no\r
++Qt3 compatibility...........yes\r
++\r
++Third Party Libraries:\r
++    ZLIB support............qt\r
++    GIF support.............plugin\r
++    TIFF support............plugin\r
++    JPEG support............plugin\r
++    PNG support.............qt\r
++    MNG support.............plugin\r
++\r
++Styles:\r
++    Windows.................yes\r
++    Windows XP..............no\r
++    Windows Vista...........no\r
++    Plastique...............yes\r
++    Cleanlooks..............yes\r
++    Motif...................yes\r
++    CDE.....................yes\r
++    Windows CE..............no\r
++    Windows Mobile..........no\r
++\r
++Sql Drivers:\r
++    ODBC....................no\r
++    MySQL...................no\r
++    OCI.....................no\r
++    PostgreSQL..............no\r
++    TDS.....................no\r
++    DB2.....................no\r
++    SQLite..................plugin (qt)\r
++    SQLite2.................no\r
++    InterBase...............no\r
++\r
++Sources are in..............Z:\home\rjones\d\fedora-mingw--devel\qt-win\qt-win-opensource-src-4.4.3\r
++Build is done in............Z:\home\rjones\d\fedora-mingw--devel\qt-win\qt-win-opensource-src-4.4.3\r
++Install prefix............../usr/i686-pc-mingw32/sys-root/mingw\r
++Headers installed to......../usr/i686-pc-mingw32/sys-root/mingw/include\r
++Libraries installed to....../usr/i686-pc-mingw32/sys-root/mingw/lib\r
++Plugins installed to......../usr/i686-pc-mingw32/sys-root/mingw/lib/qt4/plugins\r
++Binaries installed to......./usr/i686-pc-mingw32/sys-root/mingw/bin\r
++Docs installed to.........../usr/i686-pc-mingw32/sys-root/mingw/share/doc\r
++Data installed to.........../usr/i686-pc-mingw32/sys-root/mingw/share\r
++Translations installed to.../usr/i686-pc-mingw32/sys-root/mingw/share/qt4/translations\r
++Examples installed to......./usr/i686-pc-mingw32/sys-root/mingw/share/qt4/examples\r
++Demos installed to........../usr/i686-pc-mingw32/sys-root/mingw/lib/qt4/demos\r
++\r
++Processing of project files have been disabled.\r
++Only use this option if you really know what you're doing.\r
++\r
 diff -urN qt-win-opensource-src-4.4.3.orig/include/Qt/qconfig.h qt-win-opensource-src-4.4.3/include/Qt/qconfig.h
 --- qt-win-opensource-src-4.4.3.orig/include/Qt/qconfig.h      1970-01-01 01:00:00.000000000 +0100
-+++ qt-win-opensource-src-4.4.3/include/Qt/qconfig.h   2009-02-01 23:43:14.000000000 +0000
++++ qt-win-opensource-src-4.4.3/include/Qt/qconfig.h   2009-02-02 14:39:05.000000000 +0000
 @@ -0,0 +1 @@
 +#include "../../src/corelib/global/qconfig.h"
 diff -urN qt-win-opensource-src-4.4.3.orig/include/QtCore/qconfig.h qt-win-opensource-src-4.4.3/include/QtCore/qconfig.h
 --- qt-win-opensource-src-4.4.3.orig/include/QtCore/qconfig.h  1970-01-01 01:00:00.000000000 +0100
-+++ qt-win-opensource-src-4.4.3/include/QtCore/qconfig.h       2009-02-01 23:43:14.000000000 +0000
++++ qt-win-opensource-src-4.4.3/include/QtCore/qconfig.h       2009-02-02 14:39:05.000000000 +0000
 @@ -0,0 +1 @@
 +#include "../../src/corelib/global/qconfig.h"
 diff -urN qt-win-opensource-src-4.4.3.orig/mkspecs/default/qmake.conf qt-win-opensource-src-4.4.3/mkspecs/default/qmake.conf
 --- qt-win-opensource-src-4.4.3.orig/mkspecs/default/qmake.conf        1970-01-01 01:00:00.000000000 +0100
-+++ qt-win-opensource-src-4.4.3/mkspecs/default/qmake.conf     2009-02-01 23:43:14.000000000 +0000
-@@ -0,0 +1,107 @@
++++ qt-win-opensource-src-4.4.3/mkspecs/default/qmake.conf     2009-02-02 14:39:05.000000000 +0000
+@@ -0,0 +1,109 @@
 +#\r
-+# qmake configuration for win32-g++\r
++# qmake configuration for fedora-win32-cross\r
++# (Fedora Windows cross-compiler)\r
++# by Richard W.M. Jones (rjones@redhat.com)\r
 +#\r
 +# Written for MinGW\r
 +#\r
@@ -59,12 +187,12 @@ diff -urN qt-win-opensource-src-4.4.3.orig/mkspecs/default/qmake.conf qt-win-ope
 +QMAKE_EXT_OBJ           = .o\r
 +QMAKE_EXT_RES           = _res.o\r
 +\r
-+QMAKE_CC              = gcc\r
++QMAKE_CC              = i686-pc-mingw32-gcc\r
 +QMAKE_LEX             = flex\r
 +QMAKE_LEXFLAGS                =\r
 +QMAKE_YACC            = byacc\r
 +QMAKE_YACCFLAGS               = -d\r
-+QMAKE_CFLAGS          =\r
++QMAKE_CFLAGS          = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 --param=ssp-buffer-size=4 -mms-bitfields\r
 +QMAKE_CFLAGS_DEPS     = -M\r
 +QMAKE_CFLAGS_WARN_ON  = -Wall\r
 +QMAKE_CFLAGS_WARN_OFF = -w\r
@@ -72,7 +200,7 @@ diff -urN qt-win-opensource-src-4.4.3.orig/mkspecs/default/qmake.conf qt-win-ope
 +QMAKE_CFLAGS_DEBUG    = -g\r
 +QMAKE_CFLAGS_YACC     = -Wno-unused -Wno-parentheses\r
 +\r
-+QMAKE_CXX             = g++\r
++QMAKE_CXX             = i686-pc-mingw32-g++\r
 +QMAKE_CXXFLAGS                = $$QMAKE_CFLAGS\r
 +QMAKE_CXXFLAGS_DEPS   = $$QMAKE_CFLAGS_DEPS\r
 +QMAKE_CXXFLAGS_WARN_ON        = $$QMAKE_CFLAGS_WARN_ON\r
@@ -87,15 +215,17 @@ diff -urN qt-win-opensource-src-4.4.3.orig/mkspecs/default/qmake.conf qt-win-ope
 +QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions\r
 +\r
 +QMAKE_INCDIR          =\r
-+QMAKE_INCDIR_QT               = $$[QT_INSTALL_HEADERS]\r
-+QMAKE_LIBDIR_QT               = $$[QT_INSTALL_LIBS]\r
++#QMAKE_INCDIR_QT              = $$[QT_INSTALL_HEADERS]\r
++QMAKE_INCDIR_QT         = /usr/i686-pc-mingw32/sys-root/mingw/include\r
++#QMAKE_LIBDIR_QT              = $$[QT_INSTALL_LIBS]\r
++QMAKE_LIBDIR_QT         = /usr/i686-pc-mingw32/sys-root/mingw/lib\r
 +\r
 +QMAKE_RUN_CC          = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src\r
 +QMAKE_RUN_CC_IMP      = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<\r
 +QMAKE_RUN_CXX         = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src\r
 +QMAKE_RUN_CXX_IMP     = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<\r
 +\r
-+QMAKE_LINK            = g++\r
++QMAKE_LINK            = i686-pc-mingw32-g++\r
 +QMAKE_LFLAGS          = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc\r
 +QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl\r
 +QMAKE_LFLAGS_EXCEPTIONS_OFF =\r
@@ -116,43 +246,41 @@ diff -urN qt-win-opensource-src-4.4.3.orig/mkspecs/default/qmake.conf qt-win-ope
 +QMAKE_LIBS_COMPAT       = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32\r
 +QMAKE_LIBS_QT_ENTRY     = -lmingw32 -lqtmain\r
 +\r
-+!isEmpty(QMAKE_SH) {\r
-+    MINGW_IN_SHELL      = 1\r
-+      QMAKE_DIR_SEP           = /\r
-+      QMAKE_COPY              = cp\r
-+      QMAKE_COPY_DIR          = xcopy /s /q /y /i\r
-+      QMAKE_MOVE              = mv\r
-+      QMAKE_DEL_FILE          = rm\r
-+      QMAKE_MKDIR             = mkdir\r
-+      QMAKE_DEL_DIR           = rmdir\r
-+    QMAKE_CHK_DIR_EXISTS = test -d\r
-+} else {\r
-+      QMAKE_COPY              = copy /y\r
-+      QMAKE_COPY_DIR          = xcopy /s /q /y /i\r
-+      QMAKE_MOVE              = move\r
-+      QMAKE_DEL_FILE          = del\r
-+      QMAKE_MKDIR             = mkdir\r
-+      QMAKE_DEL_DIR           = rmdir\r
-+    QMAKE_CHK_DIR_EXISTS      = if not exist\r
-+}\r
-+\r
-+QMAKE_MOC             = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe\r
-+QMAKE_UIC             = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe\r
-+QMAKE_IDC             = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe\r
++QMAKE_DIR_SEP         = /\r
++QMAKE_COPY            = cp -f\r
++QMAKE_COPY_FILE       = $(COPY)\r
++QMAKE_COPY_DIR        = $(COPY) -a\r
++QMAKE_MOVE            = mv -f\r
++QMAKE_DEL_FILE        = rm -f\r
++QMAKE_DEL_DIR         = rmdir\r
++QMAKE_STRIP           = strip\r
++QMAKE_STRIPFLAGS_LIB += --strip-unneeded\r
++QMAKE_INSTALL_FILE    = install -m 644 -p\r
++QMAKE_INSTALL_PROGRAM = install -m 755 -p\r
++\r
++# "qmake -win32" always appears to generate code like this:\r
++#   $(CHK_DIR_EXISTS) somedir $(MKDIR) somedir\r
++# We can't write a Unix macro that is compatible, so we have to hack it:\r
++QMAKE_CHK_DIR_EXISTS  = mkdir -p\r
++QMAKE_MKDIR           = \r
++\r
++QMAKE_MOC             = moc-qt4\r
++QMAKE_UIC             = uic-qt4\r
++QMAKE_IDC             = idc\r
 +\r
 +QMAKE_IDL             = midl\r
-+QMAKE_LIB             = ar -ru\r
-+QMAKE_RC              = windres\r
++QMAKE_LIB             = i686-pc-mingw32-ar -ru\r
++QMAKE_RC              = i686-pc-mingw32-windres\r
 +QMAKE_ZIP             = zip -r -9\r
 +\r
 +QMAKE_STRIP           = strip\r
 +QMAKE_STRIPFLAGS_LIB  += --strip-unneeded\r
 +load(qt_config)\r
 +\r
-+QMAKESPEC_ORIGINAL=Z:/tmp/qt-win-opensource-src-4.4.3/mkspecs/win32-g++\r
++QMAKESPEC_ORIGINAL=Z:/home/rjones/d/fedora-mingw--devel/qt-win/qt-win-opensource-src-4.4.3/mkspecs/fedora-win32-cross\r
 diff -urN qt-win-opensource-src-4.4.3.orig/mkspecs/default/qplatformdefs.h qt-win-opensource-src-4.4.3/mkspecs/default/qplatformdefs.h
 --- qt-win-opensource-src-4.4.3.orig/mkspecs/default/qplatformdefs.h   1970-01-01 01:00:00.000000000 +0100
-+++ qt-win-opensource-src-4.4.3/mkspecs/default/qplatformdefs.h        2008-09-27 10:00:52.000000000 +0100
++++ qt-win-opensource-src-4.4.3/mkspecs/default/qplatformdefs.h        2009-02-02 14:39:01.000000000 +0000
 @@ -0,0 +1,160 @@
 +/****************************************************************************\r
 +**\r
@@ -316,12 +444,12 @@ diff -urN qt-win-opensource-src-4.4.3.orig/mkspecs/default/qplatformdefs.h qt-wi
 +#endif // QPLATFORMDEFS_H\r
 diff -urN qt-win-opensource-src-4.4.3.orig/mkspecs/qconfig.pri qt-win-opensource-src-4.4.3/mkspecs/qconfig.pri
 --- qt-win-opensource-src-4.4.3.orig/mkspecs/qconfig.pri       1970-01-01 01:00:00.000000000 +0100
-+++ qt-win-opensource-src-4.4.3/mkspecs/qconfig.pri    2009-02-01 23:43:14.000000000 +0000
++++ qt-win-opensource-src-4.4.3/mkspecs/qconfig.pri    2009-02-02 14:39:05.000000000 +0000
 @@ -0,0 +1,11 @@
 +CONFIG+= release shared stl exceptions rtti\r
 +QT_ARCH = windows\r
 +QT_EDITION = OpenSource\r
-+QT_CONFIG += release zlib png accessibility qt3support opengl ipv6 xmlpatterns webkit svg minimal-config small-config medium-config large-config full-config\r
++QT_CONFIG += release zlib png accessibility qt3support opengl ipv6 xmlpatterns svg minimal-config small-config medium-config large-config full-config\r
 +#versioning \r
 +QT_VERSION = 4.4.3\r
 +QT_MAJOR_VERSION = 4\r
@@ -331,35 +459,31 @@ diff -urN qt-win-opensource-src-4.4.3.orig/mkspecs/qconfig.pri qt-win-opensource
 +QT_CE_C_RUNTIME = no\r
 diff -urN qt-win-opensource-src-4.4.3.orig/.qmake.cache qt-win-opensource-src-4.4.3/.qmake.cache
 --- qt-win-opensource-src-4.4.3.orig/.qmake.cache      1970-01-01 01:00:00.000000000 +0100
-+++ qt-win-opensource-src-4.4.3/.qmake.cache   2009-02-01 23:43:14.000000000 +0000
-@@ -0,0 +1,24 @@
++++ qt-win-opensource-src-4.4.3/.qmake.cache   2009-02-02 14:39:05.000000000 +0000
+@@ -0,0 +1,20 @@
 +QMAKE_QT_VERSION_OVERRIDE = 4\r
-+OBJECTS_DIR     = tmp/obj/release_shared\r
-+MOC_DIR         = tmp/moc/release_shared\r
-+RCC_DIR         = tmp/rcc/release_shared\r
++OBJECTS_DIR     = tmp\obj\release_shared\r
++MOC_DIR         = tmp\moc\release_shared\r
++RCC_DIR         = tmp\rcc\release_shared\r
 +sql-plugins    += sqlite\r
-+styles         += windows plastique cleanlooks windowsxp windowsvista motif cde\r
++styles         += windows plastique cleanlooks motif cde\r
 +imageformat-plugins += gif tiff jpeg\r
-+TMPPATH            = $$quote($$(INCLUDE))\r
-+QMAKE_INCDIR_POST += $$split(TMPPATH,";")\r
-+TMPPATH            = $$quote($$(LIB))\r
-+QMAKE_LIBDIR_POST += $$split(TMPPATH,";")\r
 +CONFIG         += dist-config large-config medium-config minimal-config small-config full-config release incremental create_prl link_prl depend_includepath QTDIR_build\r
 +QT_BUILD_PARTS  = libs tools examples demos docs translations\r
-+QMAKESPEC       = Z:/tmp/qt-win-opensource-src-4.4.3/mkspecs/win32-g++\r
++QMAKESPEC       = Z:\home\rjones\d\fedora-mingw--devel\qt-win\qt-win-opensource-src-4.4.3\mkspecs\fedora-win32-cross\r
 +ARCH            = windows\r
-+QT_BUILD_TREE   = Z:/tmp/qt-win-opensource-src-4.4.3\r
-+QT_SOURCE_TREE  = Z:/tmp/qt-win-opensource-src-4.4.3\r
-+QMAKE_MOC       = $$QT_BUILD_TREE/bin/moc.exe\r
-+QMAKE_UIC       = $$QT_BUILD_TREE/bin/uic.exe\r
-+QMAKE_UIC3      = $$QT_BUILD_TREE/bin/uic3.exe\r
-+QMAKE_RCC       = $$QT_BUILD_TREE/bin/rcc.exe\r
-+QMAKE_DUMPCPP   = $$QT_BUILD_TREE/bin/dumpcpp.exe\r
-+QMAKE_INCDIR_QT = $$QT_BUILD_TREE/include\r
-+QMAKE_LIBDIR_QT = $$QT_BUILD_TREE/lib\r
++QT_BUILD_TREE   = Z:\home\rjones\d\fedora-mingw--devel\qt-win\qt-win-opensource-src-4.4.3\r
++QT_SOURCE_TREE  = Z:\home\rjones\d\fedora-mingw--devel\qt-win\qt-win-opensource-src-4.4.3\r
++QMAKE_MOC       = $$QT_BUILD_TREE\bin\moc.exe\r
++QMAKE_UIC       = $$QT_BUILD_TREE\bin\uic.exe\r
++QMAKE_UIC3      = $$QT_BUILD_TREE\bin\uic3.exe\r
++QMAKE_RCC       = $$QT_BUILD_TREE\bin\rcc.exe\r
++QMAKE_DUMPCPP   = $$QT_BUILD_TREE\bin\dumpcpp.exe\r
++QMAKE_INCDIR_QT = $$QT_BUILD_TREE\include\r
++QMAKE_LIBDIR_QT = $$QT_BUILD_TREE\lib\r
 diff -urN qt-win-opensource-src-4.4.3.orig/src/corelib/global/qconfig.cpp qt-win-opensource-src-4.4.3/src/corelib/global/qconfig.cpp
 --- qt-win-opensource-src-4.4.3.orig/src/corelib/global/qconfig.cpp    1970-01-01 01:00:00.000000000 +0100
-+++ qt-win-opensource-src-4.4.3/src/corelib/global/qconfig.cpp 2009-02-01 23:43:14.000000000 +0000
++++ qt-win-opensource-src-4.4.3/src/corelib/global/qconfig.cpp 2009-02-02 14:39:05.000000000 +0000
 @@ -0,0 +1,27 @@
 +/* Licensed */
 +static const char qt_configure_licensee_str          [512 + 12] = "qt_lcnsuser=Open Source";
@@ -390,8 +514,8 @@ diff -urN qt-win-opensource-src-4.4.3.orig/src/corelib/global/qconfig.cpp qt-win
 +
 diff -urN qt-win-opensource-src-4.4.3.orig/src/corelib/global/qconfig.h qt-win-opensource-src-4.4.3/src/corelib/global/qconfig.h
 --- qt-win-opensource-src-4.4.3.orig/src/corelib/global/qconfig.h      1970-01-01 01:00:00.000000000 +0100
-+++ qt-win-opensource-src-4.4.3/src/corelib/global/qconfig.h   2009-02-01 23:43:14.000000000 +0000
-@@ -0,0 +1,72 @@
++++ qt-win-opensource-src-4.4.3/src/corelib/global/qconfig.h   2009-02-02 14:39:05.000000000 +0000
+@@ -0,0 +1,90 @@
 +/* Everything */
 +
 +#ifndef QT_DLL
@@ -409,15 +533,15 @@ diff -urN qt-win-opensource-src-4.4.3.orig/src/corelib/global/qconfig.h qt-win-o
 +
 +#if (defined(_DEBUG) || defined(DEBUG))
 +# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
-+#  define QT_BUILD_KEY "Windows x64 mingw debug full-config"
++#  define QT_BUILD_KEY "Windows x64 msvc debug full-config"
 +# else
-+#  define QT_BUILD_KEY "Windows mingw debug full-config"
++#  define QT_BUILD_KEY "Windows msvc debug full-config"
 +# endif
 +#else
 +# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
-+#  define QT_BUILD_KEY "Windows x64 mingw release full-config"
++#  define QT_BUILD_KEY "Windows x64 msvc release full-config"
 +# else
-+#  define QT_BUILD_KEY "Windows mingw release full-config"
++#  define QT_BUILD_KEY "Windows msvc release full-config"
 +# endif
 +#endif
 +
@@ -464,3 +588,21 @@ diff -urN qt-win-opensource-src-4.4.3.orig/src/corelib/global/qconfig.h qt-win-o
 +# 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
++
index 2fc68f9..d6719e6 100755 (executable)
@@ -4,9 +4,45 @@
 #   . 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.4.3
+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 win32-g++ \
+  -platform $platform \
   -confirm-license \
   -no-qmake \
   -dont-process \
@@ -20,5 +56,16 @@ wine configure.exe \
   -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
+  -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
\ No newline at end of file