From b47a3a6e1997502a41d5e8eabdb17f45d918ac2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Thu, 29 Jul 2021 18:25:59 +0200 Subject: [PATCH 1/4] [kf5windowsystem] fix cmake.in for static usage; extra fixes - apply https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/27 patch - fix MAYBE_UNUSED_VARIABLES usage - use semVer - update deprecated functions - wrap paths in quotes - don't overzealously remove folders --- ports/kf5windowsystem/27.patch | 31 ++++++++++++++++++++++++++++ ports/kf5windowsystem/portfile.cmake | 20 +++++++----------- ports/kf5windowsystem/vcpkg.json | 12 +++++++++-- 3 files changed, 49 insertions(+), 14 deletions(-) create mode 100644 ports/kf5windowsystem/27.patch diff --git a/ports/kf5windowsystem/27.patch b/ports/kf5windowsystem/27.patch new file mode 100644 index 00000000000000..6ad39176795ce9 --- /dev/null +++ b/ports/kf5windowsystem/27.patch @@ -0,0 +1,31 @@ +From 2ee7179c17fd9bd6d8e883ea304cc050cb197834 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Thu, 29 Jul 2021 13:47:28 +0200 +Subject: [PATCH] Support static builds + +--- + KF5WindowSystemConfig.cmake.in | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/KF5WindowSystemConfig.cmake.in b/KF5WindowSystemConfig.cmake.in +index 6c1b4c0..bcb7128 100644 +--- a/KF5WindowSystemConfig.cmake.in ++++ b/KF5WindowSystemConfig.cmake.in +@@ -4,7 +4,13 @@ include(CMakeFindDependencyMacro) + find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) + + if(NOT @KWINDOWSYSTEM_NO_WIDGETS@) +-find_dependency(Qt5Widgets @REQUIRED_QT_VERSION@) ++ find_dependency(Qt5Widgets @REQUIRED_QT_VERSION@) ++endif() ++ ++if(NOT @BUILD_SHARED_LIBS@) ++ if(@WIN32@) ++ find_dependency(Qt5WinExtras @REQUIRED_QT_VERSION@) ++ endif() + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/KF5WindowSystemTargets.cmake") +-- +GitLab + diff --git a/ports/kf5windowsystem/portfile.cmake b/ports/kf5windowsystem/portfile.cmake index 1c15090b2d56f0..47e473254a1e5e 100644 --- a/ports/kf5windowsystem/portfile.cmake +++ b/ports/kf5windowsystem/portfile.cmake @@ -3,35 +3,31 @@ vcpkg_from_github( REPO KDE/kwindowsystem REF v5.84.0 SHA512 53491f8576db8ebb48627e098fd8c3d4029c024bb9048d97daa1a8f5c39e594ca05dcd80ecb18ac591af7455457a0f14459c24cf44487727a26e34f977c5b81a + PATCHES + 27.patch # https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/27 ) if (VCPKG_TARGET_IS_LINUX) message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libxcb-res0-dev\n\nThese can be installed on Ubuntu systems via apt-get install libxcb-res0-dev") endif() -vcpkg_configure_cmake( +vcpkg_cmake_configure( DISABLE_PARALLEL_CONFIGURE SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DBUILD_TESTING=OFF -DKDE_INSTALL_PLUGINDIR=plugins ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5WindowSystem) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/KF5WindowSystem) vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -file(INSTALL ${SOURCE_PATH}/LICENSES/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL "${SOURCE_PATH}/LICENSES/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") diff --git a/ports/kf5windowsystem/vcpkg.json b/ports/kf5windowsystem/vcpkg.json index 40ea4209d561ee..18f247e644e46f 100644 --- a/ports/kf5windowsystem/vcpkg.json +++ b/ports/kf5windowsystem/vcpkg.json @@ -1,7 +1,7 @@ { "name": "kf5windowsystem", - "version": "5.84.0", - "port-version": 1, + "version-semver": "5.84.0", + "port-version": 2, "description": "Access to the windowing system", "homepage": "https://api.kde.org/frameworks/kwindowsystem/html/", "dependencies": [ @@ -14,6 +14,14 @@ { "name": "qt5-x11extras", "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ] } From d0774ac1fbb633846d4beaf20dd43d51d77839b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Sat, 7 Aug 2021 19:33:56 +0000 Subject: [PATCH 2/4] [kf5windowsystem] update versions --- versions/baseline.json | 2 +- versions/k-/kf5windowsystem.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 19650fadcb7400..6b23a72804ac02 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2950,7 +2950,7 @@ }, "kf5windowsystem": { "baseline": "5.84.0", - "port-version": 1 + "port-version": 2 }, "kfr": { "baseline": "2020-06-15", diff --git a/versions/k-/kf5windowsystem.json b/versions/k-/kf5windowsystem.json index 091e5c1e5ee820..1ac17ffeb2bb1f 100644 --- a/versions/k-/kf5windowsystem.json +++ b/versions/k-/kf5windowsystem.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c4e94887aa52cceadf2cffa98ef62feafa76aae8", + "version-semver": "5.84.0", + "port-version": 2 + }, { "git-tree": "719b81cebad63502bbb619781290844c586acef9", "version": "5.84.0", From 9ac8cc34136a06e034775a4f6a1d1f588a6f7455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Mon, 9 Aug 2021 22:48:30 +0000 Subject: [PATCH 3/4] [kf5windowsystem] fix cmake.in for static usage on Linux --- ports/kf5windowsystem/28.patch | 27 +++++++++++++++++++++++++++ ports/kf5windowsystem/portfile.cmake | 1 + 2 files changed, 28 insertions(+) create mode 100644 ports/kf5windowsystem/28.patch diff --git a/ports/kf5windowsystem/28.patch b/ports/kf5windowsystem/28.patch new file mode 100644 index 00000000000000..9cf88c96cff54b --- /dev/null +++ b/ports/kf5windowsystem/28.patch @@ -0,0 +1,27 @@ +From b4bf29e297dd75eb2f4af6ed143839e223833b4b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= +Date: Mon, 9 Aug 2021 22:45:50 +0000 +Subject: [PATCH] Support static builds on Linux as well + +--- + KF5WindowSystemConfig.cmake.in | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/KF5WindowSystemConfig.cmake.in b/KF5WindowSystemConfig.cmake.in +index bcb7128..62580e9 100644 +--- a/KF5WindowSystemConfig.cmake.in ++++ b/KF5WindowSystemConfig.cmake.in +@@ -11,6 +11,10 @@ if(NOT @BUILD_SHARED_LIBS@) + if(@WIN32@) + find_dependency(Qt5WinExtras @REQUIRED_QT_VERSION@) + endif() ++ ++ if(@X11_FOUND@) ++ find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@) ++ endif() + endif() + + include("${CMAKE_CURRENT_LIST_DIR}/KF5WindowSystemTargets.cmake") +-- +GitLab + diff --git a/ports/kf5windowsystem/portfile.cmake b/ports/kf5windowsystem/portfile.cmake index 47e473254a1e5e..59244479cd0519 100644 --- a/ports/kf5windowsystem/portfile.cmake +++ b/ports/kf5windowsystem/portfile.cmake @@ -5,6 +5,7 @@ vcpkg_from_github( SHA512 53491f8576db8ebb48627e098fd8c3d4029c024bb9048d97daa1a8f5c39e594ca05dcd80ecb18ac591af7455457a0f14459c24cf44487727a26e34f977c5b81a PATCHES 27.patch # https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/27 + 28.patch # https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/28 ) if (VCPKG_TARGET_IS_LINUX) From 8e06356cce952cbf44582ec8849b5cb5a7d55542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Mon, 9 Aug 2021 22:48:44 +0000 Subject: [PATCH 4/4] [kf5windowsystem] update versions --- versions/k-/kf5windowsystem.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/k-/kf5windowsystem.json b/versions/k-/kf5windowsystem.json index 1ac17ffeb2bb1f..df764af21925c0 100644 --- a/versions/k-/kf5windowsystem.json +++ b/versions/k-/kf5windowsystem.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c4e94887aa52cceadf2cffa98ef62feafa76aae8", + "git-tree": "e8ec0d393c0ccf286aab3bbe310dd5c09eaecf88", "version-semver": "5.84.0", "port-version": 2 },