[mingw-qt5-qtbase] Update to 5.1.1 and fix FTBFS against latest mingw-w64

Erik van Pienbroek epienbro at fedoraproject.org
Sat Sep 7 20:37:14 UTC 2013


commit 63cd7790d9e5d2a9ed76161aff93b98de08e2d4a
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Sat Sep 7 22:36:57 2013 +0200

    Update to 5.1.1 and fix FTBFS against latest mingw-w64

 ...s-Fix-compilation-with-MinGW-64-gcc-4.8.1.patch |   43 +++++++++++++++++
 mingw-qt5-qtbase.spec                              |   23 ++++++---
 ...ge-box-if-platform-plugin-cannot-be-found.patch |   49 --------------------
 ...win32-winnt-to-enable-winvista-structures.patch |   13 +++++
 4 files changed, 72 insertions(+), 56 deletions(-)
---
diff --git a/0001-Windows-Fix-compilation-with-MinGW-64-gcc-4.8.1.patch b/0001-Windows-Fix-compilation-with-MinGW-64-gcc-4.8.1.patch
new file mode 100644
index 0000000..937e81b
--- /dev/null
+++ b/0001-Windows-Fix-compilation-with-MinGW-64-gcc-4.8.1.patch
@@ -0,0 +1,43 @@
+From e59a5f9fdcec5df2f54e88d75a75fcb4a2fe577b Mon Sep 17 00:00:00 2001
+From: Friedemann Kleint <Friedemann.Kleint at digia.com>
+Date: Mon, 26 Aug 2013 11:52:47 +0200
+Subject: [PATCH] Windows: Fix compilation with MinGW-64, gcc 4.8.1
+
+A definition for FILE_ID_128 was added.
+
+Change-Id: Ifdfe5da1b15a90afdf5cf09d92838a04b1cf5c19
+Reviewed-by: Kai Koehne <kai.koehne at digia.com>
+---
+ src/corelib/io/qfilesystemengine_win.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
+index e8904b0..57231b5 100644
+--- a/src/corelib/io/qfilesystemengine_win.cpp
++++ b/src/corelib/io/qfilesystemengine_win.cpp
+@@ -573,9 +573,12 @@ typedef enum { Q_FileIdInfo = 18 } Q_FILE_INFO_BY_HANDLE_CLASS;
+ 
+ #  if defined(Q_CC_MINGW) || (defined(Q_CC_MSVC) && _MSC_VER < 1700)
+ 
++// MinGW-64 defines FILE_ID_128 as of gcc-4.8.1 along with FILE_SUPPORTS_INTEGRITY_STREAMS
++#    if !(defined(Q_CC_MINGW) && defined(FILE_SUPPORTS_INTEGRITY_STREAMS))
+ typedef struct _FILE_ID_128 {
+     BYTE  Identifier[16];
+ } FILE_ID_128, *PFILE_ID_128;
++#    endif // !(Q_CC_MINGW && FILE_SUPPORTS_INTEGRITY_STREAMS)
+ 
+ typedef struct _FILE_ID_INFO {
+     ULONGLONG VolumeSerialNumber;
+@@ -614,7 +617,8 @@ QByteArray fileIdWin8(HANDLE handle)
+                                          &infoEx, sizeof(FILE_ID_INFO))) {
+             result = QByteArray::number(infoEx.VolumeSerialNumber, 16);
+             result += ':';
+-            result += QByteArray((char *)infoEx.FileId.Identifier, sizeof(infoEx.FileId.Identifier)).toHex();
++            // Note: MinGW-64's definition of FILE_ID_128 differs from the MSVC one.
++            result += QByteArray((char *)&infoEx.FileId, sizeof(infoEx.FileId)).toHex();
+         }
+     }
+     return result;
+-- 
+1.8.3.1
+
diff --git a/mingw-qt5-qtbase.spec b/mingw-qt5-qtbase.spec
index 2bbccad..d59a33a 100644
--- a/mingw-qt5-qtbase.spec
+++ b/mingw-qt5-qtbase.spec
@@ -22,8 +22,8 @@
 %global release_version %(echo %{version} | awk -F. '{print $1"."$2}')
 
 Name:           mingw-qt5-qtbase
-Version:        5.1.0
-Release:        5%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
+Version:        5.1.1
+Release:        1%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
 Summary:        Qt5 for Windows - QtBase component
 
 License:        GPLv3 with exceptions or LGPLv2 with exceptions
@@ -89,10 +89,6 @@ Patch15:        qt5-workaround-pkgconfig-install-issue.patch
 # make[5]: Leaving directory `/home/erik/fedora/mingw-qt5-qtbase/build_release_shared_win32/src/plugins/platforms/offscreen'
 Patch16:        qt5-fix-compilation-when-freetype-isnt-available.patch
 
-# Display message box if platform plugin cannot be found
-# Commit 7ead3a39c71949e28d682f893f8b4037e25d7259
-Patch17:        qt5-qtbase-display-message-box-if-platform-plugin-cannot-be-found.patch
-
 # The bundled pcre is built as static library by default
 # As we're not using the bundled copy but our own copy
 # we need to do some fiddling to fix compilation issues
@@ -112,6 +108,14 @@ Patch19:        qt5-dont-build-host-libs-static.patch
 # want to avoid conflicts with the native qt5 packages
 Patch20:        qt5-enable-rpath-for-host-tools.patch
 
+# Fix FTBFS against latest mingw-w64
+# https://codereview.qt-project.org/#change,63747
+Patch21:        0001-Windows-Fix-compilation-with-MinGW-64-gcc-4.8.1.patch
+
+# Fix FTBFS in Qt 5.1.1
+# https://bugreports.qt-project.org/browse/QTBUG-33225
+Patch22:        qt5-set-win32-winnt-to-enable-winvista-structures.patch
+
 BuildRequires:  mingw32-filesystem >= 95
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-gcc-c++
@@ -254,10 +258,11 @@ Static version of the mingw64-qt5-qtbase library.
 %patch14 -p0 -b .interface
 %patch15 -p0 -b .pkgconfig
 %patch16 -p1 -b .no_freetype
-%patch17 -p1 -b .platform_msgbox
 %patch18 -p1 -b .pcre
 %patch19 -p0 -b .bootstrap_shared
 %patch20 -p1 -b .rpath_tools
+%patch21 -p1 -b .ftbfs
+%patch22 -p1 -b .winver
 
 # Cross-compilation qmake target.
 mkdir mkspecs/%{platform_win32}
@@ -739,6 +744,10 @@ sed -i s@'#QT_TOOL'@'QT_TOOL'@ $RPM_BUILD_ROOT%{mingw64_datadir}/qt5/mkspecs/%{p
 
 
 %changelog
+* Thu Aug 29 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.1.1-1
+- Update to 5.1.1
+- Fix FTBFS against latest mingw-w64
+
 * Fri Aug  2 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.1.0-5
 - Re-enable R: mingw{32,64}-qt5-qttools-lrelease now that
   bootstrapping Qt5 on ARM has completed
diff --git a/qt5-set-win32-winnt-to-enable-winvista-structures.patch b/qt5-set-win32-winnt-to-enable-winvista-structures.patch
new file mode 100644
index 0000000..11696e2
--- /dev/null
+++ b/qt5-set-win32-winnt-to-enable-winvista-structures.patch
@@ -0,0 +1,13 @@
+--- qtbase-opensource-src-5.1.1/src/plugins/platforms/windows/qwindowstheme.cpp.orig	2013-08-29 22:38:22.849226696 +0200
++++ qtbase-opensource-src-5.1.1/src/plugins/platforms/windows/qwindowstheme.cpp	2013-08-29 22:47:41.852203317 +0200
+@@ -39,6 +39,10 @@
+ **
+ ****************************************************************************/
+ 
++/* The structure SHSTOCKICONINFO which is used in
++ * this file is only available as of Windows Vista */
++#define _WIN32_WINNT 0x0600
++
+ #include "qwindowstheme.h"
+ #include "qwindowsdialoghelpers.h"
+ #include "qwindowscontext.h"


More information about the scm-commits mailing list