5.15.2: macdeployqt applied patch for QTBUG-85600 (macdeployqt not built as host_build)

This commit is contained in:
kleuter 2020-11-24 11:52:14 +01:00
parent 75b1234a9c
commit 65c2e8b07b
3 changed files with 13 additions and 10 deletions

View File

@ -1,5 +1,8 @@
option(host_build)
CONFIG += force_bootstrap
SOURCES += main.cpp ../shared/shared.cpp SOURCES += main.cpp ../shared/shared.cpp
QT = core QT = core
LIBS += -framework CoreFoundation LIBS += -framework CoreFoundation
load(qt_app) load(qt_tool)

View File

@ -232,7 +232,9 @@ int main(int argc, char **argv)
// Update deploymentInfo.deployedFrameworks - the QML imports // Update deploymentInfo.deployedFrameworks - the QML imports
// may have brought in extra frameworks as dependencies. // may have brought in extra frameworks as dependencies.
deploymentInfo.deployedFrameworks += findAppFrameworkNames(appBundlePath); deploymentInfo.deployedFrameworks += findAppFrameworkNames(appBundlePath);
deploymentInfo.deployedFrameworks = deploymentInfo.deployedFrameworks.toSet().toList(); QSet<QString> deployedFrameworks(deploymentInfo.deployedFrameworks.begin(),
deploymentInfo.deployedFrameworks.end());
deploymentInfo.deployedFrameworks = deployedFrameworks.values();
} }
if (plugins && !deploymentInfo.qtPath.isEmpty()) { if (plugins && !deploymentInfo.qtPath.isEmpty()) {

View File

@ -30,7 +30,6 @@
#include <QStringList> #include <QStringList>
#include <QDebug> #include <QDebug>
#include <iostream> #include <iostream>
#include <QProcess>
#include <QDir> #include <QDir>
#include <QRegExp> #include <QRegExp>
#include <QSet> #include <QSet>
@ -41,7 +40,6 @@
#include <QJsonObject> #include <QJsonObject>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonValue> #include <QJsonValue>
#include <QRegularExpression>
#include "shared.h" #include "shared.h"
#ifdef Q_OS_DARWIN #ifdef Q_OS_DARWIN
@ -181,7 +179,7 @@ OtoolInfo findDependencyInfo(const QString &binaryPath)
return info; return info;
} }
static const QRegularExpression regexp(QStringLiteral( static const QRegExp regexp(QStringLiteral(
"^\\t(.+) \\(compatibility version (\\d+\\.\\d+\\.\\d+), " "^\\t(.+) \\(compatibility version (\\d+\\.\\d+\\.\\d+), "
"current version (\\d+\\.\\d+\\.\\d+)(, weak)?\\)$")); "current version (\\d+\\.\\d+\\.\\d+)(, weak)?\\)$"));
@ -938,7 +936,7 @@ bool DeploymentInfo::containsModule(const QString &module, const QString &libInF
return true; return true;
} }
// Check for dylib // Check for dylib
const QRegularExpression dylibRegExp(QLatin1String("libQt[0-9]+") + module + const QRegExp dylibRegExp(QLatin1String("libQt[0-9]+") + module +
libInFix + QLatin1String(".[0-9]+.dylib")); libInFix + QLatin1String(".[0-9]+.dylib"));
return deployedFrameworks.filter(dylibRegExp).size() > 0; return deployedFrameworks.filter(dylibRegExp).size() > 0;
} }
@ -1498,10 +1496,10 @@ QSet<QString> codesignBundle(const QString &identity,
// Check if there are unsigned dependencies, sign these first. // Check if there are unsigned dependencies, sign these first.
QStringList dependencies = QStringList dependencies =
getBinaryDependencies(rootBinariesPath, binary, additionalBinariesContainingRpaths).toSet() getBinaryDependencies(rootBinariesPath, binary, additionalBinariesContainingRpaths);
.subtract(signedBinaries)
.subtract(pendingBinariesSet) QSet<QString> dependenciesSet(dependencies.begin(), dependencies.end());
.toList(); dependencies = dependenciesSet.subtract(signedBinaries).subtract(pendingBinariesSet).values();
if (!dependencies.isEmpty()) { if (!dependencies.isEmpty()) {
pendingBinaries.push(binary); pendingBinaries.push(binary);