From 3b195ea81f3ccb42fe3313dd7801c8f27b2a7620 Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Wed, 11 Dec 2024 16:35:50 +0100 Subject: [PATCH] [kdsingleapplication] new port --- ports/kdsingleapplication/portfile.cmake | 37 ++++++++++++++++++++++++ ports/kdsingleapplication/usage | 4 +++ ports/kdsingleapplication/vcpkg.json | 25 ++++++++++++++++ versions/baseline.json | 4 +++ versions/k-/kdsingleapplication.json | 9 ++++++ 5 files changed, 79 insertions(+) create mode 100644 ports/kdsingleapplication/portfile.cmake create mode 100644 ports/kdsingleapplication/usage create mode 100644 ports/kdsingleapplication/vcpkg.json create mode 100644 versions/k-/kdsingleapplication.json diff --git a/ports/kdsingleapplication/portfile.cmake b/ports/kdsingleapplication/portfile.cmake new file mode 100644 index 00000000000000..3fb1f1f4340ee6 --- /dev/null +++ b/ports/kdsingleapplication/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDAB/KDSingleApplication + REF "v${VERSION}" + SHA512 12540e70014f04b20529d19bc41bf089580c8a82e407511979017020d3f1d96c60112b208d5abe1e6c4e90ed65d3b0ca9dc2f09f20c8b580c3b8a17ae9a84ae0 + HEAD_REF master +) + +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") +file( + COPY + "${SOURCE_PATH}/LICENSES/BSD-3-Clause.txt" + "${SOURCE_PATH}/LICENSES/MIT.txt" + DESTINATION + "${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSES/" +) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/kdsingleapplication/usage b/ports/kdsingleapplication/usage new file mode 100644 index 00000000000000..b52c1f0f2bd277 --- /dev/null +++ b/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/ports/kdsingleapplication/vcpkg.json b/ports/kdsingleapplication/vcpkg.json new file mode 100644 index 00000000000000..42dcdd03ee3acd --- /dev/null +++ b/ports/kdsingleapplication/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "kdsingleapplication", + "version": "1.1.0", + "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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 22aa8d9d448912..9d42ca93db6fa6 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3952,6 +3952,10 @@ "baseline": "2.1.0", "port-version": 1 }, + "kdsingleapplication": { + "baseline": "1.1.0", + "port-version": 0 + }, "kdsoap": { "baseline": "2.2.0", "port-version": 0 diff --git a/versions/k-/kdsingleapplication.json b/versions/k-/kdsingleapplication.json new file mode 100644 index 00000000000000..60ea7295014a6f --- /dev/null +++ b/versions/k-/kdsingleapplication.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "97d5185143331c6d5e9f744d6aa0164436ae4e6d", + "version": "1.1.0", + "port-version": 0 + } + ] +}