mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 01:30:55 +08:00
[qtbase] fix macdeployqt for symlinks (#42430)
This commit is contained in:
parent
a08d0b196f
commit
386ee8bae8
33
ports/qtbase/macdeployqt-symlinks.patch
Normal file
33
ports/qtbase/macdeployqt-symlinks.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
|
||||
index 6ff269b..caffd44 100644
|
||||
--- a/src/tools/macdeployqt/shared/shared.cpp
|
||||
+++ b/src/tools/macdeployqt/shared/shared.cpp
|
||||
@@ -1,4 +1,5 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
+
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#include <QCoreApplication>
|
||||
#include <QString>
|
||||
@@ -85,7 +86,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (QFile::copy(from, to)) {
|
||||
+ QFileInfo fromFileInfo(from);
|
||||
+
|
||||
+ if (fromFileInfo.isSymLink()) {
|
||||
+ const QString fromSymLinkTarget = fromFileInfo.absoluteDir().relativeFilePath(fromFileInfo.symLinkTarget());
|
||||
+ if (QFile::link(fromSymLinkTarget, to)) {
|
||||
+ return copyFilePrintStatus(fromFileInfo.absoluteDir().absoluteFilePath(fromSymLinkTarget), QFileInfo(to).absoluteDir().absoluteFilePath(fromSymLinkTarget));
|
||||
+ }
|
||||
+ else {
|
||||
+ LogError() << "symlink copy failed from" << from;
|
||||
+ LogError() << " to" << to;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ else if (QFile::copy(from, to)) {
|
||||
QFile dest(to);
|
||||
dest.setPermissions(dest.permissions() | QFile::WriteOwner | QFile::WriteUser);
|
||||
LogNormal() << " copied:" << from;
|
@ -22,6 +22,7 @@ set(${PORT}_PATCHES
|
||||
fix-host-aliasing.patch
|
||||
fix_deploy_windows.patch
|
||||
fix-link-lib-discovery.patch
|
||||
macdeployqt-symlinks.patch
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "qtbase",
|
||||
"version": "6.8.1",
|
||||
"port-version": 1,
|
||||
"description": "Qt Base (Core, Gui, Widgets, Network, ...)",
|
||||
"homepage": "https://www.qt.io/",
|
||||
"license": null,
|
||||
|
@ -7570,7 +7570,7 @@
|
||||
},
|
||||
"qtbase": {
|
||||
"baseline": "6.8.1",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"qtcharts": {
|
||||
"baseline": "6.8.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "aca356b06f62fc44f51769ef5418230a385e3c7f",
|
||||
"version": "6.8.1",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "15eabae75af5ff861ffa692ff8072aca9af30fad",
|
||||
"version": "6.8.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user