aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/kdsingleapplication
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/kdsingleapplication
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/kdsingleapplication')
-rw-r--r--vcpkg/ports/kdsingleapplication/fix-license-text.patch12
-rw-r--r--vcpkg/ports/kdsingleapplication/portfile.cmake36
-rw-r--r--vcpkg/ports/kdsingleapplication/usage4
-rw-r--r--vcpkg/ports/kdsingleapplication/vcpkg.json26
4 files changed, 78 insertions, 0 deletions
diff --git a/vcpkg/ports/kdsingleapplication/fix-license-text.patch b/vcpkg/ports/kdsingleapplication/fix-license-text.patch
new file mode 100644
index 0000000..9607cb6
--- /dev/null
+++ b/vcpkg/ports/kdsingleapplication/fix-license-text.patch
@@ -0,0 +1,12 @@
+diff --git a/LICENSE.txt b/LICENSE.txt
+index 12ee586..ac0144d 100644
+--- a/LICENSE.txt
++++ b/LICENSE.txt
+@@ -1,6 +1,6 @@
+ KDSingleApplication is (C) 2019-2023, Klarälvdalens Datakonsult AB,
+ and is available under the terms of the MIT license.
+
+-See the full license text in the LICENSES folder.
++See the full license text provided below in this file.
+
+ Contact KDAB at <info@kdab.com> to inquire about commercial licensing.
diff --git a/vcpkg/ports/kdsingleapplication/portfile.cmake b/vcpkg/ports/kdsingleapplication/portfile.cmake
new file mode 100644
index 0000000..62e5c60
--- /dev/null
+++ b/vcpkg/ports/kdsingleapplication/portfile.cmake
@@ -0,0 +1,36 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO KDAB/KDSingleApplication
+ REF "v${VERSION}"
+ SHA512 12540e70014f04b20529d19bc41bf089580c8a82e407511979017020d3f1d96c60112b208d5abe1e6c4e90ed65d3b0ca9dc2f09f20c8b580c3b8a17ae9a84ae0
+ HEAD_REF master
+ PATCHES "fix-license-text.patch"
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KDSingleApplication_STATIC)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DKDSingleApplication_QT6=ON
+ -DKDSingleApplication_STATIC=${KDSingleApplication_STATIC}
+ -DKDSingleApplication_TESTS=OFF
+ -DKDSingleApplication_EXAMPLES=OFF
+ -DKDSingleApplication_DOCS=OFF
+)
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+vcpkg_cmake_config_fixup(PACKAGE_NAME KDSingleApplication-qt6 CONFIG_PATH lib/cmake/KDSingleApplication-qt6)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(
+ FILE_LIST
+ "${SOURCE_PATH}/LICENSE.txt"
+ "${SOURCE_PATH}/LICENSES/BSD-3-Clause.txt"
+ "${SOURCE_PATH}/LICENSES/MIT.txt"
+)
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/kdsingleapplication/usage b/vcpkg/ports/kdsingleapplication/usage
new file mode 100644
index 0000000..b52c1f0
--- /dev/null
+++ b/vcpkg/ports/kdsingleapplication/usage
@@ -0,0 +1,4 @@
+kdsingleapplication provides CMake targets:
+
+ find_package(KDSingleApplication-qt6 CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE KDAB::kdsingleapplication)
diff --git a/vcpkg/ports/kdsingleapplication/vcpkg.json b/vcpkg/ports/kdsingleapplication/vcpkg.json
new file mode 100644
index 0000000..81fc461
--- /dev/null
+++ b/vcpkg/ports/kdsingleapplication/vcpkg.json
@@ -0,0 +1,26 @@
+{
+ "name": "kdsingleapplication",
+ "version": "1.1.0",
+ "port-version": 1,
+ "description": "KDSingleApplication is a helper class for single-instance policy applications.",
+ "homepage": "https://github.com/KDAB/KDSingleApplication",
+ "license": "MIT",
+ "dependencies": [
+ {
+ "name": "qtbase",
+ "default-features": false,
+ "features": [
+ "network",
+ "widgets"
+ ]
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}