mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 05:21:29 +08:00
[kf5guiaddons] fix Wayland scanner not being found by transitive deps; fix static builds (#19203)
* [kf5guiaddons] add QtWaylandScanner_EXECUTABLE variable to Config.cmake * [kf5guiaddons] update versions * [kf5guiaddons] remove extraneous options * [kf5guiaddons] update versions * [kf5guiaddons] remove extraneous lines, bump version * [kf5guiaddons] update versions * [kf5guiaddons] add QtWaylandScanner_EXECUTABLE to MAYBE_UNUSED_VARIABLES * [kf5guiaddons] update versions * [kf5guiaddons] replace CURRENT_INSTALLED_DIR without affecting other vars * [kf5guiaddons] update deprecated functions * [kf5guiaddons] wrap paths in quotes * [kf5guiaddons] update versions * [kf5guiaddons] use PACKAGE_PREFIX relative path instead CURRENT_PACKAGES_DIR * [kf5guiaddons] update versions * [kf5guiaddons] cache the QtWaylandScanner_EXECUTABLE variable * [kf5guiaddons] update versions * [kf5guiaddons] update versions * [kf5guiaddons] Add missing static dependency * [kf5guiaddons] update versions * [kf5guiaddons] rename patch file * [kf5guiaddons] update versions * [kf5guiaddons] add PACKAGE_NAME to vcpkg_cmake_config_fixup * [kf5guiaddons] update versions
This commit is contained in:
parent
8c7e8df015
commit
c0bc5e1b0f
84
ports/kf5guiaddons/add_missing_static_dependencies.patch
Normal file
84
ports/kf5guiaddons/add_missing_static_dependencies.patch
Normal file
@ -0,0 +1,84 @@
|
||||
From 7b0a5566acbdb6ff8e7eca3e5e75aacbf2abff9f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com>
|
||||
Date: Sat, 28 Aug 2021 17:08:46 +0200
|
||||
Subject: [PATCH] Add missing static dependency to Config.cmake.in
|
||||
|
||||
- move find_package(Qt5X11Extras) to root CMakeLists.txt
|
||||
---
|
||||
CMakeLists.txt | 5 +++++
|
||||
KF5GuiAddonsConfig.cmake.in | 5 ++++-
|
||||
src/CMakeLists.txt | 24 ++++++++++--------------
|
||||
3 files changed, 19 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 337122e..80633e5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -39,6 +39,11 @@ if (NOT APPLE AND NOT WIN32)
|
||||
find_package(XCB MODULE COMPONENTS XCB)
|
||||
endif()
|
||||
|
||||
+set(WITH_XCB)
|
||||
+if (NOT APPLE AND X11_FOUND AND X11_Xkb_FOUND AND XCB_XCB_FOUND)
|
||||
+ find_package(Qt5X11Extras ${REQUIRED_QT_VERSION} NO_MODULE)
|
||||
+endif()
|
||||
+
|
||||
if (WITH_WAYLAND)
|
||||
find_package(Qt5WaylandClient ${REQUIRED_QT_VERSION} NO_MODULE)
|
||||
find_package(QtWaylandScanner REQUIRED)
|
||||
diff --git a/KF5GuiAddonsConfig.cmake.in b/KF5GuiAddonsConfig.cmake.in
|
||||
index a3c3e58..ae17f6b 100644
|
||||
--- a/KF5GuiAddonsConfig.cmake.in
|
||||
+++ b/KF5GuiAddonsConfig.cmake.in
|
||||
@@ -6,9 +6,12 @@ include(CMakeFindDependencyMacro)
|
||||
find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
|
||||
|
||||
if (NOT @BUILD_SHARED_LIBS@)
|
||||
+ if (@Qt5X11Extras_FOUND@)
|
||||
+ find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@)
|
||||
+ endif()
|
||||
if (@WITH_WAYLAND@)
|
||||
find_dependency(Wayland REQUIRED Client)
|
||||
- find_dependency(Qt5WaylandClient)
|
||||
+ find_dependency(Qt5WaylandClient @REQUIRED_QT_VERSION@)
|
||||
find_dependency(QtWaylandScanner)
|
||||
endif()
|
||||
endif()
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 1dd66e8..ae0e0aa 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -58,20 +58,16 @@ target_include_directories(KF5GuiAddons INTERFACE "$<INSTALL_INTERFACE:${KDE_INS
|
||||
target_compile_definitions(KF5GuiAddons INTERFACE "$<INSTALL_INTERFACE:KGUIADDONS_LIB>")
|
||||
target_link_libraries(KF5GuiAddons PUBLIC Qt5::Gui)
|
||||
|
||||
-set(WITH_XCB)
|
||||
-if (NOT APPLE AND X11_FOUND AND X11_Xkb_FOUND AND XCB_XCB_FOUND)
|
||||
- find_package(Qt5X11Extras ${REQUIRED_QT_VERSION} NO_MODULE)
|
||||
- if (Qt5X11Extras_FOUND)
|
||||
- add_library(kmodifierkey_xcb MODULE util/kmodifierkeyinfoprovider_xcb.cpp)
|
||||
- target_include_directories (kmodifierkey_xcb PRIVATE
|
||||
- ${X11_Xkb_INCLUDE_PATH}
|
||||
- ${X11_Xlib_INCLUDE_PATH}
|
||||
- ${XCB_XCB_INCLUDE_DIR}
|
||||
- )
|
||||
- target_link_libraries(kmodifierkey_xcb PRIVATE ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} Qt5::X11Extras KF5::GuiAddons)
|
||||
- install( TARGETS kmodifierkey_xcb DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kguiaddons/kmodifierkey/)
|
||||
- endif()
|
||||
-endif ()
|
||||
+if (Qt5X11Extras_FOUND)
|
||||
+ add_library(kmodifierkey_xcb MODULE util/kmodifierkeyinfoprovider_xcb.cpp)
|
||||
+ target_include_directories (kmodifierkey_xcb PRIVATE
|
||||
+ ${X11_Xkb_INCLUDE_PATH}
|
||||
+ ${X11_Xlib_INCLUDE_PATH}
|
||||
+ ${XCB_XCB_INCLUDE_DIR}
|
||||
+ )
|
||||
+ target_link_libraries(kmodifierkey_xcb PRIVATE ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} Qt5::X11Extras KF5::GuiAddons)
|
||||
+ install( TARGETS kmodifierkey_xcb DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kguiaddons/kmodifierkey/)
|
||||
+endif()
|
||||
|
||||
ecm_generate_headers(KGuiAddons_HEADERS
|
||||
HEADER_NAMES
|
||||
--
|
||||
GitLab
|
||||
|
12
ports/kf5guiaddons/fix_cmake.patch
Normal file
12
ports/kf5guiaddons/fix_cmake.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/KF5GuiAddonsConfig.cmake.in b/KF5GuiAddonsConfig.cmake.in
|
||||
index ae17f6b..34e41bd 100644
|
||||
--- a/KF5GuiAddonsConfig.cmake.in
|
||||
+++ b/KF5GuiAddonsConfig.cmake.in
|
||||
@@ -10,6 +10,7 @@ if (NOT @BUILD_SHARED_LIBS@)
|
||||
find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@)
|
||||
endif()
|
||||
if (@WITH_WAYLAND@)
|
||||
+ set(QtWaylandScanner_EXECUTABLE "${PACKAGE_PREFIX}/tools/qt5-wayland/bin/qtwaylandscanner" CACHE STRING "QtWaylandScanner workaround")
|
||||
find_dependency(Wayland REQUIRED Client)
|
||||
find_dependency(Qt5WaylandClient @REQUIRED_QT_VERSION@)
|
||||
find_dependency(QtWaylandScanner)
|
@ -4,6 +4,9 @@ vcpkg_from_github(
|
||||
REF v5.84.0
|
||||
SHA512 e5905c0aa5343ce3d4cd3765cb81390fc89fb78aec3c8de8b31d1dada8074d04f549ff785f3988498d2e274d7cb08a35a83ba031d18562049e6ca41d18ea52ee
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
add_missing_static_dependencies.patch # https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/25
|
||||
fix_cmake.patch # https://github.com/microsoft/vcpkg/issues/17607#issuecomment-831518812
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
@ -15,29 +18,26 @@ if("wayland" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_LINUX)
|
||||
message(FATAL_ERROR "Feature wayland is only supported on Linux.")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
vcpkg_cmake_configure(
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_TESTING=OFF
|
||||
-DQtWaylandScanner_EXECUTABLE=${CURRENT_INSTALLED_DIR}/tools/qt5-wayland/bin/qtwaylandscanner
|
||||
${FEATURE_OPTIONS}
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
QtWaylandScanner_EXECUTABLE
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5GuiAddons)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME KF5GuiAddons CONFIG_PATH lib/cmake/KF5GuiAddons)
|
||||
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}/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}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
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")
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "kf5guiaddons",
|
||||
"version": "5.84.0",
|
||||
"port-version": 1,
|
||||
"version-semver": "5.84.0",
|
||||
"port-version": 2,
|
||||
"description": "Addons to QtGui",
|
||||
"homepage": "https://api.kde.org/frameworks/kguiaddons/html/index.html",
|
||||
"dependencies": [
|
||||
@ -14,6 +14,14 @@
|
||||
{
|
||||
"name": "qt5-x11extras",
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
|
@ -2918,7 +2918,7 @@
|
||||
},
|
||||
"kf5guiaddons": {
|
||||
"baseline": "5.84.0",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"kf5holidays": {
|
||||
"baseline": "5.84.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3ecd4e54210c93a999c1cf4ddc24aded8c0d7437",
|
||||
"version-semver": "5.84.0",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "7413c9e8bfa4e7db669271b3c13fe5cf7c52567a",
|
||||
"version": "5.84.0",
|
||||
|
Loading…
Reference in New Issue
Block a user