From 1d6bcca58a0e096580fba5982c2ba114cd12d307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20L=C3=B3pez-Cabanillas?= Date: Thu, 24 Oct 2024 04:46:41 +0200 Subject: [PATCH] [qt5-base & qtbase] Fix error on arm64-windows (#41536) Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> --- ports/qt5-base/patches/qmake-arm64.patch | 18 ++++++++++++++++++ ports/qt5-base/portfile.cmake | 2 ++ ports/qt5-base/vcpkg.json | 1 + ports/qtbase/portfile.cmake | 1 + ports/qtbase/qmake-arm64.patch | 18 ++++++++++++++++++ ports/qtbase/vcpkg.json | 1 + versions/baseline.json | 4 ++-- versions/q-/qt5-base.json | 5 +++++ versions/q-/qtbase.json | 5 +++++ 9 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 ports/qt5-base/patches/qmake-arm64.patch create mode 100644 ports/qtbase/qmake-arm64.patch diff --git a/ports/qt5-base/patches/qmake-arm64.patch b/ports/qt5-base/patches/qmake-arm64.patch new file mode 100644 index 0000000000..17ba77b5c6 --- /dev/null +++ b/ports/qt5-base/patches/qmake-arm64.patch @@ -0,0 +1,18 @@ +diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp +index df3f92d7d5df..0ee8cdbf11e1 100644 +--- a/qmake/library/qmakeevaluator.cpp ++++ b/qmake/library/qmakeevaluator.cpp +@@ -1046,6 +1046,11 @@ void QMakeEvaluator::loadDefaults() + case PROCESSOR_ARCHITECTURE_AMD64: + archStr = ProString("x86_64"); + break; ++# endif ++# ifdef PROCESSOR_ARCHITECTURE_ARM64 ++ case PROCESSOR_ARCHITECTURE_ARM64: ++ archStr = ProString("arm64"); ++ break; + # endif + case PROCESSOR_ARCHITECTURE_INTEL: + archStr = ProString("x86"); +-- +2.16.3 diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 48fefd8c65..6e2fe1b04d 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -76,6 +76,8 @@ qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH patches/fix_angle.patch # Failed to create OpenGL context for format QSurfaceFormat ... patches/mingw9.patch # Fix compile with MinGW-W64 9.0.0: Redefinition of 'struct _FILE_ID_INFO' patches/XKB_KEY_dead_lowline.patch # https://bugreports.qt.io/browse/QTBUG-117950 + + patches/qmake-arm64.patch # Fix by Oliver Wolff to support ARM64 hosts on Windows ) # Remove vendored dependencies to ensure they are not picked up by the build diff --git a/ports/qt5-base/vcpkg.json b/ports/qt5-base/vcpkg.json index 6e6214c4f6..579c9d9657 100644 --- a/ports/qt5-base/vcpkg.json +++ b/ports/qt5-base/vcpkg.json @@ -1,6 +1,7 @@ { "name": "qt5-base", "version": "5.15.15", + "port-version": 1, "description": "Qt Base provides the basic non-GUI functionality required by all Qt applications.", "homepage": "https://www.qt.io/", "license": null, diff --git a/ports/qtbase/portfile.cmake b/ports/qtbase/portfile.cmake index 3b3c483377..6ad3432eef 100644 --- a/ports/qtbase/portfile.cmake +++ b/ports/qtbase/portfile.cmake @@ -22,6 +22,7 @@ set(${PORT}_PATCHES fix-host-aliasing.patch fix_deploy_windows.patch fix-link-lib-discovery.patch + qmake-arm64.patch ) if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) diff --git a/ports/qtbase/qmake-arm64.patch b/ports/qtbase/qmake-arm64.patch new file mode 100644 index 0000000000..17ba77b5c6 --- /dev/null +++ b/ports/qtbase/qmake-arm64.patch @@ -0,0 +1,18 @@ +diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp +index df3f92d7d5df..0ee8cdbf11e1 100644 +--- a/qmake/library/qmakeevaluator.cpp ++++ b/qmake/library/qmakeevaluator.cpp +@@ -1046,6 +1046,11 @@ void QMakeEvaluator::loadDefaults() + case PROCESSOR_ARCHITECTURE_AMD64: + archStr = ProString("x86_64"); + break; ++# endif ++# ifdef PROCESSOR_ARCHITECTURE_ARM64 ++ case PROCESSOR_ARCHITECTURE_ARM64: ++ archStr = ProString("arm64"); ++ break; + # endif + case PROCESSOR_ARCHITECTURE_INTEL: + archStr = ProString("x86"); +-- +2.16.3 diff --git a/ports/qtbase/vcpkg.json b/ports/qtbase/vcpkg.json index 935f2ab4a7..0e49eca8e9 100644 --- a/ports/qtbase/vcpkg.json +++ b/ports/qtbase/vcpkg.json @@ -1,6 +1,7 @@ { "name": "qtbase", "version": "6.7.3", + "port-version": 1, "description": "Qt Base (Core, Gui, Widgets, Network, ...)", "homepage": "https://www.qt.io/", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index c781ddea2c..a320a69094 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7342,7 +7342,7 @@ }, "qt5-base": { "baseline": "5.15.15", - "port-version": 0 + "port-version": 1 }, "qt5-canvas3d": { "baseline": "0", @@ -7510,7 +7510,7 @@ }, "qtbase": { "baseline": "6.7.3", - "port-version": 0 + "port-version": 1 }, "qtcharts": { "baseline": "6.7.3", diff --git a/versions/q-/qt5-base.json b/versions/q-/qt5-base.json index 2a85756ca1..1a8ba0fc74 100644 --- a/versions/q-/qt5-base.json +++ b/versions/q-/qt5-base.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "6ae808ff9831e8fc3c9f31e0ec0ac71b2e9d3a4e", + "version": "5.15.15", + "port-version": 1 + }, { "git-tree": "99dfc2c88d6a863afc5eef00463166c50e5e12d2", "version": "5.15.15", diff --git a/versions/q-/qtbase.json b/versions/q-/qtbase.json index bc0d445cf4..7614433c22 100644 --- a/versions/q-/qtbase.json +++ b/versions/q-/qtbase.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f176facc532ba6e294f1627343e8f7c3ee686676", + "version": "6.7.3", + "port-version": 1 + }, { "git-tree": "175c7c5f08049a07e1b18f39e622e82a60a16147", "version": "6.7.3",