From 88de49b139c620835e841c58b9eae486b45d1bd3 Mon Sep 17 00:00:00 2001 From: seanlis Date: Fri, 20 Nov 2020 13:38:36 +0800 Subject: [qt5-tools] Patch windeployqt to locate icudtd correctly. (#14083) * Patch windeployqt to locate icudtd correctly. * Add the link of the upstream issue as a comment to the patch in the portfile. --- ports/qt5-tools/CONTROL | 1 + ports/qt5-tools/icudt-debug-suffix.patch | 13 +++++++++++++ ports/qt5-tools/portfile.cmake | 7 +++++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 ports/qt5-tools/icudt-debug-suffix.patch diff --git a/ports/qt5-tools/CONTROL b/ports/qt5-tools/CONTROL index 49319c5fb..523a608ce 100644 --- a/ports/qt5-tools/CONTROL +++ b/ports/qt5-tools/CONTROL @@ -1,4 +1,5 @@ Source: qt5-tools Version: 5.15.1 +Port-Version: 1 Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications Build-Depends: qt5-base[core], qt5-declarative, qt5-activeqt (windows) diff --git a/ports/qt5-tools/icudt-debug-suffix.patch b/ports/qt5-tools/icudt-debug-suffix.patch new file mode 100644 index 000000000..9d9d8bb39 --- /dev/null +++ b/ports/qt5-tools/icudt-debug-suffix.patch @@ -0,0 +1,13 @@ +diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp +index 4e480bb..e15f076 100644 +--- a/src/windeployqt/main.cpp ++++ b/src/windeployqt/main.cpp +@@ -1324,7 +1324,7 @@ static DeployResult deploy(const Options &options, + const QString icuVersion = icuLibs.front().mid(index, numberExpression.matchedLength()); + if (optVerboseLevel > 1) + std::wcout << "Adding ICU version " << icuVersion << '\n'; +- icuLibs.push_back(QStringLiteral("icudt") + icuVersion + QLatin1String(windowsSharedLibrarySuffix)); ++ icuLibs.push_back(QStringLiteral("icudt") + (result.isDebug && platformHasDebugSuffix(options.platform) ? QStringLiteral("d") : QString()) + icuVersion + QLatin1String(windowsSharedLibrarySuffix)); + } + for (const QString &icuLib : qAsConst(icuLibs)) { + const QString icuPath = findInPath(icuLib); diff --git a/ports/qt5-tools/portfile.cmake b/ports/qt5-tools/portfile.cmake index 2efc85eb9..7b0b32ac2 100644 --- a/ports/qt5-tools/portfile.cmake +++ b/ports/qt5-tools/portfile.cmake @@ -1,7 +1,10 @@ include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) -qt_submodule_installation(PATCHES assistant.patch) +qt_submodule_installation(PATCHES + assistant.patch + icudt-debug-suffix.patch # https://bugreports.qt.io/browse/QTBUG-87677 +) if(EXISTS "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") file(INSTALL "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/plugins/platforms") -endif() \ No newline at end of file +endif() -- cgit v1.2.3