Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qt5-winextras] remove unneeded dependencies #23177

Merged
merged 2 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ports/qt5-winextras/patches/require_quick.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/src.pro b/src/src.pro
index fceeb21..8a242d0 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -2,6 +2,7 @@ win32 {
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += winextras
+ SUBDIRS += imports
} else {
# fake project for creating the documentation
TEMPLATE = aux
12 changes: 12 additions & 0 deletions ports/qt5-winextras/patches/unrequire_quick.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/src.pro b/src/src.pro
index fceeb21..7e4835b 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -2,7 +2,6 @@ win32 {
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += winextras
- qtHaveModule(quick): SUBDIRS += imports
} else {
# fake project for creating the documentation
TEMPLATE = aux
15 changes: 11 additions & 4 deletions ports/qt5-winextras/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
if (NOT VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "qt5-winextras only support Windows.")
include("${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake")

vcpkg_list(SET _patches
"patches/unrequire_quick.patch"
)
if("declarative" IN_LIST FEATURES)
list(APPEND _patches
"patches/require_quick.patch"
)
Comment on lines +3 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks so painful to do but there is probably no other way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first attempt was to add requires(qtHaveModule(quick)) into qtwinextras.pro, but it skips this module instead of breaking with error.

endif()
include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake)
qt_submodule_installation()

qt_submodule_installation(PATCHES ${_patches})
20 changes: 12 additions & 8 deletions ports/qt5-winextras/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{
"name": "qt5-winextras",
"version": "5.15.3",
"port-version": 1,
"description": "Qt5 Windows Extras Module. Provides platform-specific APIs for Windows.",
"license": null,
"supports": "windows",
"dependencies": [
{
"name": "atlmfc",
"platform": "windows"
},
"atlmfc",
{
"name": "qt5-base",
"default-features": false
},
"qt5-declarative",
"qt5-multimedia"
]
}
],
"features": {
"declarative": {
"description": "Build Qt.Quick imports",
"dependencies": [
"qt5-declarative"
]
}
}
}
4 changes: 4 additions & 0 deletions ports/qt5/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qt5",
"version": "5.15.3",
"port-version": 1,
"description": "Qt5 Application Framework",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down Expand Up @@ -162,6 +163,9 @@
},
{
"name": "qt5-winextras",
"features": [
"declarative"
],
"platform": "windows"
},
{
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5602,7 +5602,7 @@
},
"qt5": {
"baseline": "5.15.3",
"port-version": 0
"port-version": 1
},
"qt5-3d": {
"baseline": "5.15.3",
Expand Down Expand Up @@ -5762,7 +5762,7 @@
},
"qt5-winextras": {
"baseline": "5.15.3",
"port-version": 0
"port-version": 1
},
"qt5-x11extras": {
"baseline": "5.15.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qt5-winextras.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5a7881475902048fa453bff04c347caa7e9a615b",
"version": "5.15.3",
"port-version": 1
},
{
"git-tree": "89250816793ceacdf74730157af6f287070b8bf1",
"version": "5.15.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qt5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "979ef9acc281793cef4f43f1e1eaed177ed9b408",
"version": "5.15.3",
"port-version": 1
},
{
"git-tree": "428cdd43abdc1200e889c66b9c388b421d16bf58",
"version": "5.15.3",
Expand Down