+# 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