aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/kf5guiaddons
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/kf5guiaddons')
-rw-r--r--vcpkg/ports/kf5guiaddons/0001-Add-misisng-find_dependency-s-for-static-builds.patch26
-rw-r--r--vcpkg/ports/kf5guiaddons/fix_cmake.patch12
-rw-r--r--vcpkg/ports/kf5guiaddons/portfile.cmake51
-rw-r--r--vcpkg/ports/kf5guiaddons/vcpkg.json63
4 files changed, 152 insertions, 0 deletions
diff --git a/vcpkg/ports/kf5guiaddons/0001-Add-misisng-find_dependency-s-for-static-builds.patch b/vcpkg/ports/kf5guiaddons/0001-Add-misisng-find_dependency-s-for-static-builds.patch
new file mode 100644
index 0000000..eb7283d
--- /dev/null
+++ b/vcpkg/ports/kf5guiaddons/0001-Add-misisng-find_dependency-s-for-static-builds.patch
@@ -0,0 +1,26 @@
+From 4f2be34b4a33453d71847dbab977f9eaedf2e995 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com>
+Date: Wed, 19 Oct 2022 13:26:50 +0200
+Subject: [PATCH] Add misisng find_dependency's for static builds
+
+---
+ KF5GuiAddonsConfig.cmake.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/KF5GuiAddonsConfig.cmake.in b/KF5GuiAddonsConfig.cmake.in
+index b494230..73c2678 100644
+--- a/KF5GuiAddonsConfig.cmake.in
++++ b/KF5GuiAddonsConfig.cmake.in
+@@ -7,6 +7,9 @@ find_dependency(Qt@QT_MAJOR_VERSION@Gui @REQUIRED_QT_VERSION@)
+
+ if (NOT @BUILD_SHARED_LIBS@)
+ if (@WITH_X11@)
++ find_dependency(X11)
++ find_dependency(XCB COMPONENTS XCB)
++
+ if (NOT TARGET Qt6::Gui)
+ find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@)
+ endif()
+--
+2.38.0
+
diff --git a/vcpkg/ports/kf5guiaddons/fix_cmake.patch b/vcpkg/ports/kf5guiaddons/fix_cmake.patch
new file mode 100644
index 0000000..070ceba
--- /dev/null
+++ b/vcpkg/ports/kf5guiaddons/fix_cmake.patch
@@ -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@)
+ endif()
+ 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(Qt@QT_MAJOR_VERSION@WaylandClient @REQUIRED_QT_VERSION@)
+ find_dependency(QtWaylandScanner)
diff --git a/vcpkg/ports/kf5guiaddons/portfile.cmake b/vcpkg/ports/kf5guiaddons/portfile.cmake
new file mode 100644
index 0000000..ec5341c
--- /dev/null
+++ b/vcpkg/ports/kf5guiaddons/portfile.cmake
@@ -0,0 +1,51 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO KDE/kguiaddons
+ REF v5.98.0
+ SHA512 957edb3a4c78dcc52ae96f4565b617413b9dcd10e2681df0a945042c1d2ae87b8327567ad58f78c665e2e38351d6cc33129cf1ad30497912ccfa281c870e1607
+ HEAD_REF master
+ PATCHES
+ fix_cmake.patch # https://github.com/microsoft/vcpkg/issues/17607#issuecomment-831518812
+ 0001-Add-misisng-find_dependency-s-for-static-builds.patch
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ wayland WITH_WAYLAND
+ x11 WITH_X11
+)
+
+# Prevent KDEClangFormat from writing to source effectively blocking parallel configure
+file(WRITE "${SOURCE_PATH}/.clang-format" "DisableFormat: true\nSortIncludes: false\n")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_TESTING=OFF
+ -DQtWaylandScanner_EXECUTABLE=${CURRENT_INSTALLED_DIR}/tools/qt5-wayland/bin/qtwaylandscanner
+ -DBUNDLE_INSTALL_DIR=bin
+ ${FEATURE_OPTIONS}
+ MAYBE_UNUSED_VARIABLES
+ BUNDLE_INSTALL_DIR
+ QtWaylandScanner_EXECUTABLE
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(PACKAGE_NAME KF5GuiAddons CONFIG_PATH lib/cmake/KF5GuiAddons)
+vcpkg_copy_pdbs()
+
+vcpkg_copy_tools(
+ TOOL_NAMES kde-geo-uri-handler
+ AUTO_CLEAN
+)
+
+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(GLOB LICENSE_FILES "${SOURCE_PATH}/LICENSES/*")
+vcpkg_install_copyright(FILE_LIST ${LICENSE_FILES})
+
diff --git a/vcpkg/ports/kf5guiaddons/vcpkg.json b/vcpkg/ports/kf5guiaddons/vcpkg.json
new file mode 100644
index 0000000..86b770d
--- /dev/null
+++ b/vcpkg/ports/kf5guiaddons/vcpkg.json
@@ -0,0 +1,63 @@
+{
+ "name": "kf5guiaddons",
+ "version": "5.98.0",
+ "description": "Addons to QtGui",
+ "homepage": "https://api.kde.org/frameworks/kguiaddons/html/index.html",
+ "dependencies": [
+ "ecm",
+ "qt5-tools",
+ {
+ "name": "qt5-winextras",
+ "platform": "windows"
+ },
+ {
+ "name": "qt5-x11extras",
+ "platform": "linux"
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "default-features": [
+ "defaults"
+ ],
+ "features": {
+ "defaults": {
+ "description": "Default features",
+ "dependencies": [
+ {
+ "name": "kf5guiaddons",
+ "features": [
+ "wayland",
+ "x11"
+ ],
+ "platform": "linux"
+ }
+ ]
+ },
+ "wayland": {
+ "description": "Linux-only. Build with support for KeySequenceEditor inhibiting shortcuts on Wayland",
+ "dependencies": [
+ "plasma-wayland-protocols",
+ {
+ "name": "qt5-wayland",
+ "platform": "linux"
+ }
+ ]
+ },
+ "x11": {
+ "description": "Linux-only. Build with support for KeySequenceEditor inhibiting shortcuts on X11",
+ "dependencies": [
+ {
+ "name": "qt5-x11extras",
+ "platform": "linux"
+ }
+ ]
+ }
+ }
+}