view src/qtbase-1-fixes.patch @ 5858:8cfad4a44884 release

Restore Qt 5.15 for development (grafted from 19a6cd0f2f60e5c0075eeb33ee92422c925a8a67)
author John W. Eaton <jwe@octave.org>
date Fri, 27 Nov 2020 13:54:56 -0500
parents 954bb4ead870
children 38be0ef93ce3
line wrap: on
line source

This file is part of MXE. See LICENSE.md for licensing information.

From 2c59523387b10937ff7d085bc34ec3df68805fea Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 26 Aug 2015 12:45:43 +0100
Subject: [PATCH 1/2] cmake: Rearrange STATIC vs INTERFACE targets

Otherwise we attempt to add_library(Qt5::UiPlugin STATIC IMPORTED)
for header-only modules when building Qt5 statically.

Source: https://git.io/vzWJz
See also: https://github.com/mxe/mxe/issues/1185

diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 309798a767..18156cac9e 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -370,6 +370,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
     list(APPEND _Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_INTERFACE_QT5_MODULE_DEPS}\")
 !!ENDIF
 
+!!IF equals(TEMPLATE, aux)
+    add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
+!!ELSE
 !!IF !isEmpty(CMAKE_STATIC_TYPE)
     if(NOT Qt5_EXCLUDE_STATIC_DEPENDENCIES)
 !!IF !isEmpty(CMAKE_DEBUG_TYPE)
@@ -411,9 +414,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
     add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
     set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
 !!ENDIF
-!!ELSE
-!!IF equals(TEMPLATE, aux)
-    add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
 !!ELSE
     add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
 !!ENDIF
-- 
2.25.1


From c3fa97702a080eb1a931fd1f41f7a1dd5b775523 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sun, 11 Jun 2017 00:27:41 +0200
Subject: [PATCH 2/2] use pkg-config for harfbuzz

Change-Id: Ia65cbb90fd180f1bc10ce077a9a8323a48e51421

diff --git a/src/gui/configure.json b/src/gui/configure.json
index 5ebcdb99b5..2553cb5cf6 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -303,7 +303,8 @@
             },
             "headers": "harfbuzz/hb.h",
             "sources": [
-                "-lharfbuzz"
+               { "type": "pkgConfig", "args": "harfbuzz" },
+               "-lharfbuzz"
             ]
         },
         "imf": {
-- 
2.25.1

diff -ur qtbase-everywhere-src-5.11.0.orig/mkspecs/common/gcc-base.conf qtbase-everywhere-src-5.11.0/mkspecs/common/gcc-base.conf
--- qtbase-everywhere-src-5.11.0.orig/mkspecs/common/gcc-base.conf     2018-06-12 07:47:54.488874295 -0400
+++ qtbase-everywhere-src-5.11.0/mkspecs/common/gcc-base.conf  2018-06-12 07:48:46.550096817 -0400
@@ -46,7 +46,7 @@
 QMAKE_CFLAGS_SHLIB         += $$QMAKE_CFLAGS_PIC
 QMAKE_CFLAGS_STATIC_LIB    += $$QMAKE_CFLAGS_PIC
 QMAKE_CFLAGS_APP           += $$QMAKE_CFLAGS_PIC
-QMAKE_CFLAGS_ISYSTEM        = -isystem
+QMAKE_CFLAGS_ISYSTEM        = -I
 QMAKE_CFLAGS_YACC          += -Wno-unused -Wno-parentheses
 QMAKE_CFLAGS_HIDESYMS      += -fvisibility=hidden
 QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions
diff -ur qtbase-everywhere-src-5.13.0.orig/src/plugins/platforms/minimal/qminimalintegration.cpp qtbase-everywhere-src-5.13.0/src/plugins/platforms/minimal/qminimalintegration.cpp
--- qtbase-everywhere-src-5.13.0.orig/src/plugins/platforms/minimal/qminimalintegration.cpp    2019-06-21 13:24:11.167038403 -0400
+++ qtbase-everywhere-src-5.13.0/src/plugins/platforms/minimal/qminimalintegration.cpp 2019-06-21 13:31:33.734199370 -0400
@@ -162,7 +162,11 @@

         if (!m_fontDatabase) {
 #if QT_CONFIG(fontconfig)
+#  ifdef Q_OS_WIN
+            m_fontDatabase = new QFreeTypeFontDatabase;
+#  else
             m_fontDatabase = new QGenericUnixFontDatabase;
+#  endif
 #else
             m_fontDatabase = QPlatformIntegration::fontDatabase();
 #endif