From 3541b9f02e7773e5bcc7cc25bd5ea38485c0bcfb Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Fri, 24 Apr 2026 00:08:44 +0200 Subject: [PATCH] [kwindowsystem] New port (#50862) --- .../001_guard_ecm_qml_module_include.patch | 23 ++++++++ ports/kwindowsystem/portfile.cmake | 54 +++++++++++++++++++ ports/kwindowsystem/vcpkg.json | 54 +++++++++++++++++++ versions/baseline.json | 4 ++ versions/k-/kwindowsystem.json | 9 ++++ 5 files changed, 144 insertions(+) create mode 100644 ports/kwindowsystem/001_guard_ecm_qml_module_include.patch create mode 100644 ports/kwindowsystem/portfile.cmake create mode 100644 ports/kwindowsystem/vcpkg.json create mode 100644 versions/k-/kwindowsystem.json diff --git a/ports/kwindowsystem/001_guard_ecm_qml_module_include.patch b/ports/kwindowsystem/001_guard_ecm_qml_module_include.patch new file mode 100644 index 0000000000..386dc97562 --- /dev/null +++ b/ports/kwindowsystem/001_guard_ecm_qml_module_include.patch @@ -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() diff --git a/ports/kwindowsystem/portfile.cmake b/ports/kwindowsystem/portfile.cmake new file mode 100644 index 0000000000..16f81038de --- /dev/null +++ b/ports/kwindowsystem/portfile.cmake @@ -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}) diff --git a/ports/kwindowsystem/vcpkg.json b/ports/kwindowsystem/vcpkg.json new file mode 100644 index 0000000000..6257569516 --- /dev/null +++ b/ports/kwindowsystem/vcpkg.json @@ -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" + ] + } + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 07ad041eba..4dedffd066 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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 diff --git a/versions/k-/kwindowsystem.json b/versions/k-/kwindowsystem.json new file mode 100644 index 0000000000..b01ad7c215 --- /dev/null +++ b/versions/k-/kwindowsystem.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "2a6e0cc5fb29bb0e9a37051927dc36a8d8bcaf75", + "version": "6.25.0", + "port-version": 0 + } + ] +}