[kwindowsystem] New port (#50862)

This commit is contained in:
Daniele E. Domenichelli 2026-04-24 00:08:44 +02:00 committed by GitHub
parent b9d3455d24
commit 3541b9f02e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 144 additions and 0 deletions

View File

@ -0,0 +1,23 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,10 @@
include(ECMDeprecationSettings)
include(ECMPoQmTools)
include(ECMGeneratePkgConfigFile)
-include(ECMQmlModule)
+option(KWINDOWSYSTEM_QML "Build QML bindings" ON)
+if(KWINDOWSYSTEM_QML)
+ include(ECMQmlModule)
+endif()
include(ECMGenerateQDoc)
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
@@ -45,8 +48,6 @@
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
endif()
-option(KWINDOWSYSTEM_QML "Build QML bindings" ON)
-
if (KWINDOWSYSTEM_QML)
find_package(Qt6Qml ${REQUIRED_QT_VERSION} CONFIG REQUIRED)
endif()

View File

@ -0,0 +1,54 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KDE/kwindowsystem
REF "v${VERSION}"
SHA512 34efcb6df333ce37a90b22ae833b5516bad2e5bbf04cffbe43005f157499be8d8ba6c788fe84715a8535d80a23dea16d2bf1096ec217899fa5637750638159d7
HEAD_REF master
PATCHES
001_guard_ecm_qml_module_include.patch
)
# Prevent KDEClangFormat from writing to source effectively blocking parallel configure
file(WRITE "${SOURCE_PATH}/.clang-format" "DisableFormat: true\nSortIncludes: false\n")
set(KWINDOWSYSTEM_X11 OFF)
set(KWINDOWSYSTEM_WAYLAND OFF)
if(VCPKG_TARGET_IS_LINUX)
set(KWINDOWSYSTEM_X11 ON)
set(KWINDOWSYSTEM_WAYLAND ON)
message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libx11-dev libxcb1-dev libxcb-keysyms1-dev libxcb-res0-dev libxcb-icccm4-dev\n libwayland-dev wayland-protocols libxkbcommon-dev libxkbcommon-x11-dev\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxcb1-dev libxcb-keysyms1-dev libxcb-res0-dev libxcb-icccm4-dev libwayland-dev wayland-protocols libxkbcommon-dev libxkbcommon-x11-dev")
endif()
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
qml KWINDOWSYSTEM_QML
INVERTED_FEATURES
translations KF_SKIP_PO_PROCESSING
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
-DKDE_INSTALL_PLUGINDIR=plugins
-DKDE_INSTALL_QMLDIR=qml
-DKWINDOWSYSTEM_X11=${KWINDOWSYSTEM_X11}
-DKWINDOWSYSTEM_WAYLAND=${KWINDOWSYSTEM_WAYLAND}
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(
PACKAGE_NAME kf6windowsystem
CONFIG_PATH lib/cmake/KF6WindowSystem
)
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig(SKIP_CHECK)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(GLOB LICENSE_FILES "${SOURCE_PATH}/LICENSES/*")
vcpkg_install_copyright(FILE_LIST ${LICENSE_FILES})

View File

@ -0,0 +1,54 @@
{
"name": "kwindowsystem",
"version": "6.25.0",
"description": "Access to the windowing system",
"homepage": "https://invent.kde.org/frameworks/kwindowsystem",
"documentation": "https://api.kde.org/kwindowsystem-index.html",
"dependencies": [
"ecm",
{
"name": "plasma-wayland-protocols",
"platform": "linux"
},
{
"name": "qtbase",
"default-features": false
},
{
"name": "qtwayland",
"default-features": false,
"platform": "linux"
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"qml": {
"description": "Build QML bindings",
"dependencies": [
{
"name": "qtdeclarative",
"default-features": false
}
]
},
"translations": {
"description": "Build and install translation files",
"dependencies": [
{
"name": "qttools",
"host": true,
"features": [
"linguist"
]
}
]
}
}
}

View File

@ -4564,6 +4564,10 @@
"baseline": "2019-08-06",
"port-version": 3
},
"kwindowsystem": {
"baseline": "6.25.0",
"port-version": 0
},
"kwsys": {
"baseline": "2021-08-06",
"port-version": 1

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "2a6e0cc5fb29bb0e9a37051927dc36a8d8bcaf75",
"version": "6.25.0",
"port-version": 0
}
]
}